Batch processing

from Wikipedia, the free encyclopedia

Batch processing , also known as batch processing , is a term from data processing and describes the working method of computer programs in which the amount of tasks or data provided as input in one or more databases is processed completely, automatically and mostly sequentially .

The complementary form of processing is called "dialog processing". The program processes exactly one process (a transaction ), which is usually initiated interactively by a user via a screen workstation for processing. The program then 'waits' for further transactions; It must process any orders that may arrive in parallel one after the other or separately from one another .

Origin of the term

The term “batch processing” comes from the early days of data processing, when interactive processing was not yet possible. Records back then were often in the form of punch cards and were the particular computer program - the program code often existed also as a hole card deck - a deck of cards ( English batch processed) in sequence. When later the punch card from other storage media, e.g. B. magnetic tapes and disk drives , was replaced and interactive work with the dialog computer became possible (with direct input via a terminal ), the term was retained and is still used today for non-interactive data processing: You give an order; this is processed by the computer with all associated data “in sequence without user intervention”. The work results are also i. d. Usually as a 'quantity' (also English batch ), for example as documents, lists ( reports ), new or changed data sets , etc.

Variants of batch / batch processing

The term 'batch processing' has two different meanings:

Processing of system commands

The term 'batch processing' is often used for the processing of operating system-related services and tasks . In this context, v. a. by MS-DOS , the term batch file or batch file known. Batch files contain a series of commands that use the operating system functions; these are processed step by step by executing the batch file. In DOS / Windows , the batch files are usually given the filename extension or . In Windows they can be started with a double click. In Unix , batch files are called shell scripts . These are much more powerful than the first DOS batch programs (up to Windows 9x , see also ), since more operating system commands or tools are available under Unix. On the Apple Macintosh , these programs are called AppleScript . The current system macOS is also a Unix variant and also knows batch files in the usual sense. GNUstep used StepTalk , a Smalltalk - Framework . Overall, the term script is being used more and more for batch programs. <name>.bat<name>.cmdCOMMAND.COM

Processing of data in batch mode

In commercial data processing 'refers to batch the automatic, sequential and complete execution in one or more of the input file (s) contained data . The program runs completely independently after starting and i. d. Usually starts without any user interaction; Exceptions could e.g. B. error situations with the need for operator interventions. It makes its results available in the form of files or (via insert / update / delete) in databases or via other output devices (e.g. printer ).

Examples of batch data processing
  • Accounting: booking incoming payments for one working day; leads to new account balances
  • Mail order: Creation of invoices for delivered items; for dispatch to customers
  • Dunning: Creation of dunning notices for customers whose invoices are still unpaid after x days
  • Retail: Creation of sales statistics from all sales in the current month, with number and sales total per item group and branch
  • Photo editing: Rotate all photos (in a specific folder) 90 degrees to the left
  • Computer center: Printing of data that was temporarily stored by previously run programs (see also spooling )
  • Data migration : converting data / files into another file format (see also file converter )

The structure of batch programs often follows standardized concepts, for example standardized programming , because the internal processing sequence - except for task-specific details - can be identical or similar.

Control and start of batch jobs

User programs for batch processing are started via so-called jobs , which are managed by system services for job control . These services are named differently depending on the operating system .

Control information is required for control, which is stored (e.g. on IBM operating systems) using JCL . The content of these specifications are primarily the respective program calls , any necessary parameters , the names (with path and drive information) for files to be processed and generated, etc. The job control system manages the jobs and starts them at a defined time and / or after a (previously occurring) event, e.g. B. the successful end of a previously executed program. Batch jobs are therefore often used to optimize the load, i. H. then processed when there is little interactive work (at night, on weekends). This can apply equally to application programs and to system programs (e.g. for data backup).

Processing batch jobs has long been a domain of mainframes . On systems that run under the IBM z / OS operating system (formerly MVS ), they are normally controlled by control software (e.g. OPC ), but can also be controlled by a TSO user or an already running job or a so-called Started -Task can be triggered.

With z / OS, batch jobs are written in JCL and are usually stored in a partitioned data set (JCL library) with a record format FB and record length 80. A kind of 'nesting' is possible through the use of cataloged procedures . Administrative work that is carried out on Unix using shell scripts is nowadays very often carried out on z / OS using REXX scripts under TSO. The batch jobs are primarily used for automated processing (often mass processing). The operating system contains a JES2 or JES3 job entry subsystem for job control .

Batch jobs similar to those of the z / OS mainframes are now also possible on Unix- based servers and are also common, especially in high-performance computing . For this purpose, special batch job schedulers are used that can handle the challenges of program-internal parallelism in particular. Simple batch processing is conceivable using cron jobs on Unix / Linux .

Under the OpenVMS operating system , batch jobs, e.g. B. can be programmed using the command language DCL , supported by so-called batch queues. These queues can be set up in a variety of ways and ensure that the batch jobs are processed automatically.

Batch processing programs under DOS, OS / 2 and Windows

The batch processing programs , also called batch scripts or batch programs , originate from the era of PC-compatible DOS operating systems and can still be run under all DOS, OS / 2 and Windows versions. Whenever the same commands are to be executed frequently, batch processing programs are ideal, for example for automated logon processes. It is also possible to make the execution of individual command lines dependent on a condition . There are constructs like IFor for this IF NOT. In addition to these condition operators, variables can also be used, jumps can be executed and comments can be written.

Under Windows NT -based systems there are also so-called command extensions, which in particular greatly enhance the IFand FORcommands by e.g. B. also offer comparisons of values .

In the meantime, a possible successor to the COMMAND.COMand the Cmd.exeshell has been published by Microsoft under the name Windows PowerShell , which allows much more complex batch processing programs.

See also

Web links

Wikibooks: Windows Batch Programming Information  - Learning and Teaching Materials

Individual evidence

  1. IT-Service24
  2. ^ Springer Gabler Verlag (editor), Gabler Wirtschaftslexikon : Keyword: batch operation