Batch processing

batch processing or also batch processing designates the treatment of tasks successively (sequentially). This is an expression from that EDP - range and synonymously as batch file, batch file, batch programming, JCL is used.

Table of contents

original meaning

original meant it that tasks not apparently at the same time, but purelysequentially to be accomplished. The pile is processed task for task. In large computing systems of the start time the batch processing was the standard technique, with which the inquiries of the users one were processed after the other one. The batch processing has their name, because the inputs asPiles were given by punch cards into the system. Today one speaks still of batch processing and means with it above all a processing of giving up and/or. Command strings, which require no user interaction at run time. One gives an order and to thatby the computer one settles, without the user must intervene further.

Batch in this connection list processing, batch processing is called literally translated.

Batch files become in different operating systems (z. B. DOS, Unix) frequently used. One speaks today more of script files,from the concept it is however the same. A set of instructions, which use the operating system functions, in a file are held and processed after starting the script.

On Mainframes, which under IBM - operating system z/OS (before times MVS) run, one speaksof jobs. These batch-processings normally become by a control software (z. B. In addition, OPC) steered, can be released by a TSO - user or a which is running job or a Started in such a way specified task.

With DOS/Windows the batch files become usuallyprovide with the file dung .bat. Under Windows they can by one doubleclick to be started. At the Macintosh with AppleScript one works. The newest system Mac OS X is a Unix variant and knows also batch files in the usual sense. With z/OS are batch jobsput down into JCL written and normally in a Partitioned DATA set (JCL LIBRARY) with record format FB and record length 80. A kind subroutine is possible by the use of Cataloged Procedures.

With Unix one calls a providing of batch files Shellscripting, whichjust as simply as with DOS functions, but many more efficiently is, there under Unix more operating system instructions and/or. - tools are available.

Administrative work, which is accomplished with Unix by means of Shellskripten, becomes with z/OS nowadays very often with REXX - Skripten under TSO accomplished. The batch jobs are used primarily for automated processing (often bulk processings). The operating system contains entry subsystem JES2 or JES3 for job control a job.


  • simply to provide
  • reusability
  • saving of time (during the execution)
[] If batch Skripte

under Windows work on

batch files or also batch files still come from the time of DOS, are not however by any means from yesterday. On the contrary: Also today they carry valuable work out under all Windows versions. Always, if frequently the same instructionsto be implemented are, almost offer themselves batch files. Exactly that is for example with Anmeldeskripten the case. It is also possible to make the execution of individual command lines dependent on a condition. But there is Konstrukte such as IF or IF EMERGENCY.In addition one can comparisons accomplish, to variables use, jumps implement, comments writes etc.

advantages over other programming languages

  • cost-neutrally
  • very simply to learn
  • development environment necessarily
  • adjustments/extensions at any time possible
  • batch files cannot change at run-time

disadvantages in relation to other programming languages

  • function-poor
  • made possible only simple task accomplishment
  • the code are protected and for everyone observable

under DOS and/or. in a DOS box one can provide batch Skripte even without an editor completely simply.

The following line providesfile named test-asked:

CoPy CON test-asked <ENTER> 

The file CON those is copied here is however no file to separate the CON brine (here: Keyboard). Everything which is from now on entered lands directly in the file to one thesewith< Strg + z> <ENTER> closes. That could look for example in such a way:

ECHO hello world! <ENTER> 
<Strg + z> <ENTER>

Importantly: after the last command line <ENTER> press and only in the next line <Strg + z><ENTER> enter.

If one the file starts test-asked now only the screen is deleted and afterwards becomes the text hello world! spent.

one knows instructions for batch files under DOS

and Windows fundamental in a batch script the instructionsexactly the same like one enters it in the console would also do. Additionally it gives among other things Comments, jumps, etc.

  • @ [instruction] = the announcement of the instruction suppresses
  • ECHO ON = switches on the command announcement for all following instructions
  • ECHO OFF = switches the command announcement for all following instructions from
  • ECHO [text] = gives [text] on the screen from
  • ECHO. = gives a blank line from
  • ECHO = returns the status, z to the command announcement. B.“ECHO is switched on (ON). ”
  • ECHO $P$G = activates the normal announcement of the DOS command line. This must be made particularly with old DOS versions.
  • REM [text] = a comment leads (REMark = remark)
  • : [Branch mark] = one definesBranch mark, to which one can jump with “GOTO”
  • GOTO [branch mark] = jumps to the branch mark
  • IF (EMERGENCY) [condition] = implements an instruction, if the subsequent condition (not) is fulfilled
  • to EXIST [file] = indicated file must exist, otherwise the instruction is not implemented
  • EMERGENCY EXIST [file] = indicated file may not exist, otherwise the instruction does not become implemented
  • FOR = leads an instruction for each individual file for a sentence of files from
  • % [Number] = %0 corresponds to the name of the batch file. to %1 to %x parameter corresponds to 1 to x
  • CALL [file name] = calls a further batch script and sets thereafter an implementing away
  • for CLS = puts back the display output. (CLS= CLEARs screen)
  • SET [variable] = [value] = sets a variable
  • % [variable] for % = reads a variable
  • break = inserts the line “pressures you a key over to continue” and stops meanwhile the batchuntil a key is pressed
  • around two values to compare with one another uses one “== “ex.s: IF %VAR% == %1 ECHO hello world!

Of course one can use the bypass operators in a batch file also:

you *.txt | more

in thisExample is *.txt the expenditure of the instruction “you “by the additive”| more “as parameters for the file uses.

characteristic auto+EXEC-asked

auto+EXEC-asked is provided like a normal batch file, has however infew characteristics, because with their parameter and memory resident programs are usually loaded.

In it is auto+EXEC-asked z. B. to use very practically the resolution LH (loadhigh), because one can load with it the memory resident programs into the higher storage area. Besidesit is important to auto+EXEC-asked always indicate into the whole path in order to ensure as perfect an operational sequence as possible.

During the activation of the German keyboard must be proceeded in auto+EXEC-asked differently than on the normal command line: It must the pathkeyboard.sys angeegeben become. This looks then in such a way:

keyb gr, c:\windows\command\keyboard.sys

Web on the left of

Wikibooks: Information to Windows batch programming - learning and teaching materials

  > German to English > (Machine translated into English)