Digital PDFs
Documents
Guest
Register
Log In
XX-2DFB8-AA
May 1972
100 pages
Original
3.9MB
view
download
OCR Version
4.1MB
view
download
Document:
03 beginningBatch
Order Number:
XX-2DFB8-AA
Revision:
0
Pages:
100
Original Filename:
03_beginningBatch.pdf
OCR Text
DEC-10-OMPBA-A-D decsystenio BEGINNER’S GUIDE TO MULTIPROGRAM BATCH digital equipment corporation - maynard. massachusetts BEGINNER'S BATCH ..88... 1st Edition May 1972 Copyright © 1972 by Digital Equipment Corporation The material in this manual is for informa~ tional purposes and is subject to change without notice. The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: DEC FLIP CHIP DIGITAL PDP FOCAL COMPUTER LAB -89 - ' BEGINNER'S BATCH FOREWORD The Beginner's Guide to Multiprogram Batch has been written for the inexperienced or casual user who has little knowledge of programming techniques and who requires only a ru‘dime nfqry knowledge of Batch operations. HOW TO USE THIS MANUAL For those users whose mode of input is cards, the follow be read. ing chapters or sections of chapters should . Chapter 1 Introduction Chapter 2 Entering a Job to Batch from Cards Chopter 4 Interpreting Your Printed Output Chapter 5, Section 5.2 Using Cards to Enter Jobs According to the language in which his to the following sections. program is written, the user should pay particular attention FORTRAN - Section 2.2.3 Card Deck to Run FORTRAN ALGOL = Section 2.2.1 Card Deck to Run ALGO COBOL = Section 2.2.2 Card Deck to Run COBO - MACRO = Section 2.2.4 Card Deck to Run MACR BASIC Programs L Programs L Programs O Programs Section 2,3.1 Card Decks for Programs That Do Not Have Special Control Cards For users who input their jobs through interac tive terminals, the following chapters or sections of chapters are recommended. Chapter 1 Introduction Chapter 3 Entering a Job to Batch from a Terminal Chapter 4 Interpreting Your Printed Output Chapter 5, Section 5.1 Using the Terminal to Enter Jobs BEGINNER'S BATCH -90 - REFERENCES Not all of the commands and cards for Batch are described in this manudl. Those users who wish to know more about Multiprogram Batch can refer to Chapter 3 in the DECsystem-10 Operating System Commands manual. Also in that manual, the SUBMIT command is described in Chapter 2. Getting An elementary description of the basic monitor commands can be found in the document s the contain Started with Timesharing. The DECsystem=-10 Operating System Commands manual descriptions of all the monitor commands available to the user. Error messages from the system programs supplied by DEC that are invoked by the user's job are explained in the applicable manuals. For example, if a user's FORTRAN program fails to compile successfully, the error messages he receives from the FORTRAN compiler can be found in l Chapter 11 of the FORTRAN IV Programmer's Reference Manual in the DECsystem=10_Mathematica Languages Handbook. -91 - k BEGINNER'S BATCH CONVENTIONS USED IN THIS MANU AL - The following is a list of symbols and conven tions used in this manual. dd-mmm=-yy hhmm A set of numbers or numbers and a word that indicates the date and time, e.g., 15-5-72 1415 or 15-MAY~-72 1415 means 2:15 PM on May 15, filename.ext 1972. The name and extension that can be put ‘ on a file. The name can be 1 to 6 characters in length and the extension can be 1 to 4 characters in length. The first character of the extension must always be a period. The extension is optional. Refer to the glossary for definitions of file- name and filename extension. hh:mm:ss A set of numbers representing time in the - form hours:minutes:seconds. Leading zeros can be omitted, but colons must be present between two numbers. For example, 5:35:20 means five hours, 35 “minutes, and 20 seconds. jobname o The name that is assigned to a job. . €an contain up to 6 characters. (proi, progl - It Refer to the glossary for the definition of a job. ' The user number assigned to each user, commonly called a project=programmer number, It must be enclosed in square brackets. The two numbers that make up the project-programmer number must be separated by a comma or a slash. Refer to the glossary for the definition of o project-programmer number. n - ~ A number that specifies either a required number or an amount of things such as cards or line-printer pages. This number can contain as many digits as are necessary fo specify the amount require d, e.g., 5, 25, t 125, etc, A number representing an amount of time usually in minutes. This number can contain as many digits as are necessary to specify the amount of time requir ed, e.g., 5, 25, 125, etc. BEGINNER'S BATCH _92_ GLOSSARY Definition Term ALGOL ALGOrithmic Language. A scientific oriented language that contains a complete syntax for describing computational algorithms. Alphonumeric The characters which include the letter of the alphabet (A through Z), the numerals (0 through 9), and letters of the other special symbols such as -I /I *I $I 'I(’)’ +' ASCII Code American Standard Code for Information Interchange. A 7-bit code in which information is recorded. - Assemble To prepare a machine-language program from a symbolic=language program by substituting absolute operation codes for symbolic operation codes and absolute or relocatable addresses for symbolic addresses. Assembler A program which accepts symbolic code and translates it info machine instruction, item by item. The assembler on the DECsystem=10 is called the MACRO assembler. Assembly Language The machine -oriented symbolic programming language belonging to an assembly system. The assembly language for the DEC-system=10 is MACRO., Assembly Listing A printed list which is the byproduct of an assembly run. It lists in logical-instruction sequence all details of a routine showing the coded and symbolic notation next to the actual assigned notations established by the assembly procedure. BASIC Beginner's All-purpose Symbolic Instruction Code. A time-sharing computer programming language that is used for direct communication between teletype units and remotely located computer centers. The language is similar to FORTRAN li and was developed by Dartmouth College. Batch processing Card The technique of executing a set of computer programs in an unattended mode. A punch card with 80 vertical columns representing 80 characters. Each column is divided into two sections one with character positions labeled zero through nine, and the other labeled eleven (11) and twelve (12). The 11 and 12 positions are also referred to as the X and Y zone punches, respectively. vi - -93 - BEGINNER'S BATCH GLOSSARY (Cont) . Term Definition Card Column One of the vertical lines of punching positions on a punched card. Card Field = . - - - ‘ A fixed number of consecutive card columns assigned to a unit of information. Card Row One of the horizontal lines of punching positions on a punched card. Central processing unit (CPU) The portion of the computer that contains the : arithmetic, logical, control circuits, and /O The location of the central computer. Used in interface of the basic system. Central Site ' conjunction with remote communications to mean the location of the DECsystem=10 central processor. Character One symbol of a set of elementary symbols such as those corresponding to the keys on a typewriter. The symbols usually include the decimal digits 0 through 9, the letters A through Z, punctutation ' marks, operation symbols, and any other special symbols which a computer may read, store, or write. COBOL — COmmon Business Oriented Language. An auto- matic programming language used in programming data processing applications. Command - ' The part of an instruction that causes the computer to execute a specified operation. Compile : : To produce a machine or intermediate language routine from a routine written in a high level source language. Compiler A programming system which translates a high level source language into a language suitable for a particular machine. A compiler is a translator that -converts a source language program into inter= ~mediate or machine language. Some compilers used on the DECsystem=10 are: ALGOL, BASIC, COBOL, FORTRAN. Computer ' A device with self-contained memory capable of accepting information, processing the information, and outputting results. Computer Operator A person who manipulates the controls of a computer : and performs all operational functions that are re- quired in a computing system, such as, loading a tape transport, placing cards in the input hopper, removing printouts from the printer rack, and so forth. Continuation Card A punched card which contains information that ‘ Control File was started on a previous punched card. ‘ The file made by the user that directs Batch in the processing of his job. vii BEGINNER'S BATCH -94_ GLOSSARY (Cont) Definition Term Core Storage A storage device normally used for main memory CPU See central processing unit. Cross Reference Listing Data in a computer. A printed listing that identifies all references of an assembled program to a specific label. This listing is provided immediately after a source program has been assembled. A general term used to denote any or all facts, numbers, letters, and symbols, or facts that refer to or describe an object, idea, condition, situation, or other factors. It represents basic elements of information which can be processed or produced by a computer, Debug To locate and correct any mistakes in a Disk A form of mass storage device in which informa- Dump A listing of all variables and their values, or a listing of the values of all locations in core. computer program. tion is stored in named files. Execute To interpret an instruction and perform the Extension See filename extension. File computer instructions and/or data. A file can be of any length, limited only by the available space on the device and the user's maximum space allot~- indicated operation(s). An ordered collection of 36-bit words comprising ment on that device. Filename Filename extension A name of one to six alphanumeric characters chosen by the user to identify a file. One to four alphanumeric characters usually chosen to describe the class of information inafile. The first character of the extension must always be a period. FORTRAN FORmula TRANslator. A procedure oriented programming language that was designed for solving scientific type problems. The language is widely used in many areas of engineering, mathe matics, physics, chemistry, biology, psychology, industry, military, and business. Job The entire sequence of steps, from beginning to end, that the user initiates from his interactive terminal or card deck or that the operator initiates from his operator's console. viii - 95 - o BEGINNER'S BATCH GLOSSARY (Cont) Term Jobstep Definition A serial or parallel sequence of procés ses invoked by a user to perform an operation. K Label Log File A symbol used to represent a thousand; for example, 32K is equivalent to 32,000, A symbolic name used to identify a statem ent in the control file, A file into which Batch writes a record entire job. of a user's This file is printed as the final step in Batch's processing of a job. Monitor " The collection of programs which schedules and controls the operation of user and system Monitor Command Mounting a device programs. An instruction to the monitor to perform an operati on. To request assignment of an 1/O device via the operator. Multiprogramming ‘ A technique that allows scheduling in such that more than one job is in an executable at any one time. Object Program a way state . The program which is the output of compilation assembly. or Often the object program is a machine language program ready for execution. Password The word assigned to a user that, along with his user number (project-programmer number), identif ies him uniquely to the system. Peripheral de.vices Any unit of equipment, distinct from the central processing unit, which can provide the system with outside communication. Project-programmer pumber : Two numbers separated by o comma, which, when considered as a unit, identify the user and his file storage area. Program The complete plan for the solution of a problem , more specifically the complete sequen ce of machine instructions and routines necessary to solve a problem. Programming The science of translating a problem from its " physical environment to o language that a computer can understand and obey. The process of planning the procedure for solving a problem. This may involve among other things the analysi s of the problem, preparation of o flowcha rt, coding of the problem, establishing input =output formats, establishing testing and checkout procedu res, “allocation of storage, preparation of documenta- tion, and supervision of the running of the progra on a computer.. m BEGINNER'S BATCH - 06 GLOSSARY (Cont) Term Queve Definition A list of jobs to be scheduled or run according to system, operator, or user-assigned priorities. For example, the Batch input queue. Software The totality of programs and routines used to expend the capabilities of computers, such as compilers, assemblers, operational programs, service routines, utility routines, and subroutines. Source Deck A card deck comprising a computer program, in symbolic language. Source Language The original form in which a program is pre= pared prior to processing by the computer. Source Program A computer program written in a language designed for ease of expression of a class of problems or procedures, by humans. A trans- lator (assembler, compiler, or interpreter) is used to perform the mechanics of translating the source program into a machine language program that can be run on a computer. Terminal A keyboard unit that is often used to enter information into a computer and to accept output from a computer. It is often used as a time=sharing terminal on a remotely located compufer cenfer. BEGINNER'S BATCH CONTENTS Page 1 CHAPTER INTRODUCTION 1.1 What is Multiprogram Batch 99 1.2 How to Use Batch 99 1.2.1 Setting Up Your Job 929 1.2.2 Running Your Job 100 1.2.3 Receiving Your Output 100 1.2.4 Recovering from Errors 100 1.3 Summary CHAPTER 2 ENTERING A JOB TO BATCH FROM CARDS 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.3 100 Format of the Cards in Your Deck 103 Setting up Your Card Deck 104 Card Deck to Run ALGOL Programs Card Deck to Run COBOL Programs 105 Card Deck to Run FORTRAN Programs Card Deck to Run. MACRO Programs Putting Commands into the Control File from Cards 106 106 - 107 108 2.4 Card Decks for Programs that do not have Special Control Cards Control Cards for Batch (in Alphabetical Order) 2.4.1 The $ALGOL Card 2.4.2 The $COBOL Card 113 2.4.3 The $DATA Card 115 2.4.4 The $DECK Card 2.4.5 The End-of-File Card 121 2.4.6 The $EOD Card 121 2.4.7 The $ERROR Card 2.4.8 The $FORTRAN Card 2.3.1 2.4.9 The $JOB Card 2.4.10 The $MACRO Card 2.4.11 The $NOERROR Card 2.4.12 The $PASSWORD Card 2.4.13 The $SEQUENCE Card 122 123 125 127 129 130 131 Specifying Error Recovery in the Control File CHAPTER 3. ENTERING A JOB TO BATCH FROM A TERMINAL 3.1.1 Creating the Control File Format of Lines in the Control File 3.2.1 Submitting the Job to Batch Queue Operation Switches 3.2.2 General Switches 3.2 11 119 2.5 3.1 109 131 137 138 139 140 141 xi BEGINNER'S BATCH -98 - CONTENTS (Cont) Page 3.2.3 File=Contral Switches 3.2.4 Examples of Submitting Jobs 144 143 3.3 Batch Commands (in Alphabetic Order) 146 3.3.1 The .BACKTO Command 146 3.3.2 The .ERROR Command 146 3.3.3 The .GOTO Command 3.3.4 The .IF Command 3.3.5 The .NOERROR Command 149 3.4 Specifying Error Recovery in the Control File 150 CHAPTER 4 INTERPRETING YOUR PRINTED QUTPUT 4.1 Output from Your Job 153 4,2 Batch Output 153 4.3 Other Printed Output 154 4.4 Sample Batch Qutput 154 147 148 4.4.1 Sample Qutput from a Job on Cards 154 4.4,2 Sample Output from a Job from a Terminal 157 4.4.3 Sample Dump 160 CHAPTER 5 PERFORMING COMMON TASKS WITH BATCH 169 5.1 Using the Terminal to Enter Jobs 169 5.2 Using Cards to Enter Jobs 176 xii -99 - : BEGINNER'S BATCH CHAPTER 1 INTRODUCTION 1.1 WHAT IS MULTIPROGRAM BATCH- Multiprogram Batch is a group of programs that allow you to submit a job fo the DECsystem=10 on a leave=it basis. That is, you give the job to an operator (if on cards) or submit it directly to the com~- puter (if from a timesharing terminal) so that you can do something else while your job is.running. A job is any combination of programs, their associated data, and commands necessary to control the programs. Some of the jobs that are commonly processed under Batch are those that: -hw_l\)—' | Are frequently run for production, Are large and long running, Require large amounts of data, or Need no actions by you when they are running. 1.2 HOW TO USE BATCH Batch allows you to submit your job to the computer through either an operator or a timesharing terminal- and receive your output from the operator when the job has finished. Output is never re- turned ot a timesharing terminal even if your job is entered from one; instead, it is sent to a peripheral device (normally the line printer) at the computer site and returned to you in the manner designated by the installation manager. 1.2.1 Setting Up Your Job You must make up a control file to use Batch. A control file is a list of commands for the monitor, system programs, or Batch itself that tells Batch what steps to follow to process your job and the order in which to process them. When you enter your job on cards, you can take advantage of the special control cards that cause Batch to insert commands into the control file for you, When you enter your . job from a timesharing terminal, you must put all the commands for your job into the control file yourself. The steps that you must take to create a control file from cards are described in Chapter 2. Creating a control file from a timesharing terminal is described in Chapter 3. 1-1 BEGINNER'S BATCH 1.2.2 -100 - Running Your Job After you submit the job, it waits in a queue with other jobs until Batch schedules it fo run under guidelines established by the installation manager. Some factors that affect how long your job waits in the queue are its size, the amount of core it needs, the amount of time that it will take to run it, and whether or not you have specified a certain deadline when you want it run. When the job is started, Batch reads the control file and performs the actions necessary to run the job. For example, Batch passes monitor commands fo the monitor which performs the actions called for and passes com~ mands to system programs so that their processing can be performed. As each step in the control file is performed, Batch records it in a log file. For example, if a monitor command such as COMPILE is processed, Batch passes it to the monitor and writes it in the log file. The monitor response is also written in the log file. Any response from your job that would be writien on the terminal during timesharing is written in the log file by Batch. 1.2.3 Receiving Your Output When the job is completed successfully and output has been sent to all devices, Batch terminates the log file and has it printed. The output from your job and the log file are then returned to you. Output from your job can be in the form of line-printer listings, punched cards, punched paper tape, plots, DECtape, or magnetic tape. If the output is to a DECtape or magnetic tape, you must include commands in your job to mount these tapes so that your output can be written on them. This is also true if you have input to any of the programs in your job written on fape. If your output is to cards, paper tape, the plotter, or the line printer, you must specify to Batch the approximate amount of cards, paper tape, plotter time, or pages that you require. These restrictions are to help Batch restrain runaway programs. An example of using the MOUNT command in the control file to request mounting of tapes is shown in Chapter 5. The way that you specify the amounts of paper, cards, efc. " is described in Chapter 2, ''The $JOB Card'' and in Chapter 3, ''Submitting Your Jab. Recovering from Errors 1.2.4 If an error occurs in your job, either from an error in your program or from an erroneous command in the control file, Batch writes the error message in the log file and usually terminates the job. In addition, if the error occurred in your program, Batch causes a dump to be taken of your area of core. You can, however, put commands in the control file so that Batch can help you recover from errors in your job and continue running. Error recovery from a card job is described in Chapter 2; from a job entered from a terminal, in Chapter 3. Dumps, along with other printed output from a Batch job, are described in Chapter 4. 1.3 SUMMARY In summary, the steps that you must perform to enter a job to the computer through Batch are as follows: - 101 - ‘ BEGINNER'S BATCH 1. Create a control file either from cards (refer to Chapter 2) or from a terminal (refer to Chapter 3). . 2. Submit the job to Batch, either to the operafér for a card job (Chapter 2) or directly to Batch for a terminal (Chapter 3). 3. Pick up your output and interpret it (refer o Chapter 4), Some sample jobs that are run through Batch from cards and from a terminal are shown in Chapter 5. BEGINNER'S BATCH - 102 - - -103 = BEGINNER'S BATCH | CHAPTER 2 ENTERING A JOB TO BATCH FROM CARDS Batch runs your job by reading a control file that contains commands to the monitor, system pro- grams, or Batch itself., You have to make up the control file, but Batch provides you with speciadl control cards to help you make up control files for simple jobs. These control cards make it easy for you to submit your programs to the computer and to create your control file to run .fhese programs. Most of these control cards cause Batch to insert commands into the control file and/or copy programs and data into disk files. Some are used to show the beginning of your job and to identify it; and one is used to indicate the end of it. Batch control cards are also available to help you recover from errors that may occur while you job is running. The following is a list of the control cards which are described in greater detail in Section 2.4. $SEQUENCE $JOB $PASSWORD $ALGOL ) $COBOL ) T $FORTRAN fiMACRQ $DECK $DATA $EOD $ERROR $NOERROR end-of -file 2.1 Section 2.4.12 Section 2.4.9 Section 2.4.12 Section 2.4.1 Section 2.4.2 Section 2.4.3 Section 2.4,10 Section 2.4.4 Section 2.4.3 Section 2.4.6 Section 2.4.7 Section 2.4.11 Section 2.4.5 ‘ FORMAT OF THE CARDS IN YOUR DECK: The card decks that you input to Batch can contain any combination of Batch control cards; com= mands to the monitor, system programs, and Batch itself; programs and data that will be copied into separate disk files; and data that will be copied into the control file for your program to read. The Batch control cards must contgin a dollar sign ($) in column 1 and a command that starts in column 2. The command must be followed by at least one space, which can then be followed by the other information on the card. The end-of-file is the only exception to this format; it is identified by special punches in columns 1 and 80. Refer to the individual description of each card for any special format requirements. 2-1 BEGINNER'S BATCH =104 - If you include a card with a monitor command, you must place a period in column 1 and follow it immediately with the command. Any information that follows the command is in the format that is shown for the command in the DECsystem=10 Operating System Commands manual. To include a command to a system program on a card, you must punch an asterisk (*) in column 1 and punch the command string immediately following the asterisk. Refer to the manual for the system program that you wish to use. Batch commands are punched like monitor commands; that is, a period is punched in column 1 and the command immediately follows the period. The card format for your program depends on the language in which you have written the program; refer to the reference manual for the programming language that you are using for the format of each line of your program. The same is true for your data. The format that is required for the data by the programming language that you are using is described in the language reference manual. If you want to include data for your program in the control file, you punch it as you would data that is read from a separate file. The only restriction on data in the control file is that alphabetic data that is preceded by a dollar sign ($) must be preceded by an additional dollar sign so that Batch will not interpret such data os its own control commands. If you put any special characters other than those described above in the first column of a card, you may get unexpected results because Batch interprets other special characters in special ways. If you want to know about other special characters, refer to the DECsystem=10 Operation System Commands manual, Chapter 3. If you have more information than will fit on one card, you can continue on the nexi ¢ard by placing a hyphen (=) as the last nonspace character on the card to be continued and the rest of the information on the next card. Comments can also be included either as separate cards or on cards containing other information. To include a comment on a separate card, you must punch a semicolon (;) in column 1 and follow it immediately with the comment. To add a comment to a card, you must precede the comment with a semicolon (;) after all the information that you need has been put on the card. Comments that are on separate cards will normally be copied by Batch into your control file and later copied into your log file. 2.2 SETTING UP YOUR CARD DECK Since the most common tasks performed in a job are compilation and execution of one or more pro- grams, simple control cards are available that will cause Batch to insert commands into the control file for these tasks. However, a Batch job can do anything a timesharing job can do and if you wish to perform more complicated tasks, you will have to include monitor commands in your deck to direct - 105 - Batch to execute your tasks. BEGINNER'S BATCH The way in which you include monitor commands and also commands to other system programs is described in Section 2.3, The control cards that you can use to compile and execute programs written in ALGOL, COBOL, FORTRAN, and MACRO are shown in sections 2.2.1, 2.2,2, 2,2.3, and 2,2.4. cards are always required in a Batch job. Certain control Others are required only at some installations. $JOB card and the end-of-file card are always required. The The $SEQUENCE and $PASSWORD cards may be required, depending on the installation. If the $SEQUENCE card is required, it must be the first card in the deck. The $JOB card must always be either the second card in the deck:if the $SEQUENCE card is required, or the first card in the deck if the $SEQUENCE card is not required. If it is required, the $PASSWORD card must immediately follow the $JOB card. It will be assumed in this manual that the $SEQUENCE and the $PASSWORD cards are required. The end-of-file card must be the last card in the deck to in- dicate to Batch that it has read the end of your job. This end-of-file card is only used to end your entire job, not to end individual files in your job. The cards that come between the first and last cards constitute your job. Setting up decks for speci- fic languages is shown in the sections that follow. 2.2.1 Card Deck to Run ALGOL Programs To run ALGOL programs, you use the $ALGOL cmd'$DATA cards. You put a $ALGOL card in front of your ALGOL program to-make Batch copy your program into a disk file ond insert a COMPILE command into you:i control file. The $ALGOL card is described in detail in Section 2.4.1. You put a $DATA card in front of the data that goes with the program to make Batch copy your data into another disk file and insert an EXECUTE command into your control file. The $DATA card is described in Section 2.4,3. Thus, to compile and execute an ALGOL program, your card deck would .appear.as follows. $ALGOL S$PASSWORD $JoB . SSEQUENCE 10-09i5 2-3 - 106 - BEGINNER'S BATCH Refer to the description of each card for the information that goes on it. The way that you tell your program how to find its data is described in Section 2.4.3.1. 2.2.2 Card Deck to Run COBOL Programs To run COBOL programs, you can use the $COBOL card and the $DATA card. You put a $COBOL card in front of your COBOL program to make Batch copy your program into a disk file and insert o COMPILE command into your control file. The $COBOL card is described in detail in Section 20 4' 2. You put a $DATA card in front of the data that goes with your program to make Batch copy your data into another disk file and insert an EXECUTE command into your control file. The $DATA card is described in Section 2.4,3. Thus, to compile and execute one COBOL program, your card deck would appear as follows. } END OF FILE c $COBOL $PASSWORD $40B $SEQUENCE 10-0916 Refer to the description of each card for the information that goes on it. The way that you tell your program how to find its data is described in Section 2.4.3.1 2.2.3 Card Deck to Run FORTRAN Programs To run FORTRAN programs, you can use the $FORTRAN and $DATA cards. You put a $FORTRAN card in front of your FORTRAN program to make Batch copy your program into a disk file and insert a COMPILE command into your control file. The $FORTRAN card is described in detail in Section 2.4.8. ' - 107 - BEGINNER'S BATCH You put a $DATA card in front of the data that goes with your program to make Batch copy your data into another disk file and insert an EXECUTE command. into your control file. described in Section 2.4.3, | The $DATA card is ‘ Thus, to compile and execute one FORTRAN program, your card deck would appear as follows. DATA FOR PROGRAM FORTRAN PROGRAM $FORTRAN $PASSWORD $J08 $SEQUENCE 10-0917 Refer to the description of each.card for the information that goes on it. The way that you tell your program how to find its data is described in Section 2.4.3.1. 2.2.4 Card Deck to Run MACRO Programs | To run MACRO programs, you can use the $MACRO and $DATA cards. You put a $MACRO card in front of your MACRO program to'make Batch copy your program into a disk file and insert a COMPILE command into your control file. Section 2.4,10, The $MACRO card is described in detail in ' You put a $DATA card in front of the data that goes with - your program to make Batch copy your data into another disk file and insert an EXECUTE command into your control file, The $DATA card is described in Section 2.4.3. would appear as follows, Thus, to assemble and execute one MACRO program, your card deck - 108 - BEGINNER'S BATCH - OF - FILE 'END MACRO PROGRAM $PASSWORD $SEQUENCE 10-0918 Refer to the description of each card for the information that goes on it. 2.3 PUTTING COMMANDS INTO THE CONTROL FILE FROM CARDS Batch puts commands into the control file for you when you use certain control cards. However, only o small number of kinds of commands can be put in the control file in this way. If you wish to perform operations in_addition to compilation and execution, you must include commands in your card deck so that Batch will copy them into your control file. Where you put these commands in your card deck determines their positions in the control file. Batch reads your card deck in sequential order, copying commands into the control file as they, or the special control cards, are read. However, Batch, when it reads a control card that tells it to copy a program or data into a disk file, copies every card that follows such a control card until it meets another control card. To ensure that your commands are not copied into a file with programs or data, you must place a special control card, the $EOD card, at the end of a program deck if you wish to follow the program with a command. For example, if you have a FORTRAN program that creates its own data and does not need to use a $DATA zard, you could include the following cards in your deck. - 109 - 'END-OF -FiLE | *EXECUTE BEGINNER'S BATCH 1 : (command to load and execute the program) (to tell Batch to stop copying $EOD into the program file) // 7" FORTRAN PROGRAM" $FORTRAN $PASSWORD $J0B $SEQUENCE 10-0919 The only commands that you cannot use in a and SEND. Batch job are CSTART, CCONT, ATTACH, DETACH , Batch will ignore these commands when it reads themin the control file. Also, you cannot use the LOGIN command in your Batch job because you will get an error that will terminat e your job. Batch logs your jobin according to your $JOB and $PASSWORD cards. 2.3.1 Card Decks for Programs That Do Not Have Special Control Cards By combmmg monitor commands with control cards such as $DECK and $EOD, in addition to the re- quired control cards, you can process any program that does not have special control cards for it. You put a $DECK cardin front of a program, data, or any other group of cards to make Batch: copy the cards that follow the $DECK card into a disk file. the control file when it reads a $DECK card, Section 2.4.4. However, Batch does not put a command into The $DECK cardis describedin detail in For example, a BASIC program does not have a specific control card. To run a BASIC program under Batch from cards, you can combine the $DECK card and the $EOD card with monitor commands. You also use a $DECK card to copy the data for @ BASIC program because the $DATA card puts an EXECUTE command into the control file and BASIC does not use the EXECUTE command to run. The following example shows a card deck that enters a BASIC program for running under Batch. - 110 BEGINNER'S BATCH :END-OF-F!LE *BYE BN +RUN *0LD «R BASIC $E0D “ $DECK (FOR DATA) DATA FOR PROGRAM BASIC PROGRAM $DECK (FOR PROGRAM) 5PASSWORD $u0B $SEQUENCE 30920 The BASIC program contains statements that read data from a disk file. You answer OLD fo the BASIC question NEW OR OLD -- because the file is on disk and can be retrieved by BASIC. , you If your BASIC program reads data that is to be input by you during the running of the program enter the data in the control file so th at it will be passed to your program by Batch. This is shown in the following example. {END-OF -FILE *BYE 3,5-9,1,8 5,1,3,4,-7 1,2,4,2,-7 #RUN (data for the program) #OLD R BASIC $EOD BASIC PROGRAM $DECK (FOR PROGRAM) $PASSWORD W]" ' m b $J08 $SEQUENCE - 2-8 -111 - » BEGINNER'S BATCH You can use the same technique to enter programs written in any language that does not have a specific control card, provided that your installation supports the language. Also, you can run sys- tem programs under Batch using the same technique. 2.4 CONTROL CARDS FOR BATCH (IN ALPHABETICAL ORDER) The special control cards for Batch are described below in detail. pertinent to this manual are discussed. (DEC-10-MRDC=-D) for the remaining cards. included on each card. Only the control cards that are Refer to DECsystem=10 Operating System Command The same is true for some of the switches that can be If a switch is not described in this manual, it can be found in the DECsystem-10 Operating System Commands manual . 2.4.1 The $ALGOL Card You put a $ALGOL card in front of your ALGOL program to make Batch copy your ALGOL program into a disk file and insert a COMPILE command into your control file. job, your ALGOL program will be compiled. Thus, when Batch runs your You can put some optional information on the $ALGOL card to tell Batch more about your program or the cards. that your program is punched on. The $ALGOL card has the form: $ALGOL filename.ext/switches (switches) 10-0902 filename.ext specifies the optional filename and extension that you can tell Batch to put on the file that it creates for your program. If you omit the filename and extension, Batch will create a unique name for your file and add the extension .ALG to it.- /switches are switches to Batch to tell it how to read your program and whether or not to request a compilation listing when the program is compiled. The switches can be put on the card in any order and are described below. (switches) are switches that Batch passes to the ALGOL compiler when it puts the COMPILE command in the control file. These switches must be enclosed in parentheses, must not be preceded by slashes, and may or may not be separated. by commas. The switches for the ALGOL com~ piler are described in Section 18.1 in Chapter 18 of the DECsystem-10 ALGOL Programmer's Reference Manual (DEC-10-KAZB-D). BEGINNER'S BATCH -112- /WIDTH:n Switch Normally, Batch reads up to 80 columns on every card of the ALGOL program. You can make Batch stop reading at a specific column by means of the /WIDTH switch, in which you indicate the number of a column at which to stop. Thus, if you have no useful information in the last 10 columns of each card of your program, you can tell Batch to read only up to column 70 by specifying /WIDTH:70 on the $ALGOL card. /NOLIST Switch Normally, the $ALGOL card tells Batch to ask the compiler to generate a compilation listing of your ALGOL program. The listing is then printed as part of your job's output. If you don't want this listing, you can include the /NOLIST switch on the ALGOL card to stop generation of the listing. /SUPPRESS:OFF Switch When Batch reads the cards of your ALGOL program, it normally does not copy any trailing spaces into the disk file to save space on the disk. If you want Batch to copy everything on the cards up to column 80 or any column that you may specify in the /WIDTH switch, you must include the /SUPPRESS:OFF switch on the $ALGOL card. Examples The simplest form of the $ALGOL card is shown in the following example. $ALGOL This card causes Batch to copy your program into a file to which Batch gives a unique name and the extension .ALG. The cards in the program are read up to column 80 with trailing spaces suppressed. A listing file is produced when the program is compiled. This listing is written as part of the job's output. No compiler switches are passed to ALGOL. The following is an example of a $ALGOL card with switches. $ALGOL MYPROG.ALG /WIDTH:72 /NOLIST (100OD, N, Q) With this card, your ALGOL program is copied into a file named MYPROG .ALG and a COMPILE command is entered into the control file. The cards in the program are read up to column 72 and trailing spaces up to column 72 are not copied into the file. When the program is compiled, no listing is produced, and the compiler reads and acts upon the switches 1000D, N, and Q given to it by Batch. -113 2.4.2 BEGINNER'S BATCH The $COBOL Coard You place the $COBOL card in front of your COBOL program to make Batch copy your COBOL. program into a disk file and insert a COMPILE command into your control file.. Thus, when Batch runs your job, your COBOL program will be compiled. You can put some optional information on the $COBOL card to tell Batch more about your program or the cards that your program is punched on. The $COBOL card has the form: $COBOL filename.ext/switches(switches) 10-0903 filename.ext - specifies the optional filename. and extension that you can tell Batch to put on the file that it creates for your program. If you omit the filename and extension, Batch will create a unique name for your file and add the extension .CBL to it. /switches ~ ‘ (switches) ' ' are switches to Batch to tell it how to read our program. elow, : The switches are described are switches that Batch passes to the COBOL compiler when it puts the COMPILE command in the control file. These switches must be enclosed in parentheses, must not be preceded by slashes, and may or may not be separated by commas. The switches for the COBOL compiler are described in Table D=3 in Appendix D of the DECsystem=-10 COBOL Programmer's Reference Manual ZDE%-W-KCIC-D;. ‘ /WIDTH:n Switch Normally, Batch reads up to 80 columns on every card of the COBOL program. You can make Batch stop reading ot a specific column by means of the /WIDTH swit¢h; in which you indicate the number of a column-at which to stop. Thus, if you have no useful information in the last 10 columns of each card of your program, you can tell Batch to read only up to column 70 by specifying /WIDTH:70 on the $COBOL card. BEGINNER'S BATCH - 114 - /SUPPRESS:OFF Switch When Batch reads the cards of your COBOL program, it normally does not copy any trailing spaces into the disk file to save space on the disk. If you want Batch to copy everything on the card up to column 80 or any column that you may specify in the /WIDTH switch, you must include the /SUPPRESS:OFF switch on the $COBOL card. /CREF Switch If you want a cross-reference listing of your COBOL program, you can include the /CREF switch on to produce a cross-reference listing the $COBOL card to tell Batch to ask the COBOL compiler when it compiles your program. This listing is printed as part of your job's output. You do not have to include a command to run the CREF program to get this listing, Batch will do it for you. /SEQUENCE Switch The COBOL compiler assumes that your COBOL program is in standard DECsystem=10 format. The /SEQUENCE switch, which Batch passes to the compiler, makes the compiler recognize that your program is in conventional (i.e., industry-wide) format. A program in conventional format has sequence numbers in columns 1 through 6 and comments that begin in column 73. When the /SEQUENCE switch is specified, the width of the card is assumed to be 72, not 80 columns. The following example shows programs in conventional and standard formats. IF YOUR PROGRAM LOOKS LIKE: 1 000010 000020 73 8 IDENTIFICATION DIVISION..... MYPROG PROGRAM-ID. MYPROG........ MYPROG 000030 AUTHOR. ABB.......evvvuvnnen. MYPROG [F YOUR PROGRAM LOOKS LIKE:" 1 IDENTIFICATION DIVISION...... PROGRAM-ID. MYPROG..... e AUTHOR. ABB.....ovviviereoannn- YOU SHOULD: Include the /SEQUENCE switch because your program is in conventional format. YOU SHOULD: Omit the /SEQUENCE switch because your program is in DECsystem=10 standard format. Examples The simplest form of the $COBOL card is: $COBOL This card tells Batch to copy your program into a file and assign a unique name and the extension .CBL. AIll 80 columns of the cards are read, trailing spaces are not copied, and the compiler is told that the program is in standard format. No switches are passed to the compiler, and a listing file is produced when the job is run. The listing is printed as part of the job's output. - 115 - BEGINNER'S BATCH The following is an example ofa $COBOL card with swifchesl. $COBOL MYPROG.CBL /SEQUENCE (N, P) With this card, your COBOL program is copied into a disk file named MYPROG.CBL and a COMPILE command is inserted into the control file. The cards are read only up to column 72 and trailing spaces up to column 72 are not copied into your file. Batch passes the N and P switches to the compiler, and tells the compiler to accept the program in conventional format, A listing file is produced when the program is compiled. This listing is printed as part-of the job's output. 2.4.3 The $DATA Card You puf a $DATA card in front of the data for your program to make Batch copy it into a disk file and to insert an EXECUTE command into your control file. Within the EXECUTE command, Batch requests a loader map for you. When your job is run, any programs that were entered with $ALGOL, $FORTRAN, or $MACRO cards that came before the $DATA card are executed. Every time that Batch reads one of the $language cards, it adds it to a list that it keeps. When it then reads a $DATA card, each program in Batch's list is put into the EXECUTE commoand string that the $DATA card puts into the control file. After the $DATA card-is read by Batch and the EXECUTE command is put into the control file with the names of the programs that preceded the $DATA card, Batch clears its list so that it can start a new list for programs entered later. If you have more than one set of data for a program or programs, you can precede each set with a $DATA card to put two EXECUTE commands into the control file to run your program or programs twice. An EXECUTE command following another EXECUTE command in the control file without intervening $language cards causes the programs executed by the first EXECUTE command to be loaded and executed again. If your data is included in the program so that you do not have cards with data on them, you can still use the $DATA card to insert an EXECUTE command into the control file. The form of the $DATA card is: SDATA filename. ext/switches 10-0904 filename.ext ' : specifies the optional filename and extension that you can tell Batch to put on the file that it creates for your data. If you omit the filename and extension, Batch will create a unique name for your file and add the extension .CDR to it. 2-13 BEGINNER'S BATCH - 116 - /switches are switches to Batch to tell it how to read the cards of your data. described below. The switches are /WIDTH:n Switch Normally, Batch reads up to 80 columns on every card of your data. You can make Batch stop reading at a specific column by means of the /WIDTH switch, in which you indicate the number of a column at which to stop. Thus, if you have information in the last 10 columns of each card of your data, you can tell Batch to read only up to column 70 by specifying /WIDTH:70 on the $DATA card. /SUPPRESS:OFF Switch When Batch reads the cards of your data, it normally does not copy any trailing spaces into the disk file to save space on the disk. If you want Batch to copy everything on the cards up to column 80 or any column that you specify in the /WIDTH switch, you must include the /SUPPRESS:OFF switch on the $DATA card. Examples The simplest form of the $DATA card is: $DATA This card causes Batch to copy your data into a file and to assign a unique name and the extension .CDR to it. All 80 columns of the cards are read and trailing spaces are not copied into the file. The following example shows a $DATA card with switches. $DATA MYDAT.DAT /WIDTH:72 SUPPRESS:OFF The data that follows this card is copied into a file named MYDAT.DAT and an EXECUTE command is inserted into the control file. When Batch reads the cards of the data, it reads only up to column 72 and copies trailing spaces into the data file. 2.4.3.1 Naming Data Files on the $DATA Card - If you want to name your data file on the $DATA card rather than letting Batch name it for you, you must, in your program, assign that file to disk as shown in the following examples. -17 - B BEGINNER'S BATCH COBOL Example ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. SELECT SALES, ASSIGN TO DSK. L] DATA DIVISION. FILE SECTION. FD SALES, VALUE OF IDENTIFICATION IS ""SALES CDS'". The $DATA card would then appear as follows. $DATA SALES.CDS FORTRAN Examples You can assign your data to disk in several ways when you use FOR_TRAN. You can read from unit 1, which is the disk, in your program and use the name FORO1.DAT as the filename on your $DATA card, as shown in the following statements. READ (1,f), list $DATA FORO1.DAT You can also tell FORTRAN fto read from logical unit 2, which is normally the card reader, and assign unit 2 or the card reader (CDR) to disk (DSK). You use the name FOR02.DAT on the $DATA card in this case. READ (2,f), list .ASSIGN DSK CDR (in the control file) $DATA FOR02.DAT You can also use a specific disk device such as DSKO as the unit from which you will read. control file, you would then assign DSKO to DSK. on the $DATA card would be FOR20.DAT. In the The unit number of DSKO is 20 and thus the name BEGINNER'S BATCH - 118 - : f), list READ (20, .ASSIGN DSK DSKO (in the control file) $DATA FOR20.DAT ALGOL Example To read your data from the disk in an ALGOL program, you would use the following statements. You can assign your data to any channel (signified by c¢) and you can give your data file any name as long as the name that you use in your program is the same as that put on the $DATA card. INPUT (c, "'DSK"') SELECT INPUT (c) OPENFILE (c, '*MYDAT.DAT') $DATA MYDAT.DAT This is to ensure that your program finds your data in the disk file under the name that you have assigned to it. If you let Batch assign a name to your data file, you will not know the name that your data file will have and should therefore assign your data file, without a name, to the card reader. Batch will tell the monitor in this case to look for your data in a disk file when your program wants to read it. The *© following examples illustrate how to do this. COBOL Example ENVIRONMENT DIVISION, INPUT-OUTPUT SECTION. SELECT SALES, ASSIGN TO CDR. DATA DIVISION. FILE SECTION. | FD SALES, LABEL RECORDS ARE OMITTED, - 119 FORTRAN Example : =~ BEGINNER'S BATCH " To read your data from the card reader, you use the unit number 2 or no unit number, as shown below. READ (2,f), list $DATA READ f, list $DATA ALGOL Example In an ALGOL program, you would assign the desired channel (signified by c) to the card reader, select the desired channel, but you would not explicitly open the named file on the channel because the file does not have a name that is known to you. INPUT (c, ""CDR") SELECT INPUT (c) $DATA The $DATA card cannot be used for data for programs written in languages other than ALGOL, COBOL, FORTRAN, and MACRO. It can, however, be used for programs that are in relocatable binary form. Thus, data for BASIC programs cannot be copied by means of the $DATA card; you should instead use the $DECK card, described below. \ 2.4.4 The $DECK Card You can put the $DECK card in front of any program, data, or other set of information to make Batch copy the program, data, or information into a disk file. control file when it reads the $DECK card. Batch does not insert a command into the You must include commands in your card deck that Batch will copy into the control file to process the file created by Batch because of the $DECK card. BEGINNER'S BATCH -120 - The form of the $DECK card is: $DECK filename.ext/switches 10-0905 filename . ext specifies the optional filename and extension that you can tell Batch to put on the file that it creates for your program or data. If you omit the filename and extension, Batch will create a unique name for your file. /switches are switches to Batch to tell it how to read the cards in your deck. described below. The switches are /WIDTH:n Switch Normally, Batch reads up to 80 columns on every card in your deck. You can make Batch stop reading at a specific column by means of the /WIDTH switch, in which you indicate the number of a column at which to stop. Thus, if you have information in the last 10 columns of each card in your deck, you can tell Batch to read only up to column 70 by specifying /WIDTH:70 on the $DECK card. /SUPPRESS:OFF Switch When Batch reads the cards in your deck, it normally does not copy any trailing spaces into the disk file to save space on the disk. If you want Batch to copy everything on the cards up to column 80 or any column that you specify in the /WIDTH switch, you must include the /SUPPRESS:OFF switch on the $DECK card. Examples The simplest form of the $DECK card is: $DECK This card causes Batch to copy your deck into a disk file and to assign a unique name to it. All 80 columns of the cards are read and trailing spaces are not copies into the file. =121 - The following shows an : BEGINNER'S BATCH example of a $DECK card ., $DECK MYDECK .CDS /WIDTH :50 /SUP PRE'SS:OFF The deck that follows this ¢ard is copied into a disk file named MYDECK.CD S. When Batch reads the cards in the deck, it reads up to column 50 and copies trailing spaces into the file. 2.4.5 The End~-of-File Card You must put the endof ~file card at the that it has reached the end does not have a dollar of your job. end of the deck containi Unlike the other Batch sign ($) and a comman by Batch as the end-of-file, of-file card can be reco d on it. hes that are reéognized rows 6,7,8, and 9 of colu mn 1. gnized in any orientat 11,0,1,6,7,8, and 9 and leave rows 2,3, card on any deck that does not the end-of-file card is show n below. So that the end- ion (e.g., upside down ), yofi should punch rows 4, and 5 blank in both colu mns 1 and 80, be issued unless the installation makes the have one. to tell Batch It contains special punc These punches must be in end-of-file card, an error message will ng your complete job control cards, the end=-offile card 12, If you omit the operator put the However, your job will still be scheduled. The form of 10-0906 2.4.6 The $EOD Card You put a $EOD card at the end of the cards being copi or $ianguoge card. This card tells Batch to stop copy ed into a file due to q $DEC K, $DATA, ing cards into the file. If another Batch control card follows the cards bein g copied, you don't need the $EOD cards into a file when it reads a Batch control card. is when you wish to follow the in your deck. The only time that the $EOD cards being copied into a file e.g;, a card containing a command. Refer to Sect card because Batch stops copying ' card is necessary by a card other than a contr ol card, ion 2.3 for a description of including commands -122 - BEGINNER'S BATCH | The $EOD card has the form: $EOD 10-0907 n below where the user wishes to An example of using the $EOD card is show ram. load the COBOL de- bugging program COBDDT with his prog $COBOL MYPROG.CBL $EOD LOAD %5 MYPROG.CBL, $YS:COBDDT _START MYPROG RT commands above example, the _LOAD and .STA If the $EOD card had not been includedwithin thethe COB ed into the copi g bein OL program, rather than would have been copied info the file control file. ) this chapter) fo specify the $NOERROR card (described later, itininser You can use the $ERROR card and Whe ts a special Batch card ROR $ER the s read h Batc n file. rol cont the in very reco error tell Batch what OR) command. This command will laterreco command info the control file, the .IFjob(ERR is being processed. How to perform error very is 2.4,7 The $ERROR Card to do when dn error occurs when your described in Section 2.5. The $ERROR card has the form: $ERROR statement 10- 0308 statement is a command to the monitor, fo a system program or a special Batch command such as .GOTO or .BACKTO. ROR card, and in= into the control file when it reads the the$ERform: Batch enters an . IF (ERROR) command card in the .IF (ERROR) command in cludes the statement from the $ERROR .IF (ERROR) statement 2-20 - 123 - BEGINNER'S BATCH The Batch commands .GOTO and .BACKTO have the forms: .GOTO statement label .BACKTO statement label statement label : is the label of a line in the control file. The label can contain from 1 to 6 alphabetic characters and must be followed by a double colon (::) when it is labelling a line. : The .GOTO command tells Batch to search forward in the control file on disk until it finds the line containing the label. The .BACKTO command tells Batch to search back in the control file on disk to find the line containing the label. which Batch will search. into the control file. You must supply the labelled line and any related lines for include these lines in your card deck where you want them to be copied If Batch cannot find a labelled line that is searching for as a result of a .GOTO or a .BACKTO statement, it terminates your job. 2.4.8 The $FORTRAN Card You place the $FORTRAN card in front of your FORTRAN program to make Batch copy your program into a disk file and insert a COMPILE command into your control file. your job, your FORTRAN program will be compiled. Thus, when Batch runs You con put some optional information on the $FORTRAN card to tell Batch more about your program or the cards that your program is punched on. The $FORTRAN card has the form: $FORTRAN filename.ext/switches(switches) . filename-. ext . 10-0909 specifies the optional filename and extension that you can tell Batch to put on the file that it creates for your program. If you omit the filename and extension, Batch will create a unique name for your file and add the extension .F4 fo it. : /switches “are switches to Batch to tell it how to read gour program. below. 2~21 The switches are described BEGINNER'S BATCH - 124 - are switches that Batch passes to the FORTRAN (switches) compiler when it puts the COMPILE command in the control file. These switches must be enclosed in parentheses, must not be preceded by slashes, and may or may not be separated by commas. The switches for the FORTRAN compiler are described in Table 11-1 in Chapter 11 of the DECsystem-10 FORTRAN 1V Programmer's Reference Manual (DEC-10-AFDO-D). /WIDTH:n Switch Normally, Batch reads up to 72 columns on every card of the FORTRAN program. You can make Batch stop reading at a specific column by means of the /WIDTH switch, in which you include the number of the column at which to stop. The FORTRAN compiler only reads FORTRAN statements up to column 72, even if you tell Batch to read up to column 80. But, if you wish to have MPB read only up to column 60, you can specify /WIDTH:60 on the $FORTRAN card. /SUPPRESS:OFF Switch When Batch reads the cards of your FORTRAN program, it normally does not copy any trailing spaces into the disk file to save space on the disk. If you want Batch to copy everything on the card up to column 72 or any column that you specify in the /WIDTH switch, you must include the /SUPPRESS:OFF switch on the $FORTRAN card. /CREF Switch If you want a cross-reference listing of your FORTRAN program, you can include the /CREF switch on the $FORTRAN card to tell Batch to ask the FORTRAN compiler to produce a cross-reference . listing when it compiles your program. This listing is printed as part of your job's output. You do not have to include a command to run the CREF program to get this listing, Batch will do it for you. /NOLIST Switch Normally, the $FORTRAN card tells Batch to ask the compiler to generate o compilation listing of your FORTRAN program. The listing is then printed as part of your job's output. If you don't want this listing, vou can include the /NOLIST switch on the $FORTRAN cord to stop generation of the listing. Examples The simplest form of the $FORTRAN card is: $FORTRAN 2-22 =125 - BEGINNER'S BATCH This card tells Batch to copy your program into a disk file and assign a unique name and the extension .F4. The first 72 columns of the cards are read, trailing spaces are not copied, and a listing file is produced when the job is run. No switches are passed to the compiler. The listing is printed as part - of the job's output. The following is an example of a $FORTRAN card with switches. $FORTRAN MYPROG.F4 /CREF /NOLIST/SUPPRESS:OFF (I, M) With this card, your FORTRAN program is copied into .a disk file named MYPROG.F4 and a COMPILE command is inserted into the control file. The cards are read only up to column 72 and frailing spaces up to column 72 are copied into your file. A cross-reference listing of your program will be generated, but a compilation listing will not.” Batch passes the | and M switches to the compiler. 2.4,9 The $JOB Card You must include the $JOB card as the first card in your deck or as the second card following the $SEQUENCE card, which is described later in this chapter. The $JOB card tells Batch whose job that it is processing and, optionally, the name of the job, and any constraints that you want to place on the job. When Batch reads the $JOB card and the $PASSWORD card, if it is required, it cre- ates the control file and begins the log file for your job. Batch then places commands into the control file that are taken from the cards that follow the $JOB card. The $JOB card has the form: $408B name [proj, prog] /switches 10-0910 name is the optional name that you can give to : the job. If you omit the name, Batch will create a unique name for your job. The name of the job is that which Batch gives to your control file and log file, -To the job name, Batch adds the extension ;CTL for the control file. It adds the extension -.LOG to the name for the log file. [proij, progl is your project-programmer number, i.e., the number that you were assigned by the installation to allow you to gain access to the DECsystem=10. Normally, the projectprogrammer number is two numbers separated by a comma and enclosed in square brackets. 2-23 BEGINNER'S BATCH -126 - /switches are switches to Batch to tell it the constraints that you have placed on your job. are described below. They /AFTER :dd-mmm=-yy hhmm Switch If you don't want Batch to run your job until after a certain time on a certain day, you can include the /AFTER switch on your $JOB card. The date and time are specified in the form dd-mmm=-yy hhmm (e.g., 20-MAY=72 0215). If this switch is not included, Batch runs your job at the time that it - would normally schedule such a job, based on its size, the amounts of core and time required, and other parameters. /AFTER:+t Switch If you don't want Batch to run your job until ofter a certain number of minutes have elapsed since the job was entered, include this form of the /AFTER switch on the $JOB card. The number of minutes that the job must wait ofter it has been entered is specified in the form +t (e.g., +15). If this switch is not included, Batch will schedule the job as it normally does. NOTE If any of the programs in your job have output to slow= speed devices such as the card punch, the paper-tape punch, the line printer, and the plotter, do not include an ASSIGN command in your job. Batch will take care of this output for you as long as you specify the switches for these devices, which are described below. /CARDS:nK Switch If any prograrn in your job has punched card output, you must include the /CARDS switch on the $JOB card to specify the approximate number of cards that your job will punch. Up to a maximum of 10,000 cards can be specified in the form nK or n (e.g., 5K or 5 specifies 5,000 cards). If you do not specify the /CARDS switch, no cards will be punched, even if you want them. If you do not specify enough cards, the remaining cutput over the number of cards specified will be lost without notification to you. /CORE:nK Switch You can specify the amount of core in which the programs in your job will run by means of the /CORE switch. You specify the amount of core in the form n or nK (e.g., 25 or 25K). You should try to estimate as closely as possible the amount of core that your job will need. If you don't specify enough, your job can't run. If you don't specify the amount of core that your job will need, Batch will assume 25K or an amount set by the installation. /FEET:n Switch If any program in your job has punched paper—tape output, you must include the /FEET switch on the $JOB card to specify the approximate number of feet of paper tape that your job will punch. You 2-24 - 127 - specify the number of feet in the form n (e.g., 50). tape will be punched, even if you want it. BEGINNER'S BATCH If you do not specify the /FEET switch, no paper If you do not specify enough paper tape, the output that remains over the number of feet that you specify will be lost and the message ?POUTPUT FOR MS LIMIT EXCEEDED will be punchedin block lettersin the tape. /PAGES:n Switch Normally, Batch allows your job to print up to 100 pages. and any compilation listings that you may request. Included in this number are the log file If you need more than 100 pages for your job, you must include the /PAGES switch on the $JOB card to indicate the that your job will print. approximate number of pages If your output exceeds either the maximum that Batch allows or the number that you specifiedin the /PAGES switch, the excess c;ufpuf will not be printed and POUTPUT FORMS LIMIT EXCEEDED will be written in the log file. the message However, even if you exceed the maximum, the first 10 pages of the log file will be printed. /TIME:hh:mm:ss Switch Normally, Batch allows your job to use up to 5 minutes of central processor time. Central processor (CPU) time is the amount of time that your job runs in core, not the amount of time that it takes Batch to process your job. If you need more than 5 minutes of CPU time, you must include the /TIME switch on the $JOB card to indicate the approximate amount of time that you will need. you don't specify enough time, Batch will terminate your job when the time is up. If However, if you specify a large amount of time, Batch may hold your job in the queue until it can schedule a large amount of time for it. The value in the /TIME switch is given in the form hh:mm:ss (hours:minutes:seconds). specify only one number, Batch assumes that you mean seconds. () is assumed to mean minutes and seconds. Two numbers separated by a colon Only when you specify all three numbers, separated by colons, does Batch assume that you mean hours, minutes, and seconds. /TIME:25 /TIME:1:25 /TIME:1:25:00 However, if you | For example: means 25 seconds means 1 minute and 25 seconds means 1 hour and 25 minutes /TPLOT:t Switch If you have any programs in your job that do output to the plotter, you must include the /TPLOT switch on the $JOB card so that your output will be plotted. no output will be plotted. If the /TPLOT switch is not included, If enough minutes (specified in the form t) are not specified, any plotter output left after the time has expired will be lost without notification to you. 2.4.10 The $MACRO Card You piace a $MAC'RO card in front of your MACRO program to make Batch copy your program into a disk file and insert a COMPILE command into your control file. 2-25 Thus, when Batch runs your job, BEGINNER'S BATCH -128 - your MACRO program will be assembled. You can put some optional information on the $MACRO card to tell Batch more about your program or the cards that your program is punched on. The $MACRO card has the form: $MACRO filename.ext/switches(switches) 10-091 filename.ext specifies the optional filename and extension that you can tell Batch to put on the file that it creates for your pro- gram. If you omit the filename and extension, Bafch will create a unique name for your file and add the extension .MAC fto it. /switches are switches to Batch to tell it how to (switches) are switches that Batch passes to the read your program and the kind of listings that you want. The switches are described below. MACRO assembler when it puts the COMPILE command in the control file. The switches must be enclosed in parentheses, must not be preceded by slashes, and may or may not be separated by commas. The switches for the MACRO assembler are described in Table H-1 in Appendix H of the DECsystem-10 MACRO-10 Assembler Programmer's Reference Manual (DEC-T10-AMZB-D). /WIDTH:n Switch Normally, Batch reads up to 80 columns on every card of your MACRO program. You can moke Batch stop reading at a specific column by means of the /WIDTH switch, in which you include the number of the column at which to stop. Thus, if you wish to have Batch read only up to column 70, you can specify /WlDTH:7O on the $MACRO card. /SUPPRESS:OFF Switch When Batch reads the cards of your MACRO program, it normally does not copy any trailing spaces into the disk file to save space on the disk. If you want Batch to copy everything on the cards up to column 80 or any column that you specify in the /WIDTH switch, you must include the /SUPPRESS:OFF switch on the $MACRO card. 2-26 - 129 - . BEGINNER'S BATCH /CREF Switch If you want a cross reference listing of your MACRO program, you can include the /CREF switch on the $MACRO card to tell Batch to ask the MACRO assembler to produce a cross-reference listing when it assembles your program. This listing is printed as part of your job's output. You do not have to include a command to run the CREF program to get this listing, Batch will do it for you. /NOLIST Switch Normally, the $MACRO card tells Batch to ask the assembler to generate MACRO program. The listing is then printed as part of your job's output. listing, you can include the /NOLIST switch on the $MACRO card to an assembly listing of your If you don't want this stop generation of the listing. - Examples The simplest form of the $MACRO card is: $MACRO This card tells Batch to copy your program into a disk file and assign -MAC to it. a unique name and the extension All 80 columns of the cards are read, trailing spaces are not copied, and a listing file is produced when the job is run. The listing is printed as part of the job's output. No switches are passed to the assembler. The following is an example of a $MACRO card with switches. ' $MACRO MYPRCG.MAC /SUPPRESS:OFF /WIDTH:72 (P,Q,X) With this card, your MACRO program is copied into a disk file named MYPROG.MAC COMPILE command is inserted into the control file. and a The cards are read only up to column 72 and trailing spaces are copied'into your file. An assembly listing is generated, and Batch passes the P, Q, and X switches to the assembler. 2.4.11 The $NOERROR Card You can use the $NOERROR card and the $ERROR card (described in Section 2.3.7) to specify error recovery in the control file. When Batch reads the $NOERROR card, it inserts a special Batch command into the control file, the . IF (NOERROR) command. job is being processed. This command tells Batch what to do when an error occurs when your How to perform error recovery is described in Section 2.5. 2-27 - 130 - BEGINNER'S BATCH The $NOERROR card has the form: $NOERROR statement 10-0912 statement is a command to the monitor or a special Butch command such as .GOTO or .BACKTO, Batch enters an . IF (NOERROR) command, into the control file when it reads the $NOERROR card, and includes the statement from the $NOERROR card in the . IF (NOERROR) command in the form: .IF (NOERROR) statement The Batch commands .GOTO and .BACKTO have the forms: .GOTO statement label .BACKTO statement label statement label is the label of a line in the control file. The label can contain from 1 to 6 alphabetic characters and must be followed by a double colon (::) when it is labelling a line, The .GOTO command tells Batch to search forward in the control file until it finds the line containing the label. The .BACKTO command tells Batch to search back in the control file to find the line containing the label. You must supply the labelled line and any related lines for which Batch will search. Include these lines in your card deck where you want them to be copied into the control file. If Batch cannot find a labelled line that is searching for as a result of a .GOTO or a .BACKTO statement, it terminates your job. 2.4.12 The $PASSWORD Card You put the password that has been assigned to you on the $PASSWORD card to tell Batch that you are an authorized user of the system. In conjunction with the $JOB card, the $PASSWORD card identifies you to Batch and tells Batch to create the control file and log file for your job. [f you put a password on the $PASSWORD card that does not match the password stored in the system for you, Batch will not create any files and will terminate your job. Some installations may not require the $PASSWORD card; if it is required at your installation, you must put it immediately ofter the $JOB cord. 2-28 - 131 - BEGINNER'S BATCH The $PASSWORD card has the form: ~$PASSWORD password 10-09i3 . password is a 1 to 6 character password that is stored in the system to identify you. 2.4.13 The $SEQUENCE Card You use the $SEQUENCE card to specify a unique sequence number for your job. This card may or may not be required by the installation or may be supplied by the personne! at the installation. If the card is required, you must include it as the first card in the deck containing your job. The form of the $SEQUENCE card is: - $SEQUENCE n 10-0901 n - is the unique sequence number assigned to your job, 2.5 SPECIFYING ERROR RECOVERY IN THE CONTROL FILE Normolly, when an error occurs in your job, Batch terminates the job and, if the error occurred when one of your programs was running, causes a dump of your core area. output and log file. The dump is printed with your You can specify recovery from errors in the control file by means and $NOERROR cards, described in Sections 2.4.7 and 2.4.11. of the $ERROR You must include one of these cards at the point in the control file that an error may occur. When-an error occurs, Batch examines the next monitor-level line (i.e., not a line that contains data or a command string to a system program) to find an . IF (ERROR) statement to tell it what to do about the error. If an error does not occur and an .IF (ERROR) statement is present, the .IF (ERROR) statement is not executed. Thus, if you have a program that you are not sure is error-frée, you can include a $ERROR or $NOERROR card to tell Batch what to do if an error occurs, as shown in the following example. 2-29 -132 - BEGINNER'S BATCH i ! END-OF-FILE REMAINDER OF JOB OR $NOERROR} FORTRAN PROGRAM /" SFORTRAN ' $PASSWORD | il $J08 $SEQUENCE 10- 0914 The above cards would cause Batch to make the following entries in the control file. .COMPILE ... .IF (ERROR) statement ent that tells Batch what to On either the $ERROR or $NOERROR card, you must include a statem one of the special Batch com= do. You can use any monitor command, a command to a pro'grom, ordnds for this purpose. Refer to mands. The .GOTO and .BACKTO commands are two Batch commause .GOT .BACKTO on Section 2.4.7 for descriptions of these commands. Be sure, if youcontrol file Othator has the label that your $ERROR or SNOERROR card, that you supply a line for the you specified in the .GOTO or .BACKTO commands. .GOTO command to Two sample jobs are shown below. The first shows using $ERROR and theRROR card and the specify error recovery. The second example shows the use of the $NOE .GOTO command. , you can include another If you have a program that you are not sure will compile without errors tell Batch to compile the version of the same program in your job (that hopefully will compijoble)areandshown below, second program if the first has an error. The cards to enter this 2-30 - 133 - ' b BEGINNER'S BATCH *EXECUTE PROGZ.F4 $EOD $FORTRAN PROG2.F4 Al ;CONTINUE *GOTO B s ¢/ FORTRAN PROGRAM $FORTRAN MYPROG.F4 $PASSWORD ABCD $J0B [27,741] $SEQUENCE 101 These cards set up the following control file for you. 10-0922 .COMPILE /COMPILE MYPROG.F4 /LIST .IF (ERROR) .GOTO A .EXECUTE MYPROG.REL /MAP:MAP.LST .GOTO B A:: ;CONTINUE : .COMPILE /COMPILE PROG2.F4 /LIST .EXECUTE PROG2.F4 B:: ;CONTINUE The $FORTRAN card told Batch to copy the program MYPR - COMPILE command into the control file. .GOTO A into the control file. OG .F4 into a disk file and to insert a The $ERROR card told Batch to insert .IF (ERROR) The data was copied into a disk file and an EXECUTE command was put into the control file because of the $DATA card. The $EOD card told Batch to stop copying cards into the data file, so Batch put the next two lines into the control file. $FORTRAN card told Batch to copy the program PROG2.F4 into a disk The second file and put a COMPILE command into the control file. Another $EOD cord told Batch to stop cdpying into the program file, so Batch put the next two lines into the control file. 2-31 An EXECUTE command was used instead of a - 134 - BEGINNER'S BATCH $DATA card because the data was already in a file on disk, although the $DATA card does not have to have data with it to put an EXECUTE command in the control file. When the job is started, Batch reads the control file and passes commands to the monitor. [f an error occurs in the compilation of the first program, Batch finds the . IF statement and executes the .GOTO command contained in it. The command tells Batch to look for the line labelled A, which contains o comment, so Batch goes on to the next line. The second program is compiled and then executed with the data. The next line is a comment, so Batch continues to the end of the control file, If an error does not occur in the first program, Batch skips the .IF statement, executes the program with the data, skips the unnecessary error procedures, and continues to the end of the control file. A variation of the above procedure is shown below using the $NOERROR card and the .GOTO command. The difference is that Batch skips the .IF statement if an error occurs, and performs it if an error does not occur. 1 1 B:.; CONTINUE /EXECUTE MYPROG.F4 A%l; CONTINUE 1] I : | [ | «GOTO B *EXECUTE PROG2.F4 5 ? FORTRAN PROGRAM « SFORTRAN MYPROG. F4 $PASSWORD ABCD $u08 [27.741] $SEQUENCE 101 10-0923 2-32 =135 - Batch reads the cards and puts the BEGINNER'S BATCH following commands into the contro l file, .COMPILE /COMPILE MYPROG .F4 /LIST .IF (NOERROR) .GOTO A .COMPILE /COMPILE PROG2.F4 /LIST .EXECUTE PROG2.F4 .GOTO B A:: ;CONTINUE .EXECUTE MYPROG,F4 B:: ;CONTINUE ' ~ The $FORTRAN card tells Batch to copy the FORT and to insert RAN program into a file named MYPROG.F4, a COMPILE command into the contro l file. . IF command into the control file. The $ERROR card tells Batch to insert The second $FORTRAN card tells Batch gram into a disk file named PROG 2,F4 and fo insert another COMPILE file. Instead of a $DATA card, o $DECK card named FORO1.DAT. command into the control is used to tell Batch to copy the data The $DATA card is not used here becau into a disk file se it would have the names of both programs in its list for the EXECUTE comma is run. nd generation, which would cause an error To tell Batch to stop copying cards Batch copies the next five lines into when the job into the datq file, the $EOD card comes next. Thus, the control file. When the job is run, Batch passes the COMPILE command to the monitor to compile the First pro- grafi. If an error does not occur, the .IF command is read and the .GOTO command is executed.’ Batch skips to the line labelled A, which is a comment, and continues reading the control file. program MYPROG.F4 is executed with the data and the end of the job occurs, Batch skips the .IF statem ent and continues readin line. is reached. g the control file. and then executed with the data. The If an error PROG2.F4 is compiled Batch is then told to go to the line labell The end of the job follows. ed B, which is a comment The examples shown above illustrate only file. two ways that you can specify error recove ry in the control You can also use the .BACKTO command or any monitor command that you choose to help you recover from errors in your job. You do not have to attempt to recover from errors according to the error messag your job again., errors while your job is running: Batch will also print a dump of your core area correct your errors. You can correct your es in the log file when your job is returned to you, and then run running and you have not specified error _ an to copy the second pro- recovery. if an error occurs while your job is If you can read dumps, this can also aid you to The log file and dumps are descri bed in Chapter 4. 2-33 BEGINNER'S BATCH - 136 - =137 - BEGINNER'S BATCH- CHAPTER 3 ENTERING A JOB TO BATCH FROM A TERMINAL When you enter a job to Batch from a timesharing terminal, you must create a control file that Batch can use to run your job. The control file contains all the commands that you would use to run your job if you were running under timesharing. program called MYPROG .CBL, égg"pILE MVYPEQOGoCBL EXI 1'L 0OBOL " 3 1YPRO For example, if you wonted to compile and execute a the typeout would appear as follows. ° «EXECUTE MYPROG.CBL (Your request) } The system's reply (Your request) LOADING LOADER 1K EXECUTI0N CORE ' reply The system's EXIT The control file to tell Batch to run the same job appears as the following. +COMPILE +'EXECUTE MYPROG.CBL MYPROG.CBL 1 When the job is run, the commands are passed to the monitor to be executed. their replies from the monitor are written in the log file so that the entire dialog shown above appears in the log file. The commands and To create a control file and submit it to Batch from a fermmol you must perform the followmg steps. 1. LOGIN to the system as a timesharing user. 2. Write a control file using an editor such as TECO or LINED. 3. When you finish the control file, close and save it on disk. 4. Submit the job to Batch using the monitor command SUBMIT or QUEUE INP:. You can then wait for your output to be returned at the designated place. 3.1 CREATING THE CONTROL FILE - After you have logged into the system as you normally would to start a timesharing job, you must run an editor so that you can create your control file. The control file can contain monitor commands, system program commands, data that would normally be entered from a terminal, and special Batch commands. 3-1 The Batch commands are described in BEGINNER'S BATCH - 138 - Section 3.3. What you write in the control file depends on what you wish your job to accomplish. An example of a job that you can enter fo Batch from a terminal is as follows. S 1. Compile a program that is on disk. Load and execute the program with data from another disk file. Print the output on the line printer. Write the output into a disk file also. Compile a second program. Load and execute the second program with the data output from the first program. 7. Print the output from the second program. The control file that you would write for the above job is as follows. COMPILE MYPROGF4/COMPILE +EXEGUTE MYPROG.F4 COMPILE PR0OG2,F4/COMPILE +EXECUTE PROG2,F4 You include statements in your programs to read the data from the disk files and write the output to the printer and the disk. The output to the line printer is written with your log file as part of the total output of your job. If an error occurs in your job, Batch will not continue, but will terminate the job and, if the error occurs while one of your programs is running, cause a dump to be taken of your core area. The dump is then printed with your job's output. To avoid having your job terminated because an error occurs, you can specify error recovery in the control file using the special Batch commands. Error recovery is described in Secticn 3.4. Any monitor command that you can use in a timesharing job can be used in a Batch ]:ob with the fol~ lowing exceptions. The ATTACH, DETACH, CCONT, CSTART, and SEND commands have no meaning in a Batch job. If you include one of these commands in your job, Batch will write the command and an error label BAERR into your log file, will not process the command, and will then continue the job from that point. Do not include a LOGIN-command in your control file because Batch |ogs. the job for you. If you put in a LOGIN command, your job will be terminated. 3.1.1 Format of Lines in the Control File Since you can put monitor, system program, and Batch commands, as well as data into the control file, you have to tell Batch what kind of line it is reading. The format of each of these linesis described below. Each line normally beginsin column 1, but Batch always starts reading at the first nontab or nonblank character, regardless of the columnin which it appears. To include a monitor or Batch command, you must put a period (.) in the first column and follow it immediately with the command. Any information that follows a monitor command.-is in the format 3-2 - 139 - shown for the command in Chapter 3 information that follows a Batch ' - of the DECsystem-10 Operating Syste command is in the format shown If you include a command string to a m Commands manual. Any in Section 3.3 in this chapter. system program, you must place an asteri sk (*) in colum follow it immediately with the comma nd string. ual for the specific system program BEGINNER'S BATCH n 1 and For the format of command strings, refer to the man- that you wish to use. If you want to include a command to a system program that does not accep t carriage return as the end of the line (e.g., TECO and DDT), you must substitute an equal sign (=) for the asterisk so that Batch will suppress the carriage return at the end of the line. To include data for your program in the separate file. control file, write it as you would data that is read The only restriction on data in the by a dollar sign ($) must be preceded by for a comment. If you put any special characters other control file is that alphabetic data an additional dollar sign so that Batch than those described above in the first from a that is preceded will not mistake it column of the line, you may get unexpected results because Batch interprets other special characters in specia l ways. want to know about other special System Commands manual. 10 Operating If you have more information than will fit on one line, you can continue on the next line by placin g a hyphen (-) as the last nonspace charac ter on the line to be continued and the tion on the next line. Comments can also be included either other information. as separate lines in the control file To include a comment on a separate line, and follow it immediately with the comment. comment with a semicolon (;) after 3.2 If you characters, refer to Chapter 3 of the DECsystem~ rest of the informa- or on lines containing you must put a semicolon(;) in column To add a comment to a'line, you must preced 1 e the all the information that you need has been put on the line. SUBMITTING THE JOB TO BATCH After you have created the control fi)le so that it can be run., and saved it on disk, you must enter it into the Batch queue All programs and data that are to be proces made up in advance or be generated sed when the job is run must be during the running of the job. You can have them on any medium but, if they are on devices other than disk, you must include commands in your control file to have the operator mount the devices on which your programs and data reside. It is recom mended that your programs and as much of your data as is possible reside on disk. An example of including MOUNT commands in the control file to mount tapes is shown in Chapter 5. You enter your job into Batch's queue These commands have the forms: by means of the SUBMIT or QUEUE INP: monitor command. SUBMIT jobname = control filename.ext, log filename.ext /switches QUEUE INP:jobname = control filename.ext, log filename.ext / switches - 140 - BEGINNER'S BATCH is the name that you give to your job. jobname If this name is omitted, Batch uses the name of the control file. is the name that you have given to the control filename.ext control file that you created. You can add an extension, but if you don't, Batch will assume an extension of .CTL. is the name that Batch will give the log log filename.ext file when it is created. You can add an extension, but if you don't, Batch will assume an extension of .LOG. You must specify the name of the control file. If the name of the log file is omitted, ‘its name will be taken from the name of the control file. are switches to Batch to tell it how to /switches process your job and what your output will look like. Most switches can appear anywhere in the command string; however, a few must be placed aofter the files to which they pertain. The various kinds of switches are described below. Three kinds of switches are available to you to use in the SUBMIT and QUEUE INP: commands. The switches are: queue operation, general, and file control. Each category of switch and the switches in each category are described in the following sections. 3.2.1 4 Queue Operation Switches Queue operation switches describe the actions that you want Batch to perform with your job. Only one of this type of switch can be placed in the command string, and it can appear anywhere in the command string. /CREATE Switch With the /CREATE switch, you tell Batch that you are entering a job into its queve. The job will then wait in the queue until Batch is ready to process it. If you omit a queue operation switch from the SUBMIT command string, Batch will assume the /CREATE switch, i.e., it will assume that you are entering a job. An example of this switch follows. SUBMIT MYJOB = MYFILE,CTLs MY_LOG.LOG /CREATE /KILL Switch You put the /KILL switch in a SUBMIT command to tell Batch that you want to delete a job that you previously entered into its queve. For example, if you submit a job and discover that you left a command out of the control file, you could delete the queue entry by issuing another SUBMIT com~mand for that job with a /KILL switch in it. After you have corrected the control file, you could resubmit the job to Batch. However, if Batch has already started to run your job, it will ignore 3-4 - 141 - ) BEGINNER'S BATCH your request to delete the job and issue the message %QUE UE REQUEST INP:jobname [proij, progl INTERLOCKED IN QUEUE MANAGER. name in the SUBMIT command or When you use the /KILL switch, you must specify the job you will kill all the jobs that you may have in the Batch input queve . /MODIFY Switch If you want to change dny switch value that you have previously entered in a SUBMIT you can include the /MODIFY in a new SUBMI want to change. to change the number of pages in a command; - you that can be entered in a SUBMIT comma The You can change any switch value switch value that you want changed SUBMIT MYJOB = command, T command to tell Batch which switch value that nd. is written immediately after the /MOD IFY switch. For example, /PAGE switch (described below), you could issue the following /MODIFY/PAGE :5;0 The value specified in the /PAGE switch valve. that follows the /MODIFY switch replac es the previous If Batch has already started the job in which you wish to change a switch, the /MODIFY switch will be ignored, and Batch will issue the message %QUE UE REQUEST INP:jobname [proj, prog] INTERLOCKED IN QUEUE MANAGER. 3.2.2 General Switches You use the general switches to define limits for your job. the time that your job will run can be specif Such limits as core, pages of output, and ied as general switches. specified only once in a SUBMIT comma Each general switch can be nd, although each can be modified in subseq uent SUBMIT commands by means of the /MODIFY switch. You can put a general switch anywhere in the command string because it affects the entire job, not just one file in the job. /AFTER:t Switch If you don't want Batch to run your job until after a certain time or until after a certain number of d, you can include the /AFTER switch in the SUBMIT minutes have elapsed since the job was entere command string. The time is specified in the form hhmm (e.g. » that the job must wait is specified in the form and the value in the switch, Batch will +# (e.g., +15). 1215) and the number of minutes If you omit the switch, or the colon schedule your job as it normally would. NOTE If any of the programs in your job have output speed devices such as the card punch, to slow- the paper-tape punch, the line printer, and the plotter, do not include an ASSIGN command in your job. Batch will take care of this.output for you as long as you specify the switches for these devices, which are described below. BEGINNER'S BATCH - 142 /CARDS:n Switch If any program in your job has punched card output, you must include the /CARDS switch in the SUBMIT command to specify the approximate number of cards that your job will punch. The number of cards is specified in the form n (e.g.; 1000). If you do not specify the /CARDS switch, no cards will be punched, even if you want them. If you specify the switch without the colon and a value, up to 2000 cards can be punched by your job. If you do not specify enough cards, the output that remains after the limit is reached will be lost without notification to you. /CORE:n Switch You can specify the maximum amount of core in whicf\\ the programs in your job will run by means s of the /CORE switch. You specify the amount of core in the form n (e.g., 25) which indicate decimal thousands. You should try to estimate as closely as possible the amount of core that your job will need. If you don't specify enough, you job can't run to completion. If you omit the switch, Batch will assume 25K of core or an amount set by the installation. If you specify the switch without the colon and a value, Batch will assume 40K of core or an amount set by the installation. /FEET:n Switch If any program in your job has punched-paper-tape output, you must include the /FEET switch in the SUBMIT command to specify the approximate number of feet of paper tape that your job will punch. You specify the number of feet in the form n (e.g., 50). If you do not specify the /FEET switch, no paper fape will be punched, even if you want it. If you specify the /FEET switch without the colon and a value, Batch will assume the numbet\ of feet equal fo 10 times the number of disk blocks that your paper tape output would occupy plus 20. If you do.not specify enough paper tape, the output that remains ofter the limit is exceeded will be lost and the message POUTPUT FORMS LIMIT EXCEEDED will be punched into the tape in block letters. . /PAGE:n Switch file Normally, Batch allows your job to print up to 200 pages. Included in this number are the log inmust you job, your and any listings that you may request. If you need more than 200 pages for that clude the /PAGES switch in the SUBMIT command to indicate the approximate number of pages that assume will Batch your job will print. If you include the switch without the colon and a value, the you will print up to 2000 pages. If your output exceeds either the maximum that Batch allows or message the and number that you specified in the /PAGE switch, the excess output will be lost 20UTPUT FORMS LIMIT EXCEEDED will be printed. However, even if you exceed the maximum, the first 10 pages of the log file will be printed. /TIME: hh:mm:ss Switch r Normally, Batch allows your job to use up fo 5 minutes of central processor time. Central processo takes it (CPU) time is the amount of time that your job runs in core, not the amount of time that - 143 - Batch to process your job. BEGINNER'S BATCH If you need more than 5 minutes of CPU time, you must include the /TIME switch in the SUBMIT command fo indicate the approximate amount of time If you specify the switch without the colon and a value, Batch will assume that CPU time. that you will need. you need 1 hour of If you don't specify enough time, Batch will terminate your job when the time is up. The value in the /TIME switch is given_in the form hh:mm:ss (hours:minutes:seconds). you specufy only one number, Batch assumes that you mean seconds. colonis assumed to mean minutes and seconds. Only when you specify all three numbers, separated by colons, does Batch assume that you mean hours, minutes, and seconds. /TIME:25 /TIME:1:25 /TIME:1:25:00 However, if Two numbers separated by a For example: means 25 seconds means 1 minute and 25 seconds means 1 hour and 25 minutes. ' /TPLOT:t Switch If you have any programs in your job that do output to the plotter, you must include the /TPLOT switch in the SUBMIT command so that your output will be plotted. “If the /TPLOT switch is not included, no output will be plotted. If you specify the switch without the number of minutes (specified in the form t), Batch will allow output equal to 10 minutes of plotter time. If enough minutes are not specified, any plotter output left after the time has expired will be lost without notification to you. 3.2.3 File=Control Switches File-control switches allow you to specify parameters for individual files in the SUBMIT command. The control file can receive a special parameter, while the log file does not, and vice versa. If you place a file=control switch before the two filenames in the SUBMIT command, the switch applies to both files in the request. If you place the switch after one of the files in the command, it refers to only that file. /DISPOSE Switch The /DISPOSE switch can have one of three values: /DISPOSE:DELETE /DISPOSE:PRESERVE /DISPOSE:RENAME /DISPOSE:DELETE allows you to specify that either the control file or the log file (or both) should be deleted after the jobis run. The log file .is deleted from your disk area only ofter it has been printed. /DISPOSE: PRESERVE allows you to specify that one or both of your files should be leftin your disk area after the jobis finished and c||| output printed. 3-7 - 144 - BEGINMNER'S BATCH /DISPOSE:RENAME tells Batch that you want the specified file to be taken from your disk area immediately and put in Batch's disk area. In the case of the log file, /DISPOSE:RENAME only works for a log file that already exists on your disk area. Do not use /DISPOSE:RENAME for a log file that does not yet exist. After the idb has been run and the output has been printed, the file that was renamed is deleted from Batch's disk area. If you omit the /DISPOSE switch, Batch assumes /DISPOSE:PRESERVE. That is, both the control file and the log file are saved in your disk area. If you plan to use the control file again, then it is best to omit the /DISPOSE switch for the control file. If you don't want to keep the control file because you don't have enough room in your disk area, specify either /DISPOSE:DELETE or /DISPOSE:RENAME. /DISPOSE:DELETE will cause the control file to stay in your disk area until after the job is finished and then be deleted. /DISPOSE:RENAME will cause Batch to immediately move your control file to its own disk area where it will stay until the job is finished, at which time it will be deleted. ‘You should use /DISPOSE:RENAME when you will be over your logged-out quota if the control file remains in your disk area when you log off the system. Unless you have some use for the copy of the log file that will remain in your disk area even after it has been printed, use the /DISPOSE:DELETE switch to have the log fi le deleted after it is printed. If you do not delete the log file and you run the job again using the same log filename, your new log file will be appended to the old log file and they will both be printed as part of the new job. The switches, and the assumptions made if they or their values are omitted, are all subject to change by each installation, Check with the installation where you run your jobs to find out what differences exist between the values described here and those at the installation. Additional switches are available for use with the SUBMIT command. For information about these switches, refer to the SUBMIT command in Chapter 2 of the DECsystem—~10 Operating System Commands manual (DEC-10-MRDC-D). You can obtain further information about Batch in Chapter 3 of the aforementioned manual. 3.2.4 Examples of Submitting Jobs " The following are sample jobs that are entered to Batch by means of the SUBMIT command. The jobs are shown in the following order. 1. 2. Creating the control file. Submitting the job to Batch using the SUBMIT command. «COMPILE MYPROG.F4 ,sLIST/COMPILE +EXECUTE MYPROGF4 After the control file to compile and execute the FORTRAN program has been written and saved, you must submit the job to Batch. SUBMIT MYFILE - 145 - it assumes the following: The control filename and extension are MYFIL The name of the job is MYFILE. N 0N O O 1. AN When Batch reads this SUBMIT command, BEGINNER'S BATCH 10. 11. E.CTL, The log file will be named MYFILE.LOG. Both the control file and the log file will (/DISPOSE: PRESERVE), be savedin your disk area An entry is being createdin Batch's queue (/CRE ATE) No cards will be punched by the job (/CARD S:0). The maximum amount of core to be used to No paper tape will be punched (/FEET:0). run the job is 25K (/CORE:25). _ 200 is the maximum number of pages to be printed (/PAGE:200). The maximum amount of CPU time is 5 minutes (/TIME :5:00). No plotter time will be used (/TPLOT:0). The next example shows the control file that was submitted to Batch. «COMPILE CEXECUTE «COMPILE +EXECUTE created at the beginning of this chapter being MYPROG, F4/LOMPILE MYFILE.F4 PROG2 F4/CQ”P1LF PROG2, After you have saved the control file, you must submit the job to Batch. e SUBMTIT = MYFII_E'MYFILEeLOG/DIsPOSEIDEL,ETE/ TIME:ZOJ!@@/CAROS:S(AM When Batch reads this request, it assumes the following: 1. The name of the job is MYFILE. T The name of the control file is MYFILE.CTL. The log file will be named MYFILE.LOG. An entry is being created in Batch's queuve (/CREA TE). The log file will be deleted after it is printed (/DISPO SE:DELETE). The control file will be savedin your disk area (/DISPOSE::PRESERVE). A maximum of 500 cards can be punched by the iob (/CARDS:500). O — L] The maximum amount of CPU time that the job can . P 20 is the maximum number of pages that can be - The maximum amount of core that can be used is 25K (CORE:25), No paper tape will be punched by the job (/FEET: 0). - (/TIME:20:00), 12. printed (/PAGE:20), use is 20 minutes No plotter time will be used (/TPLOT:0). If you made an error in the SUBMIT command when you submitted either of these jobs, Batch will type an error message on your terminal to explain your error so that you can correct it. BEGINNER'S BATCH - 146 - 3.3 BATCH COMMANDS (IN ALPHABETICAL ORDER). how to process your You can write certain special Batch commands in the control file to tell Batch Batch will recognize it. control file. Each of these commands must be preceded by a period so that The commands are described in detail in the following sections. 3.3.1 The .BACKTO Command You can use the .BACKTO command to direct Batch to search back in the control file for a line with a specified label. The .BACKTO command has the form: .BACKTO label label is a 1- to 6-character alphanumeric label for a statement. It must be followed by a double colon (::) when it labels a statement to show that it is label. nds and data to the monitor Normally, Batch reads the control file line-by-line and passes the commafile, you tell Batch to and your program. When you put a 'BACKTO command into the control find a line containing interrupt the normal reading sequence and to search back in the control file to line, Batch executes the label specified in the .BACKTO command. When it reaches the labelled comma nd or a the line and continues from that point (unless the line contains another .BACKTO _GOTO command, described below). TO com~- If Batch cannot find the labelled line, it terminates your job. An example of the .BACK mand is as follows. ABC:: ,DIRECT +BACKTO ABC 3.3.2 The .ERROR Command to be recognized With the .ERROR command, you can specify to Batch the character that you wish e that begins with a as the beginning of an error message. Normally, when Batch reads a messag you have question mark (?), it assumes a fatal error has occurred and terminates the job, unless another character specified error recovery (refer.to Section 3.4). If you wish Batch to recognize command. as the beginning of a fatal error message, you must specify the character in the .ERROR This command has the form: . ER_ROR charocter character is a single ASCII character that is recognized in the DECsystem-10. - 147 - BEGINNER'S BATCH If you do not specify a character in the .ERRO R command, Batch uses the standard error charact er, the question mark. When a line that is preceded by the character that command is passed to Batch from the monitor you specify in the .ERROR , a system program or is issued by Batch itself, Batch treats the line as a fatal error and terminates by a question mark. errors. the ioB, exactly as it would if the line were precede d Any messages preceded by other characters will The only exception is the ?TIME LIMIT EXCEE DED message. not be recognized by Batch as No matter what character you specify as the beginning of an error, Batch will recognize this message and terminate your job. If you do not include the .ERROR command in your control file, Batch will recognize the questio n mark as the beginning character of a fatal error . message, unless you include the . NOERROR com- mand in your control file to cause Batch to ignore fatal errors (refer to Section 3.3.5). An example of the .ERROR command follows. +ERROR % +ERRNR In this example, you specify in the middle of the control file that percent sign (%) as the beginning character of you want Batch to recognize the a fatal error from that point in the control file. Further on in the control file, you tell Batch fo go back to recognizing the question beginning of a fatal error message. 3.3.3 mark as the The .GOTO Command You can include the .GOTO command in your control control file to find a specific line. file to direct Batch to skip over lines in the The .GOTO command has the form: .GOTO label - label ' is a 1= to é=character alphanumeric label for a statement. It must be followed by a double colon (::) when it labels a statement to show that it is a label. When Batch encounters a . GOTO command in the control file to find the label specified in the .GOTO command . control file at the line with the specified label. nates your job. file, it searches forward in the control Batch then resumes processing of the If Batch cannot find the labelled line, it termi- If you do not include a .GOTO command in the control file, Batch reads the control file sequentially from the first statement to the last, unless you include a .BACKTO statement (refer to Section 3.3.1). - 148 - BEGINNER'S BATCH An example of the .GOTO command follows. ) -l GOTO ABC ABC:: ,DIRECT You can use the .GOTO command as the statement in an .IF command (refer to Section 3.3.4) to (ERROR) ,GQT0 AgC ABC:s 3.3.4 - = 2 JIF Tis » = aid you in error processing. For example: ,TYPE MYPROG The .IF Command error recovery procedure You can include the .IF command in your control file to specify an statem ent has the forms: or to specify normal processing if an error does not occur. The .IF .IF (ERROR) statement .IF (NOERROR) statement statement to Batch is a command to the monitor, to a pro~ gram, or fo Batch. e the The . IF command can be used in two ways as shown in its two forms. You cananinclud error. The .IF (ERROR) command in your control file at the place where you may have line in your program .IF (ERROR) command must be the next monitor-level line (as opposed to a not terminate your job. will or a line of data) in your control file after an error occurs so that Batch forward in your control file in the .IF (ERROR) command, you direct Batch to either go back toor perfor m a task for you af that to find a line that will perform some task for you, or direct Batch or any other program fo perform some task for you. point in your control file, or fo direct the monitor the monitor to perform tasks for You can use the .IF (NOERROR) command also fo direct Batch orwhere place the .IF (NOERROR) you when an error does not occur at the point in your control fileprogram, you you can include an command. Thus, if you expect that an error will occur in your and then put the error .IF (NOERROR) command to direct Batch in case the error does not occur, for le of using processing lines immediately following the command. Refer to Section 3.4 an examp .IF (NOERROR) and .IF (ERROR). r-level line in the If an error occurs and Batch does not find an . IF command as the next monito If one of your control file, Batch writes an error message in the log file and terminates the job. 3-12 - 149 programs is running when an error occurs and there taken and terminates your job. 3.3.5 - BEGINNER'S BATCH is no . IF command, Batch causes dump to be The .NOERROR Command You can use the . NOERROR command to tell Batéh to ignore all error messages issued by the monitor, system programs, and Batch itself. "The only exception is the message ?TIME LIMIT EXCEEDED. Batch will always recognize this as an error message and .NOERROR command has the form: terminate your job. The .NOERROR When Batch reads the .NOERROR command, it ignores any error messages that would normall y cause it fo terminate your job. However, Batch still writes the error message in the log file so that you can examine your errors when your output is returned. You can use .NOERROR commands in conjunction with .ERROR commands in the control file to control error reporfing. For example, if you wish to ignore errors at the beginning and end but not in the middle of the control file, place .ERROR and .NOERR OR commands at the appropriate places in the control file. fatal errors. In addition, you can also specify which messages must be treated as ' «NOERROR . ' BN +ERRORN % ' ' D {Ow » = ERRNR The first command tells Batch to ignore all errors in your job. The second command tells Batch to recognize as errors any message that starts with a percent sign (%). You change the error reporting with the next command to tell Batch to go back to recognizing messages that begin with a question mark as fatal. The second -NOERROR command tells Batch to ignore all error messages again. |f the PTIME LIMIT EXCEEDED message is issued af any time, Batch will print the message and terminate the job. - 150 - BEGINNER'S BATCH 3.4 SPECIFYING ERROR RECOVERY IN THE CONTROL FILE the job and, If you don't specify error recovery when an error occurs in your job, Batch terminatesarea. You can if the error occurs when one of your programs is running, causes a dump of your core specify error recovery in the control file by means of the Batch commands, especially the .IF coman mand. You must include the .IF command at the point between programs in the control file that a error may occur. When an error occurs, Batch examines the next monitor-level line (i.e., not it tell to d line that contains data or a command string to a system program) to find an .IF comman what to do with the error. If an error does not occur and an .IF (ERROR) command is present, the .IF (ERROR) command is not executed. Similarly, if an error does not occur cnd you have included you are an . IF (NOERROR) command, the .IF command is processed. Thus, if you have a program that not sure is error—free, you can include an .IF command to tell Batch what to do if an error occurs, as shown in the following example. MYPRUGFA4 iCOMPILE JIF (£RROR) STATEMENT ] In either the .IF (ERROR) or the .IF (NOERROR) command, you must include a statement that tells Batch what to do. You can use any monitor command or one of the Batch commands. The .GOTOfor and .BACKTO commands are commonly used for this purpose. Refer to Sections 3.3.1 and 3.3.3that descriptions of these commands. Be sure, if you use .GOTO or .BACKTO in the .IF command, you supply a line in the control file that has the label that you specified in the .GOTO or .BACKTO command. Two sample jobs are shown below. The first shows the .IF (ERROR) command and the .GOTO com= mand to specify error recovery. The second example shows the use of the .IF (NOERROR) and .GOTO commands. If you have a program that you are nof sure will compile without errors, you can include another version of the same program in your job (that hopefully will compile) and tell Batch to compile the second program if the first has an error. You write the control file as follows. +COMPILE /COHPILE MYRPROG,F4 /7 15T «}F (E£RROR) ,GOIO A +EXESZUTE MYPROGF Ait (CONTINUE LCOMPILE /GOMPLILE PROGZ2,F4 /15T JEXECUTE PROG2,t4 $CONTINUE Bt When the job is run, Batch reads the control file and passes commands to the monitor. If an error occurs in the compilation of the first program, Batch finds the .IF (ERROR) command and executes the .GOTO command contained in it. The command tells Batch to look for the line labelled A, which contains a comment, so Batch continues to the end of the control file. If an error does not 3-14 - 151 - : BEGINNER'S BATCH occur in the first program, Batch skips the . IF (ERROR ) command, executes the program with its data, skips the unnecessary error procedures, and continue s to the end of the control file. A variation of the above procedure is shown below .GOTO command. using the . IF (NOERROR) command ‘and the The difference is that Batch skips the . IF (NOERROR) command if an error occurs, and performs it if an error does not occur. The following is the control file that you would create, - +COMPILE /COMPILE MYRPROG,F4 /LIST «IF (NOERROR) ,GoTO A +GOMPILE /COMPIWLE PROGZ,F4 /_1§T WEXECUTE PROG2,r 4 +GOTo B A3l JCONTINUE +EXECUTE Bti MYPROG.F4 JCONTINUE - When the job is run, Batch passes the COMPILE command to the monitor to compile gram. executed. Batch skips to the line labelled A, which is a comment, and continues reading the control file. The program MYPROG .F4 is executed with its data If an error occurs, Batch skips the . IF kNOERROR) command and file. the first pro- If an error does not occur, the . IF (NOERROR) command and the .GOTO command are PROGZ2,F4 is compiled and then executed with the same and the end of the job is reached. continues reading the control data that the first program would Batch is then told to go to the line labelled B, which is a comment line. The end of the job follows. have used. The examples shown above illustrate only two ways that you can specify error recovery file. You can also use the other Batch commands, or any monitor you recover from errors in your job. You do not have to attempt to recover from errors while errors according to the error messages in the your job again. your job is running. You can correct your log file when your job is returned to you, and then run Batch will also print a dump of your core area if an error occurs running and you have not specified error recovery. correct your errors. in the control command that you choose to help while your job is If you can read dumps, this can also aid you to The log file and dumps are described in Chapter 4. BEGINNER'S BATCH - 152 - * - 153 - BEGINNER'S BATCH 4 CHAPTER 4 INTERPRETING YOUR PRINTED OUTPUT You can receive three kinds of printe 1. d output from your Batch job: Output that you request, i.e., the results of your job. Output from Batch, i.e., the log file. Output that is the result of actions by or system programs. your job or by Batch, the monitor, Examples of this output are compil ation listings, cross-reference listings, error messag es, and core dumps requested by Batch. 4.1 OUTPUT FROM YOUR JOB Although this chapter deals maitfly with printed output, you can have output to any device that installation supports, as long as the installation allows you to use these devices. directed to the line printer, it will be printed separate from the log each program will be preceded by two and other pertinent information. The printed output from pages containing your name and projec Following these pages are two header pages of your output file in block letters. your output. file. the If your output is The output follows these header pages. t=programmer number containing the name A trailer page follows This page contains the same inform ation that is on the first two pages. The header and frailer pages also include three rows of numbers (read vertica lly from 001 to 132). If yéur output is that which would normally be sent to the termin In the sample output shown in Section because it is directed to the terminal 4.2 al, it will be printed in the log file. 4.4, the output from the program is includ ed in rather than the line printer. the log file BATCH OUTPUT The output from Batch consists of a log mands sent to the monitor from Batch system programs like the compilers. file that contains all the statements in the control file, com- for you, and the replies to the comma nds from the monitor and Any error message sent from the monito ror a system program, or from Batch itself, is-also written in the log file. Commands manual (DEC-10-MRDC -D) for from each system program are listed in the Refer to the DECsystem=10 Operating System a list of the error messages from the monitor . The messages applicable manuals. You can ignore, most of the information in the log file because it is system inform ‘concern you. If you wish, you can keep it for referen ce by system programmers occur in your job. _ 4-1 ation and need not if unexpected results BEGINNER'S BATCH 4.3 - 154 - OTHER PRINTED OUTPUT Other output that you can get as a result of your job includes compiler and cross-reference listings, loader maps for programs that were successfully loaded, and dumps that you can request or that Batch gives to you when an error occurs in your program. The compiler and cross-reference listings are those listings generated by the compiler if you request you them. When you enter your job from cards, Batch requests compilation listings for you unless Batch ask specify otherwise. Cross-reference listings are generated for you only if you specifically E for them. When you enter your job from a terminal, you must request the listings in the COMPIL means (by command. Also, if you request a cross—reference listing, you must run the CREF program of the CREF command) to get your listing printed. If you enter your job from cards and include a $DATA card to request execution of a program, Batch was requests o loader map for you. This map shows the locations in memory into which your program placed. If you enter your job from a terminal, you must request a loader map in the EXECUTE com- mand if you wish to have one. If you wish to know the locations into which your program was loaded, the loader map can be of use to you. Otherwise, you can ignore it. A loader map is shown in the sample output in Section 4.4, however, it is not interpreted in this manual. d If a fatal error occurs in a program in your job and you have not included an error recovery comman to Batch, Batch will not try to recover from the error for you. Instead, it will write the error message in the control file, request dump of your memory area, and terminate your job. The dump is then printed with your output. If you can read dumps, the dump that Batch requests for you may be s to helpful in finding your errors. Otherwise, you can ignore the dump and use the error message locate the errors in your program. A sample dump is shown in Section 4.4, but it is not interpreted. It is shown so that you can recognize it if you ever receive one. 4.4 SAMPLE BATCH OUTPUT Two sample jobs and their output are shown in the following sections. The first shows a job entered for from cards, the second shows a job entered from a terminal. The log file is somewhat different the two types of jobs. Following the sample jobs is a sample dump. 4.4.1 Sample Output from a Job on Cards This example shows a job in which a small COBOL program is compiled and executed. The card deck is as follows. 4-2 - 155 - BEGINNER'S BATCH IEND - OF < FILE $DATA : : : —— ——— — . COBOL SOURCE PROGRAM 3§ ! 1 $COBOL MYPROG.CBL $PASSWORD ABCD "'sJ08 MYJ0B [10,1164] $SEQUENCE 10 _‘ The COBOL program is as follows. 10-0924 IDENTIFICATION DIVISION. PROGRAM-ID. MYPROG . | ENVIRONMENT DIVISION., DATA DIVISION. PROCEDURE DIVISION, - START, | DISPLAY "'THIS IS TO SHOW SAMPLE OUTP UT FROM MPB' ! . DISPLAY "'THESE TWO LINES ARE OUTPUT FROM THE PROGRAM. " . STOP RUN. When the job is run, the program is compiled and a compilation listing shown below. Note that the compiler put sequence numbers not in the original program. PROGRAM Rpel eoR2 003 P04 2005 2006 2007 ep0s veny NO MYPpPpROG, IDENTIFICATION PROGRAM=ID. . - QISPLAY STOP ERRORS "THIS "THESE RyUN, The listing is on the program even though they were COBOL 3(43) 21-MAR=72 41@:42 DIVISION. MYFROG, ENVIRONMENT DIVISION, DATA DIVISIgQN, PROCEDURE DJVISION, START, DISPLAY is produced. 1S T0 TWO SHOW LINES . - SAMPLE OUTPUT ARE QUTPUT FROM MPB,", FROM THE PROGRAM.", DETECTED After the program is compiled, it is loaded and executed. puts the EXECUTE command in the control file, It is shown below. in these examples. Since Batch requests a loader map when it the loader map is the next thing printed from Note that each of these print-outs are preced your job. ed by headers, which are not shown MAP SEGMENT BREAK STORAGE MAP STARTING ADDRESS 221200 .COMM, Bea144 021040 MYPROG, ©@128¢ START, ALTER, @@1103 201202 pe8143 MONEY, TRAC3, TRACED 01243 BTRAC, TRPOP, HOlvd SH3INNIO38 1S THE LUW 10142 21mMAR-T72 PROG COBOL FILE FILES, USES, POINT, %NM, eBo140 0B0144 2001592 200155 PTFLG, 201245 900147 g282154 OVRFN, MEMRY, 009803 ¢01244 201244 COBOL 1K CORE, 345 WORDS FREF LOADER USED 2+4K CORE MYPRQG epeL41 SEGWD. 0p2142 COMMA. @z2346 X0T. a@Py45 eee152 Pee136 TRACZ2. XPR. 2p21°7 TRACE, 201243 TRPD, Pg1244 TRAC1. 0p21°3 - 961 - PP1246 - 157 - Following loading, the program is executed. - The program in this example does not have output to the line printer, instead its output is written to a terminal., output is written in the log file. Because this is a Batch job, the terminal The log file is printed next because the end of the job is The log file contains all the dialog between your job and commands that Batch sent to the mBnitor for you. pages. BEGINNER'S BATCH reached. the monitor and system programs, and some An annotated log file is shown on the following Note that each line in the log file is preceded by the time Following the time is a word that describes what kind of day when the line was written. of information is on each line. to know what each of these words means because much You do not need of the information is system information. $J0B MYJ0B END OF FILE AFTER 15 CARDS, P4 FILES, @3 BLKS BVERS BCOATE BASUM EQTCQQ ;ézs) IONTR - REQUEST CREATED AT UNIQUE' 2 RESTART: 12142108 MONTR MONTR SET SPQOL ALL 12142128 10:41i88 21-MAR-72 S84ALE DUAL CPU TTY1D2 .SET TIME 3R@2, MONTR 4 LOGIN 12/2164 JoB 24 MONTR 18142128 It need nof concern you. INP! SUBJOB B1 OF 26 USER USER MONTR enters. MYJoBLl2,11647 FOR w##[1@,1164] LOG FILE IN (12,1164 -M 10142121 12142121 1142121 12142101 121421021 USER This is system information that Batch OTHER JOBS SAME PPN 1041 21-"‘R-72 TUE Batch logs your job into the system. The information that follows it is the system response. These are commands that Batch entered for you. 18142108 MONTR 12142128 ig142028 1g142110 1014232 12442132 19142132 MONTR MONTR USER MONTR MONTR MONTR Holva S ¥3INNIO3Ig CARD STSUM (1g,1164] SSEQUENCE 4@ $J0B MYJOB (19,1164] $CoORNL MYPRQG,CBL +COMP /COMPI_g MYPROG,CBL/LIST COBOL?Y EXIT MYPROS These are the cards that you entered. ;CREATED BY CDRSTK This is the command entered by Batch for you. The answer to the COMPILE command from the monitor. - 861 - . CDRSTK VER 12(17) DSK 21=MAR~72 181411902 MONTR 1g1411% 554A4E DUAL CPU DATE J 12141143 10141143 10144144 SDATA 19142132 MONTR 10142132 MONTR 18142189 USER 101434122 USER 10143100 USER 18143108 USER 10143400 USER 18143100 USER 19143300 USER 12143420 MONTR 10143100 MONTR CSET GDR QAA.CDR :CREATED + 1EXEC_/MAPIMAP.LPT /REL MYPRO G.REL LOADING . | 001246 1S THE LOW SEGMENT BREAK TWO LINES ARE OUTPUT FROM THE Monitor indicates that execution of 10143180 ip143321 12143121 12143121 10143321 MONTR +DEL MYPROG.REL,Q4A,CDR,M YPROG.CBL USER FILES DELETEN: USER MYPRQGREL USER GAA,CDR your program has ended. XFIn MONTR MONTR 18143125 Ke=QUE 10143330 KJOB 10143143 LGOUT 10143145 LGOUT 12143145 LGoUT 12143145 LGOUT LPMSG 1p144129 LPMSG 10145120 LPMSG 12143521 LPMSG 18146125 This is the output from your program. PROGRAM; EXIT MONTR USER 1143124 USER 19:43121 MONTR LPMSG Your $DATA card. 3CREATED BY CDRSTK} Commands entered by Batch for you. THIS |8 TO S4oW SAMPLE OUTPUT FROM MPB. THESE 10143100 10143154 } Monitor response to the EXECUTE command. MONTR 10143322 CDRSTK CoBpL 1k CoRp EXECUTION ig143;22 1014321 | BY MYPROG.CBL 23 BLOCKS «KJOB TOTAL OTHER JOB Command entered by Batch. Response to the DELETE Command. FRegDd QSKBIHYJOB.LOGE10.1164J=/H/2 OF 7 BLOCKS IN LPT REQUEST JOBS SAME PPN 24, USER [10,1164) SAVED ALL 4 FILES ANOTHER JOB RUNTIME @ STILL MIN, (25, LOGGED 23,97 OFF 34/B/VS=1B/VLIQEEIVDUD SEC IN UNDER This is the LOGOUT dialog, giving system information. DISK BLOCKS) LOGGED LPTSPL VERSIoN 4(128) TTY1@2 1043 21=MAR=/2 [1@,1164) RUNNING ON LPT3 JOB MYJOB FI_F DSKBL:MYPROG,LSTC1@, 1164] FOR [12,11641] STARTED)__ This is more system information. DSKB1iIMYPROG, JOB MYJOB - 661 - MONTR FI_E STL12,1164] DONE DSKB1:MAP.LPTC1P,1164) DSKBL11MAP,LPTr102,1164) DONE FOR (12,1164) STARTED ' HOLVE Si¥INNI©O39 19142132 - 160 - BEGINNER'S BATCH 4.4.2 Sample Output from a Job from a Terminal This example shows the same job described above as it would be entered from a terminal. You would first create the program as a file on disk. IDENTIFICATION DIVISION, PROGRAM=1D, MYPROG., ENVIRQNMENT DIVISION, DATA DIVISION. PROCFQURE DIVISION, . START, E OUTPUT FROM MPB.". DISPLAY "THIS S TO SHOW SaMPL ARE QUTPUT FROM THE PROGRAM,". DISPLAY "THESE TWQ LINES RUN, STOR Then you would make up a control file to compile and execute the COBOL program. .COMPILE MYPROG«CBL JEXESUTE MYPROG You must then submit the job to Batch using the SUBMIT command. SUBMIT MYJOB When the job is run, the program is compiled and a listing is produced, even though you did not request it. This is because the COBOL compiler always produces a listing. Note that the compiler adds sequence numbers to the listing, even through you did not include these numbers on the program. 2001 goB2 pop3 2004 P06 START, een7 peoe opee NO 22~MAR=72 15%11d IDENTIFICATION DIVISION. PRUGRAM=1D. MYPROG, ENVIRONMENT DIVISION, DATA DIVISIgN, 2ges CoBOL 3(43) MYPROQOG. PROGRAM PROCEDURE DIVISION, DISPLAY "THIS !S TO SHOW SAMPLE OUTPUT FROM MPB."TM, DISPLAY "THESE TWO LINES ARE QUTPUT FROM THE PRQGRAM.TM. STOP ERRORS RUN, DETECTED Because you did not request it specifically in the EXECUTE command, you will not get a loader map of your program. The log file is printed next as the last of your output. The output from the program is written in the log file because it is output to the terminal and the log file simulates a terminal dialog. The log file also contains some commands that Batch sent to the monitor for you and some additional system information. An annotated log file is shown on the following page. Note that each line in the log file is preceded by the time of day when the line was written. Following the time is a word that describes what kind of information is on each line. You do not have to know what each of these words means because much of the information is system information. 4-8 BASUM BATCON 7(36) 22~MAR=72 MPB[10:1164] (MP: SUBJOB @1 OF ©6 : #(10,11641 rOR #SMITH REQUEST CREATED AT 15109127 151g9:27 15199:27 15109351 15112126 15110126 151121026 MONTR MONTR USER USER MONTR WSET TIME +SET SPOOL MONTR 15312131 USER 15111118 MONTR 15111148 15114118 MONTR 15131130 USER - 151113302 USER 15111130 USER 15111430 USER 15111130 USER 15111130 USER 151111302 MONTR 15115136 15115144 153116:06 15417:05 SaAME >The information that follows is the PPN 22=MpR®72 system response. WED 323 AL +»COMPILE MYPROG.CBL COBoLt MYRROS5, EXIT : MONTR « EXECUTE MYB®R0G.CBL LOADING CoBoL 1K CoRg THIS IS TO SuJoW SAMPLE OUTPUT FROM MPB. TWO LINES ARE OUTPUT FROM THE KeQUE TOTAL OF 4 B_pCKS IN LPT REQUEST JOB 35. USER [10,1164) LOGGED OFF TTY1p2 SAVED ALl 1@ FILES (125, DISK BLOCKS) LGOUT LGOUT LPMSG LPMSG LPMSG 'This is the output from your program. PROGRAM, EXIT LGOUT for you. This is another command from your ontrol file and its response. EXECUTION THESE These are commands _fhuf Batch enters This is the command from your control file and the response. MONTR MONTR 15111130 MONTR 1511130 MONTR 15111:58 15115:35 15115136 Batch logs your job into the system. 55441F DUAL CPU TTY10? JOBS 1509 15112187 15114:30 QTHER 15:87:32 22-MAR-72 This is sytem information that Batch fenters. It need not concern you. [10 14164] 18,1184 USER USER MONTR MONTR 15112126 MONTR 15812527 MONTR 15112:07 MONTR 15111:30 +LOGIN JOB 35 g IN — 15108906 RESTART) FILE I 151p9;26 UNIQUE® 2 LOG This indicates that execution has ended. 'KJOB USKBEIPB.LOGLL0,116415/W/214/8/VR:10/VS1 425/y 1202/V/L D] RUNTIME - 191 - BDATE B MIN, 24,0% SEC 1515 22'MAR-/2 \This is the LOGOUT dialog, which (gives system information. . LPTSPL VERSIIN 4(125) RUNNING ON LPT3 JOB MPB FI|E DSKBLIMYPRQOG.LST[18,1164] FOR DSKBLIMYFROG, . STL12,11643 DONE [10,1164)STARTED } This is more system information. HO1VE S:d43INNI©O3d BVERS 151p9106 15109126 —N 15¢29:26 BEGINNER'S BATCH 4.4.3 - 162 - Sample Dump Shown on the following pages is the log file containing an error message and the dump that Batch requested as a result of the message. The error resulted from use of a logical name in a program without assigning the logical name to a physical device at run time. The dump lists the assembly language equivalent of your program, and the location in memory in octal, decimal, ASCII code, and SIXBIT code. (SIXBIT code is a compressed form of ASCII used in COBOL and some system programs.) Only the first three pages of the dump are shown. 14428142 BVERS BOATE BASUM 1412%:142 MONTR 14123145 14123145 14128145 14123146 14125146 14125846 1412%146 1412%346 MONTR USFR REQUEST CREATED AT 14:24:135 22-MAR-72 UNIGQUE? 2 RESTART: ¢ LOG F ALE 1IN +LOGIN 12,1164 USER USER MONTR MONTR MONTR MONTR MONTR 14128446 MONTR 14128147 MONTR 1412%147 MONTR 14125147 MONTR 1425 +SET 22aMAR=72 TIME «SET SPOOL » o COMPILE 302 WED - €91 - Li-¥ 14125142 BATCON 7(36) [NP: SUBJOB 01 QF 026 ?23MAR“72 NJOBL12,11647 FOR #GORFINKLE #[1D0,116437 ALL EXAMPLE,CBL EXIT HOlva S\ HINNIDO3I8 14128142 14128142 MONTR USER USEk USEK 142251585 14:25:55 14:25:5%5 14:25:55% USER EXECUTICN USEK USER INIT TOOK THE ERROR KETURN USEFR USER USER MONTK 14:25:55 MONTR 14:25356 MONTR A4 14:25:59% MONTR 14325155 MONTR 14325356 MONTR 14:25:56 MONTR 143252586 MONTR 142:26:04 USER 14:26:044 USEF 14:26:15 14:26:15 14:26:15 is the error This JOB CEVICE MAGY IS NOT & UEVICE QR IS NOT AVAILABLE TO THIS message that caused Batch to request the IMIT TOOK THE ERROR KRETURN NOT AVAILABE TO THIS JoB DEVICE MAG2 IS NOT A DEVICE QR 1SLOCA TION 42p1155 USER 2LAST COBOL UUQ CALLED FROM J dump. EXIT oCLOSE DUMP ¢ SYMBOLS EXTRACTED MONTH MUNTR MONTR EXIT MONTR TOTAL OF 38 BLOCKS IN LPT 14:26:17 KmQLE 14:26:21 KJ Ok 14:26:31 LGOLT 14:26:32 coscL 1k CORE USER 143251565 14:26:15 . JEXECUTE EXAMPLE,CBL LOADING - ¥91 - 14325155 HOlva S dINNIO3d 14:125:47 14:25:50 14:25:55%5 14:25:55 14:25:55 143251558 LGeauT 14126332 LGOLT 14:26:32 LGouT 143126340 LPMSG 14327304 LPMSG 14329324 LPMSG P dl?/N/Z:AIB/VRZ1@/VS:422/VL:EQU/VL: JKJUB DSK&l:INJUB.Lflfillfipllé REQUEST OTHER JOBS SAME PPN LOGGED OFF TTY1d2 Jok 32, USER [1¢,1164] ) SAVED ALL © FILES (1va. DISK BLOCKS[18,1 184] 1426 22=Mpke72 ANCTHER JoB STILL LOGGED IN UNDER RUNTIME @ MIN, 1¢,79 SEC LPTSPL VERSION 4(125) RUNNING ON LPTS )STARTEE Jos INJoB FILE DSKB@:M&@DAEEIQ.IISAJ FOR [1?.1104 DSKB@:M&EQAE[lm.llsdl UONE - 165 - QUICK DUMP MONITOR VERSION %3(24) (FILE SYS3GUIKDM,CCL] INFORMATION MONITOR NAME 554ALF DUAL CPU BUILT ON @3=21e72 SYSTEM SERIAL NUMBER 18 160 MONITOR JOB VERSION IS 00@R020,050400 INFORMATION 14325 DUMP TAKEN 3=22=72 AT DAEMON VERSION 6(21)=0 JOB NUMBER TTY182 30 PPN [1@,1164) CHARGE NUMBER @ RUN TIME =@ MIN, 5@ SECGNDS TOTAL KCS =6 TOTAL OF 128 PRIV, BITS THERE ARE @ REAL TIME DEVICES DISK 10 IS NAME HISEG DIRECTORY © LAST HPG DSKBsLIBOL IS DISK WRITES ‘ HISEG NAME READS, © CURRENT HPG USER BEGINNER'S BATCH IN USE COMMAND WAS @ ,SHR (1,4] GORFINKLE USER CORE LIMIT IS 261632 WORDS USER TIME LIMIT IS 299 SECONDS PROGRAM NAME 1S COBOL 4-13 BEGINNER'S BATCH - 166 - CORE INFORMATION PC = 700402,857777 OPC = 000000Q,000000 LAST UUQ AT 440004,000006 SYMBOLIC PC = LOCATIONS BLKI OPC = ACS IN 57777 7 LAST UUO AT ANDCB 6(4) OCTAL: a/ 3/ 6/ eLebee, 200002 554147 ,220000 pecae?,e0¢c@n 17/ 7776e1,001463 0/ 7/ 15/ 777777 ,0000800 Pa4201,001424 poeoee,0ea2nd 3100p06,2p14142 11/ 14/ ACS oednoe,000000 go000e,000002 2006p22,001361% IN 522202,715530 eQeP02,020009 eeoooe,p01777 6oPB00,001425 puaGec,a0e2e0 DECIMAL: 1157627906 17184588529 537133844 ") @ ¥ e 2 =19837149184 w23319569576 26843546378 789 -262144 132 1e23 »33291469 SELECTED CORE AREAS DUMPED AS INSTRUCTION,OCTAL,DECIMAL,SIXBIT,ASCII 1456, 1457/ AOS 1460/ 1461/ 1462/ 1463/ 1464/ 1465/ 1466/ 1467/ 1470/ 1471/ 1472/ POPJ 4 Z uuoeye CAM CAM CAM 4 r4 Z Z CATL 1473/ 131191 131497 131555 132709 2epB00, 200000 220000,020220 eeased, 320200 2000002, 200000 00eo0e,a80000 4 1475/ 002220, 700200 p0eR00, 202000 Z 1476/ 1501/ 1502/ 15@3/ (15) 15, Z 1474/ $477/ 15807 15,0113 5,753(14) 8,698 8,766 Z - 20200, 200040 Z 2 Z r4 z 020800, 200000 020000 ,220000 - 200202, 200200 @0Qwee, 000000 @dooeeo,p0a020 +Z6 2936092008 1342177280 2308545001 1 23748150063 17 142687064 142606997 23752343665 179831537 25971131067 25971131134 31142445056 24150802432 e 2 1873873015 26843677297 26843677155 26843678309 elw 08l erC #gE - L9l - UUORRY CATL 212800, 0200200 254000,001433 260742,001457 222000, 000021 201040,001330 021040,0201225 260760,000161 221256,00136} 301402,201273 301400,001376 350017,0200000 263740,000000 022002,200000 220000, 220000 012000,400167 310800, 402651 310000,400743 310000,4083145 12792628014 HOlvd S1d3INNIO38 1454/ 1455/ 137242,001456 002140,0821330 D K. T PUSHJ LIST) el I 1453/ DOWN D —4 TM Gli-v 1451/ 1452/ PUSH N DPB 5,814 vuQae2 3,728 vudesa JRST 795 PUSHJ 15,815 2 17 UuO@e1 1,728 UUOQ@l 1,661 A LACVIEAVE 1443/ 1444/ 1445/ 1446/ 1447/ 1458/ (HOPEFULLY 0 OO - C(AC17) SOOI OS ARCUND BEGINNER'S BATCH - 168 - =169 - BEGINNER'S BATCH CHAPTER 5 PERFORMING COMMON TASKS WITH BATCH This chapter shows some sample jobs that are run from a terminal and from cards. Section 5.1 illustrates entering jobs from a terminal. Section 5.2 shows entering jobs from cards. The examples are the same in both cases, the difference is only in the way that they are entered. - 5.1 USING THE TERMINAL TO ENTER JOBS ALGOL Example The first job is a simple ALGOL program that writes output to the terminal. Since the job is being enfered through Batch, the output is written in the log file instead of on the terminal. BEGIN REAL END / INTEGER X7 X ts 1} FOR I 3= 1§ UNTIL PRINT(X)? I} 1000 DO X I X+I? The control file for the program is as follows. +COMPILE MYPROG+ALG/LIST +EXECUTE MYPROG«ALG SUBMIT MYFILE ‘When Batch starts the job, the statements in the control file call the ALGOL compller to compile program. Batch then calls the loader to load the program-for execution. A listing of the program will be printed with the log file, as shown below. DECSYSTEM 10 ALGOL=6@, V. 2A(145): 13=APR=72 0eeee3 START OF 15325357 B! BLOCK 000206 1 2 0e000e6 000216 000023 PeR026 BEGIN 1 REAL 3 4 5 6 El X} INTEGER X gm1) FOR I 3m{ PRINT(X)] END —~ END @ BLOCK ERRORS 3§, CONT 2 UNTIL I; 1082 DO X zmX+1) the BATCON 7(52) 15825:50 BASUM MYFILE[1@,1461) FOR #SMITH »([10,1461]1 LOG FILE IN [12,1461] 15825353 MONTR 15:25:58 15825:51 15125151 15225391 15325152 MONTR USER USER USER MONTR {3=APRe72 REQUEST CREATED AT 15124339 13=APRa72 UNIGUES 2 RESTART: 8 ,LOGIN 10/1461 55425E DUAL CPU TTY!l10 JOB 20 o OTHER JOBS SAME PPN THUR 13=APR=72 1525 15325152 MONTR ,SET TIME 320 15125152 ,SET 15125152 MONTR MONTR 15125153 MONTR 15325153 MONTR 15325153 MONTR 15125556 USER 15125357 MONTR 15325157 MONTR 15325158 MONTR 15125158 MONTR SPOOL EXIT ,,EXECUTE LOADING 15:26:06 EXECUTION USER' 15126187 USER 15326307 USER ALL ,.COMPILE MYPROG,ALG/LIST ALGOL: MYPROG 15125358 USER 15126206 USEK 15126106 USER MYPROG.ALG MYPROG 1K CORE 5.0050102&% 5 15326387 USER END OF EXECUTION = 1K CORE 15326187 USER EXECUTION TIME: 9,88 SECS, 15326307 USER ELAPSED TIME: 15126387 USER 15126307 USER 15326207 MONTR 15526107 MONTR 15326187 MONTR @.15 SECS, ,KJOB DSKBOIMYFILE,LUG{10,146118/w/Z84/B/VRi10/VSI384/VLi200/VDIP 15:26:08 K=QUE TOTAL OF 3 BLOCKS IN LPT REQUEST 15126115 LGOUT JOB 28, USER [10,1461) LOGGED OFF TTY11@ 15326321 LPMSG LPTSPL VERSION 4A(141) RUNNING ON LPT2 15126112 KJOB= OTHER JOBS SAME PPN 15326115 LGOUT 15526345 LGOUT 153263115 LGOUT 15:26142 LPMSG & L B3V P DMEer hruou _ -0/l - 15:25:50 BDATE HO1VE S dINNI©O34d INPi SUBJUB @i OF @6 15225350 BVERS SAVED ALL 48 FILES (65¢, DISK BLOCKS) ANOTHER JOB STILL LOGGED IN UNDER (1@,1461) RUNTIME © MIN, 03,25 SEC JOB MYFILE FILE DSKBUIMYPROG,LST(12,1461] nexwNAIsMVYBRNE MWNUWUWINIIl 1 QTI1A.14ntY "NwYgip!l badWfe vy NBONFE Sof WY em FOR 1526 13=AFR=72 (12,1461) STARTED =171 - BEGINNER'S BATCH BASIC Example. The next sample shows how to enter a BASIC program to it on disk. Batch. Then make up a control file that simulates the dialog gram is shown below. 5 ie 20 32 INPUT D IF D = 2 PRINT "X FOR 50 60 80 90 le@ 118 with the BASIC system. The pro- THEN tio VALUE","SINE","RESOLUTION" X=@ T0 3 SIN(X)<®»M LETXOsX 40 You must make up the file and save IF STEP D THEN 8@ LET MmSIN(X) NEXT X PRINT x@, M,D GO TO 5 END The program requests data from the user when it is running. The final data item must be 2 to conclude the program. You include the data in the control file. The control file follows. oR BASIC *0LD *DSKIMYBAS,BAS *RUN ol 0 001 2 *BYE The output from the program will be printed in the control on the terminal. SUBMIT 15841337 15841137 15341337 153141:37 = BAS,CTL BVERS BDATE BATCON 7(52) 13=APR=72 INP: BASUM BAS([1@,1461) FOR MONTR REQUEST UNJQUES 15341337 MONTR 15141339 USER- 15141240 _LOGIN JOB 15 USER OTHER 18341340 USER 15341841 MONTR 15841544 MONTR 15741241 15141341 15341341 15341141 15341241 MONTR 15414 MONTR 1531413541 USER 15841342 USER- 10/146% 53425€ JOBS #SMITH ALL : BASIC NEW OR OLO==wQLD @2 OF @6 #[10,1461] LOG 15140223 13=APR=72 @ o DUAL SAME PPN 13=APRe72 ,SET TIME 302 - ,,R SUBJOB CREATED AT 2 RESTART: MONTR = _SET SPOOL MONTR MONTR 15341142 USER file because it would normally be printed The command to submit the job to Batch is. as follows. CPU TTY1L5 THUR FILE IN (10,1461) -172 BEGINNER'S BATCH USER USER USER USER 15841147 USER 15841147 USER 153141247 USER 153141347 USER 15141247 USER 155412147 USER 15841347 USER 1534147 USER 158413247 USER 15343347 USER 15141348 USER 1584148 USER 15341:48 USER 15141148 USER 15341149 USER 15141149 USER 15841142 151411343 15144243 15341843 15841349 USER 158411349 USER 15344149 USER 15341:50 USER 151442350 USER 1581441350 USER 15841152 USER 15141352 USER 15:44159 MONTR OLD FILE NAME==¢DSKIMYBAS READY wRUN MYBAS 185341 13=APR=72 7.1 SINE RESOLUTION SINE 0.141121 SINE RESOLUTION 2,21 RESOLUTION ¥ VALUE g.14112 Se 7.21 X VALUE h] 7.001 X VALUE B,14113 2.99999 2,1 0,001 72 TIMES 1.30 SECS, READY ' ] LOGGED OFF TTY11S Job 15, USER [10,1461 (000, DISK BLOCKS) *BYE SAVED ALL 33 FILES ED IN UNDER ([10,1461) ANOTHER JOB STILL LOGG 5 SEC 1541 13=APR=72 RUNTIME @ MIN, 03,0 FORTRAN Example t on the line printer. In the control The third example shows a FORTRAN program that prints outpu y file if an error occurs when your pro~ file, you want to tell Batch to delete your relocatable binar your relocatable binary file as it normally gram is executed. Otherwise, you want Bafch to save would. The program is shown below. c THIS PROGRAM CALCULATES PRIME NUMBERS FROM 11 DO 12 1 wii,50,2 Jel JuJ+2 As) Aal/A Lel/d BaAwi IF (B) 5,10,% IF (J.LT.SQRT(FLDAT(I))) G0 TO 4 10 183 PRINT 105,1 CONTINUE FORMAT (14, END ! 18 PRIME,') TO 5@, : -173 - BEGINNER'S BATCH The control file to compile and execute this program, deleting the relocatable binary file if there is an execution error, is as follows. +COMPILE MYPROG,F4 +EXECUTE MYPROG,F4 +DELETE MYPROG,REL » IF. (NOERROR) END3: FEND ,GOTQ OF END JOB The command to submit this job is as follows. SUBMIT MYFOR,CTL,MYFOR,LOG/DISPOSE:DELETE The log file will be deleted after the output has been printed. 29157407 9150107 2ot15n127 BASUM po:spiaz MONTR BVERS BDATE BATCON 7(52) 14=~pPR-72 [NP: SUBJOB 22 MYFORL1p,14611 FOR REQUEST CREATED AT UNITQUEY 2 RESTART: MONTR ,LOGIN RO150109 USER USER USER JOB 23 554251 DUAL OTHER JOBS SAME PPN 0950 14mAPRa72 09350214 v9:1501214 po:50:14 P9:5Q314 'R R E BN 29350217 Ros5RLL7 R EY R W) poss50317 @9s5a:17 18/1461 MONTR CPU TTY115 FRI . MONTR ,SET TIME MONTR 300 ‘ MONTR ,SET MONTR - SPOOL ALL MONTR ,,COMPILE MYPROG,F4 USER FORTRANS MYPROG,F4 MONTR EXIT MONTR MONTR MONTR USER 09:50:23 USER 09150123 USER 09150123 USER P9:50:123 USER @9:150123 USER 29:50:23 USER 093150123 USER eoid03223 USER goisaial USER po158323 USER 091502323 USER 09150123 USER 09150123 USER 09350123 USER “9:50123 USEK weI50:23 USER 09150223 USER 29250123 USER ve:50125 293:50:25 oetsSei2s 06 @SMITH :([1P,1461] LOG P9:149119 14-ApR-72 2 09:58:97 09150209 9150313 09350213 09150:143 OF 0ot15a127 MONTR MONTR MONTR MONTR 09150127 MONTR ,EXECUTE MYPROG,F4 LOADING MYPROG 2K EXECUTION - \ CORE 11 IS PRIME, 13 17 19 23 IS PRIME, 1S PRIME, IS PRIME, 15 PRIME, 29 IS5 PRIME, 31 IS PRIME, 41 I8 PRIME, 1S PRIME 47 18 PRIME, 37 43 IS PRIME, ‘ CPU NO TIMES: B.37 ELAPSED TIME: EXECUTIUN ERRORS OETECTED EXIT END3 JEND OF JOB 0,60 FILE IN C10|14613 - 174 - BEGINNER'S BATCH VD3P ,KJOB DSKB1iMYFOR.LOG(10,146118/W/284/B/VRE10/VS¥a20/VL3208/ 09350127 MONTR TOTAL OF 3 BLOCKS IN LPT REGUEST OTHER JOBS SAME PPN JOB 23, USER [10,1461) LOGGED OFF TTY115 @9:50328 K=OUE @9152132 KJOB @9858:34 LGOUT SAVED ALL 33 FILES (61@, DISK BLOCKS) ANOTHER JOB STILL LOGGED IN UNDER [10,1461) RUNTIME @ MIN, ©5,39 SEC 09150134 LGOUT 09:50:34 LGOUT 2915034 LGOUT 0950 14=APR=72 COBOL Example The fourth program shows a COBOL program that reads a magnetic tape and writes output on another magnetic tape. To have your magnetic tapes mounted on drives and assigned to you, you must re- quest that the operator mount them. Since you do not know which drives will be assigned to your job, you must assign them in your job with logical device names. The MOUNT command assigns the drive to your job and associates the logical name that you specify in it with the physical drive assigned. You should include a PLEASE command to the operator to tell him that you want two magnetic tape drives. If he can't let you have the drives because they are in use, you can ask him to enter your job again. Your magnetic tapes, one with the input‘data, the other blank so that you can write on it, should be given to the operator or kept at the central site, so that the operator can find your tapes. The program is as follows. IDENTIFICATICN DIVISION, ENVIRONMENT DIVISION, INPUT=0UTPUT FILE=CONTROL, SELECT SELECT DATA FILE FD 21 FO 01 INFIL, OUTFIL, ASSIGN ASSIGN MAGH, MAG2, DIVISION, SECTION, INFIL, LABEL RECORDS ARE STANDARD, VALUE OF JDENTIFICATION IS "INFIL DATY, BLOCK CONTAINS 28 RECORDS, INREC, PIC X(8@2), OUTFIL, LABEL RECORDS ARE STANDARD, VALUE OF IDENTIFICATION IS "OUTFILDAT", BLOCK CTONTAINS 12 REGCORDS, OUTREC, PIC Xx(8@), PROCEDURE START, LOOP, SECTION, DIVISICN, OPEN INPUT READ INFIL? INFIL, OUTPUT QUTFIL. AT END GO TO FIN, WRITE OUTREC FROM INREC, GO FIN, TO CLOSE STOP LOOP, OUTFIL, RUN, INFIL. =175 - BEGINNER'S BATCH The control file and the SUBMIT command to enter this program to Batchis as +PLEASE NEED TwO MAGTAPES, IF 1 »MOUNT MTASMAG1/VIDIINFIL /RONLY +MOUNT CAN'T HAVE follows. REQUEUE, THEM, MTASMAG2/VIDIOUTFIL/WENABLE +COMPILE MYPROG,CBL +EXECUTE MYPROG,CBL «DISMOUNT MAG1LS «DISMOUNT MAG2s +DELETE MYPROG,» «SUBMIT MYJOBsMYJOB,CTL The log file is shown below. 11353126 11853:26 BVERS BDATE 11353326 BASUM 11:53326 113583126 11:53:3¢ 1185330 11:53:30 11:53:30 USEK USER USER MONTR 11:53:30 MONTR MONTR MONTR MONTR 111581212 111581142 11:58:45 11858346 USER USER MONTR USER USER USER USER 554250 DUAL SAME PPN oo PLEASE MAGL MONTR USER USER USER MONTR MONTR MONTR MONTR USER USER NEED TWO MAG USER MONTR 11:58:58 12:080:07 USER USER USER TAPES, IF I MTA:MAGZ/VIDSOUTFIL/NENABL NOTIFIED (MTA2) 2 o EXECUTE MOUNTED MYPROG,CBL LOADING 1K CORE EXECUTION EXIT «.DISMOUNT MAG1?S OPERATOR NOTIFIED WAITING, s DISMOUNTED » o DISMOUNT MAG23 OPERATOR NUTKFIED WAITING, 44 MAG2 FILE IN [1@,1461! TTY103 . MOUNTED EXIT MAG1 CPU NOTIFIED WAITING, e MONTR LOG ALL (MTAL1) o « MOUNT COBOL 20=APR=72 THURS MONTR MONTR MONTR g6 #[10,1461) MTAIMAGL1/VIDSINFIL/RONLY OPERATOR MAG2 OF 300 »SET SPOOL ‘OPERATOR 118158346 113583158 TIME USER USER #SMITH 20=APR=72 »MOUNT 11857348 USEK 11:58:05 11:58:25 11:58:025 1153 «SET FOR @1 10/1464 JoB {7 OTHER JOBS MONTR MONTR 11357:25 MONTR 11:58:05 113568:95 11:58:4@5 11158:@5 »LOGIN SUBJOB CREATED AT 11852831 2 RESTART: @ MONTR MONTR INP: MYJOB(1@,1416) REQUEST UNIGUES 11:53:30 11:53:30 11:53:30 11:53:30 11:53:50 11:53:5¢2 11353:52 11884319 11:54119 11854321 11854322 11854:25 11:57:23 11857323 111587323 118571325 11357125 11357325 BATCON 7(53) QU= APR=?72 DISMDUNTED CAN'T HAVE THEM, REQUEUE -176 - BEGINNER'S BATCH 123043007 MONTR 12368307 MONTKR 12:W@337 MONTR 1230021¢ k=GLE 12320114 KJOE 123042817 LGOUT 12:2¢218 LGOLT 12:00:18 LGOLT 120318 LGOUT 12322816 LPMSEG 5.2 _KJOB DSKodiMYJOB,LOG(12,1461)2/W/284/B8/VREL1B/VE20QYVLI20C/VPE1B/VD TOTAL OF 4 SLOCKS IN LPT REQUEST GThER JUBS SAME PPN JGB 17, USER [12,1461) LOGGED QFF TTY1R3 SAVED ALL 38 FILES (b45, DISK BLOCKS) 12¢2 2@=APR=72 ANUTHER JOE STILL LOLGED IN UNDER (14,1461)1 ® RUNTIME O MIN, 86,39 SkC LFTSPL VERSION 4A(141) RUNNING ON LPTQ USING CARDS TO ENTER JOBS ALGOL Example The first job is a simple ALGOL program that writes its output into the log file because it has statements that would cause it normally to write to the terminal. The program is as follows. BEGIN REAL X; X INTEGER ; =1 FOR | :=1 UNTIL 1000 DO X := X+I; PRINT(X); END The cards to enter this program are as follows. - OF-FILE |END + EXECUTE $eE0D [V—— =—— /'/ / ALGOL PROGRAM $ALGOL MYPROG. ALG/NOLIST $PASSWORD ABCD $408 ALGYB [10,1461] 10 $SEQUENCE 10-0925 The control file that MPB makes up for you contains the following commands. .COMPILE MYPROG .ALG /COMPILE /LIST .EXECUTE The output, including the log file is shown below. -177 - 093011343 DATE 09:01:43 CARD §3=APR=72 STSUM END 09:01153 BATCON 09101853 BVERS BDATE BASUM 09381353 MONTR 29:01:53 MONTR 29:01:58 USER USER USER MONTR 29101158 ve:01:58 09101258 Boiv1158 0o301:58 p9:01:58 P9:01:59 6o:R1159 09102101 vei02:01 09:02:08 BozR2:08 @9:02:08 ve:02:08 a9302:08 MONTR MONTR MONTR MONTR MONTR MONTR MONTR USER MONTR MONTR MONTR MONTR posa2;:08 MONTR 0oto2:10 USER po:azs27 USER 0o102:39 USER 09302:39 USER 29:082:39 USER 9:02:41 USER p9to241 s vwotn2:41 90214} Pp9sa2:41 0Vo1@2:41 B9i02:41 BoR2141 USER USER USER USER USER USER CORSTK VER "12(26) OF FILE AFTER 12 CARDS, 7(52) INPt SUBJOB 13=APR=72 ALGJB(10,1461) FOR REGUEST CREATED AT UNIQUE: 2 RESTART: CPU 13=APR=w72 «SET TIME «SET SPOOL @2 FILES, 03 BLKS OF 06 w#+[13,1461) LOG FILE 09121108 13=APRa72 1§ LOGIN 10,1464 JoB 13 55425E DUAL OTHER JOBS SAME PPN poay B3 DSk IN [10,1461) TTY115 THUR 300 ALL $J0B ALGJBL10/1461) $ALGOL MYPROG,ALG/NOLIST LCOMP ALGOLI /COMPILE MYPROG MYPROG,ALG /N fCREATED BY CDRSTK EXIT ;EOD - «EXECUTE ALGOLS: MYPROG LOADING MYPROG 1K CORE EXECUTION 5,00801008& 5 END OF EXECUTION EXECUTION ELAPSED TIME: TIME: = 1K CORE 2,08 SECS, .12 SECS, MONTR MONTR B9s02:42 USER potp2:4y Boie2142 09:02:43 09302:43 0etD2:43 09122243 093102144 09102145 55425E DUAL. CPU $J0B ALGJB(1O8/1461) $SALGOL MYPROG,ALG/NOLIST B93iR11:45 Bo:01:53 BEGINNER'S BATCH XFIN? .DEL MYPRQG, REL,MYPRUG.ALG FILES DELTED. USER USER MYPROG,.REL MYPROG,.ALG USER @2 MONTR MONTR MONTR KeQUE BLOCKS FREED :KJOB DSKBIALGJB,LOG(11¥,1461)9/W/284/B/VS83320/VL210/VD2D TOTAL OF 4 BLOCKS IN LPT REQUEST BEGINNER'S BATCH -178 - BASIC Example The next example shows entering a BASIC program. You must include the program after a $DECK card so that it will be copied into a file on disk. No $DATA card can be used because BASIC does not use the EXECUTE command and because the data is entered in the control file. The program requests data when it is running; it finds the data in the control file. The final data item must be 2 so that the program can be concluded. The progfam is shown below. 5 10 20 INPUTD 110 IFD=2THEN | 30 40 50 60 3 STEP D FOR X =0TO IF SIN(X) =M THEM 80 = X LET X0 90 100 PRINT X0, M, D GOTO S5 END 80 110 | PRINT "X VALUE", "'SINE'", ""RESOLUTION"" LET M= SIN(X) NEXT X The cards to enter the program and run it are as follows. ' END-OF-FILE *BYE 2 .001 .01 A *RUN #DSK:MYBAS.BAS *0LD . R BASIC $DECK MYBAS.BAS SPASSWORD ABCD $s08 BASJOB [10,1461] 7 §SEQUENCE 10 10-0926 The output from the program will be printed in the log file because it would normally be printed on the terminal. The log file is shown below. 5-10 -179 - 11112445 11817145 11112146 DATE CARD STSUM 11118149 BVERS BOATE 11130149 11112149 BASUM 11840149 MONTR 11110149 MONTR 11:174151 111192452 111197153 11112583 11112153 USER 11112153 11112153 MONTR MONTR 11112153 MONTR 11110351 MONTR MONTR USER USER 11117356 11119156 111191586 1111256 118172158 11212156 11112457 111124187 11312459 USER USER 11111423 11111103 JOBS OTHER SUBYOB SaAME DUAL PPN 01 OPU 13mAPRe72 @3 FILES., OF 14 24 gLKS IN [18:1461] TTY114 THUR .SET TIME 307 .SET SPOOL ALL. $J0B BASJOBL1p/1461) $DECY MYBAS.BAS NEW OLD OR QOLDe-agLD FILE NAMEP-w#DSKIMYBAS READY #RUN USER MYBAS USER 11110 13=-APR-72 SINE RESOLUTION USER USER USER USER USER USER USER 1134120 -USER 114114103 11111123 : CARDS, BASJOBL12,1461) FOR #e[1@,14611 LOG FILE REQUEST CREATED AT 11189:57 13 APR=72 UNITQUEY 2 RESTARTI 1 USER USER USER 111159 USER USER 11114100 USER 11111100 USER 11111100 USER 111143100 USER 11411120 USER 11111101 INP: 24 USER 11112459 1111108 AFTER BATCAN 7(3521 13=pPR~72 .1 X VALUE 3 11410187 ‘USER 11112159 FILE 11la USER MONTR 11112153 113172154 11112156 OF USER 11112153 111193155 END 55425F DUAL CPU CORSTK VER 12 (26) DSK BASJOBL1g/1461] LOGIN 12,1441 JOB 19 25425E MONTR 11112154 $JOR USER 11110153 11:17:55 11110155 13=APR=72 BEGINNER'S BATCH USER USER USER USER USER MONTR X ,14112 VALUE SINE 3. .02 X RESQLUTION 2.01 g,14112¢ _ SINE VALUE 2,99999 12 TIMEY 2.1 RESQLUTION 2,14113 g.001 1,52 SECS. READY 4BYE JOB 19+ . USER ([1@,1461) LOGGED SAVED ALL 33 FILED (6Q@, ANOTHER RUNTIME JOB STILL LOGGED 2 MIN, 03,25 SEC OFF TTY114 DISK BLOCKS). IN UNDER L[1#,14611 1111 13-APRw72 - 180 - BEGINNER'S BATCH FORTRAN Example The third example shows a FORTRAN program that prints output on the line printer. In the control file, you want to tell Batch to punch your relocatable binary program if it executes correctly. Otherwise, you want to end your job so that you can find your error from the message in the log file. The program is shown below. C THIS PROGRAM CALCULATES PRIME NUMBERS FROM 11 TO 50. 4 J=1 J=)42 A=J/ DO 10 I=11, 50, 2 A=l/A L=1/J B=A-L 5 10 105 IF (B) 5,10,5 IF (J.LT.SQRT(FLOAT(I))) GO TO 4 PRINT 105, CONTINUE FORMAT (4, ' IS PRIME. ) END The cards used to enter this program are as follows. :END-OF-FILE END:: ;END OF JOB || | . REL *CDP:MYPROG=DSK:MYPROG *R PIP $ERROR.GOTO END *EXECUTE $FORTRAN MYPROG.F4 $PASSWORD ABCD $JOE TEST [10,1461] /CARDS: 1K SSEQUENCE 10 10-0927 - 181 - BEGINNER'S BATCH Batch puts the following commands into the control file as a result of the cards you entered. .COMPILE MYPROG.F4 /COMPILE /LIST .EXECUTE MYPROG.REL /MAP:MAP.LPT .IF (ERROR) .GOTO END . .R PIP *CDP:MYPROG = DSK:MYPROG. REL END: : ;END OF JOB The printed output from the job, including the log file is shown below. \MYPROG,F4 Fa4g ves 00 122 APR-72 12 13143 PAGE 1 1=11,59,2 J=1 4 JzJe2 Az | AzT/a L=1/J T 5 125 SUBPROGRAMS JOBFF (B) IF (Js_TySORYT 5,10,% TYPE 195,11 CONTINJE FORMAT (14, END 13 FORSE, IF FLOAT SQRT (FLOAT '#IS (1))) GO TO 4 PRIME.") INTQ, INTI. EXIT SCALARS 1 61 N| 62 A 63 L 13143121 DATE 12-APRTM72 13143;21 CARD $J0R 13143103 STSUM END OF FILE AFTER BVERS BATCCN 7(52) [NP! BDATE BASUM 12-APR~72 TEST[1Y,1461 FOR 7 #wl(1@,1461) LOG FILE REAUEST CREATYED AT 13:42:24 12-pAPR-72 13142121 13443121 13143:21 554448 DUAL TEST(10,1461]/CARDt1K UNIQUE?® 13143121 MONTR 131431214 13143124 MONTR USER 13143124 USER 131433126 13143128 USER MONTR 13143328 13143328 13143128 13143128 13143:28 MONTR MONTR MONTR MONTR MONTR . ,LOGIN 2 RESTART: 19 CARDS, SUBJOB @1 CPU CDRSTK 03 FILES, OF 14 1 10,1461 JOB 11 554448 DUYAL CPU TTYL1D2 OTHER J(OBS SAME PPN 1343 12aADPRw72 WED ; +SET TIME 20 ,SET SPOOL A_L , $J0p TEST(10,14611/CARDI1K SFORTRAN MYP=206G.F4 64 24 IN VER BLKS B 12(26) \ [19,1461) 65 DSk BEGINNER'S BATCH 13143,;28 13143;3¢ 13143333 13143133 13147133 MONTR USER MONTR MONTR MONTR 13143133 MONTR 13143333 13143:34 MONTR 13143137 13143143 13143141 13143342 13143:42 13143342 13143142 13143142 13143142 13143342 13143142 13143142 13143143 13:43143 13143143 13143143 13143:43 13143143 13143443 131433143 13143343 13143143 13143143 13143143 13143443 - 182 - ,COMP /COMPI_F MYPROG,F4/LIST MY3ROG.F4 FORTRANS CDRSTK SEOD USER USER USER OEXECUIE FORTRAN} MYSROG.F4 USER MYPROG CORg USER EXECUTION USER USER USER USER USER USER USER USER USER USER USER USER USER USER USER MONTR MONTR MONTR MONTR USER MONTR 13143144 MUONTR 13143144 13143144 USER USER 13143145 13143146 13143146 13143145 13143146 1314348 USER 13143154 13143154 131433157 13144:p2 13144109 BY ExIT LOADING USER USER 2K 11 13 17 19 23 1S 1S 1S 1S 1S PRIME . 29 31 37 1S 18 18 PRIME., 41 1S 43 19 47 1S CPU NO PRIME. . PRIME PRIME . PRIME, PRIME., PRIME. PRIME, PRIME. PRIME., TIME: ELAPSED Q.27 EXECUTION gRRORS TIME: 1.82 DETECTED EXIT «R PIP sCDPt MYPROGuDSKIMYPROG,REL END: 13143348 13143352 13143154 13143:54 iCREATED JEND OF JOB “FEING +OEL MYPROG.REL FILES DELETED: MYPROG.FA4 +KJOB USKBITEST.LOGL10,14610/W/234/P/VS3277/VL228,/VDID MYPROGRE(| MYPROG:F4 73 gLOCKS FREED MONTR MONTR MONTR KeQUE KJOB LGOUT LGOUT LGOUT LGOUT L.PMSG LPMSG LPMSG TOTAL OF 6 BLpCKS IN LPT REQUEST OTHER JOQBS SAME PPN JOB 11+ USER [10,1461) LOGGED OFF SAVED ALl 3@ FILES (585, ANOTHER JCB STILL LOGGED RUNTIME @ MIN, 25,64 DEC TTY1R2 LPTSPL VERSION 4A(141) RUNNING ON LPT1 JOB TEST FILZ DSKBLIMYPROG.LSTC(1@,1461] DSKB1IMYPROG, STL10,1461] 1343 12-APRae72 | DISK BLOCKS) IN UNDER [1@,14613 DONE FOR [1B,1461] STARTED - 183 - BEGINNER'S BATCH COBOL Example | The fourth program shows a COBOL program that reads data from a magentic tape and writes output on another magnetic tape. To have your magnetic tapes mounted on drives and assigned to you, you must request that the operator mount them. Since you do not know which drives will be assigned to your job, you must assign them in your job with logical device names. The MOUNT command assigns the drive to your job and associates the logical name that you specify in it with the physical drive assigned. You should include a PLEASE command to the o?erator to tell him that you want two magnetic tape drives. If he can't let you have the drives because they are in use, you can ask him to enter your job again. Your magnetic tapes, one with the input data, the other blank so that you can write on it, should be given to the operator with your card deck or kept at the central site, so that the operator can find your tapes. The program is as follows. IDENTIFICATION DIVISION. ENVIRONMENT DIVISION., INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT INFIL, ASSIGN MAGT. SELECT OUTFIL, ASSIGN MAG?2. DATA DIVISION. FILE SECTION. FD INFIL, LABEL RECORDS ARE STANDARD, VALUE OF IDENTIFICATION IS ""INFIL DAT"*, BLOCK CONTAINS 20 RECORDS. 01 INREC, PIC X(80). | FD OUTFIL, LABEL RECORDS ARE STANDARD, VALUE OF IDENTIFICATION IS "'OUTFILDAT", BLOCK CONTAINS 12 RECORDS. 01 OUTREC, PIC X(80). PROCEDURE DIVISION. START. - OPEN INPUT INFIL, OUTPUT QUTFIL. LOOP., READ INFIL; AT END GO TO FIN. WRITE OUTREC FROM INREC. GO TO LOOP., FIN. CLOSE OUTFIL, INFIL. STOP RUN. The cards to enter this job are shown below. BEGINNER'S BATCH - 184 - i l «DISMOUNT MAG2: L $COBOL MYPROG.CBL «MOUNT MTA:MAG2/VID'OUTFIL /WENABCI «MOUNT MTA:MAG1/VID!INFIL/RONLY l <PLEASE NEED TWO MAGTAPES ] $PASSWORD ABCD | I $J0B COBJOB [10,1461] $SEQUENCE 10 10-0928 Batch puts the following commands into the control file for you. .PLEASE NEED TWO MAG TAPES, IF | CAN'T HAVE THEM, REQUEUE. .MOUNT MTA:MAG1/VID:INFIL /RONLY . MOUNT MTA:MAG2/VID:OUTFIL /WENABL .COMPILE /COMPILE MYPROG.CBL /LIST .EXECUTE MYPROG .REL /MAP:MAP.LPT .DISMOUNT MAGH1: .DISMOUNT MAG2: The printed output from your job is shown below. 221442 MAP ]S THE LUW 45142 20=APR=72 STORAGE M4P STARTING ADDRESS BREAK SEGMENT n34406 ®ROG COBOL tCOMM, “9z.40 291240 COBOL 4012Qu START, a21317 231406 ALTER, MONEY, TRACZ, TRACFD 28148/ BTRAC, TRPOP, 200143 325147 AA2154 220973 7214692 FIl,ES. OVRFN. MEMRY. AwNM-. PTFLG. 221960 COBOL 41K CORE, <25 w4IRUS LOANER USED 2+4K CORE FREZ “FILE MYPROG ©00014@¢ 000144 USES. POINT, @00152 TRaCi. pagLss %DT. ’ 001461 TRACE. . 208141 208145 000132 20156 @8@1457 SEGWD. COMMA, TRaCZ2. %PR., TRPD. pEEL42 072146 739153 gre157 71460 - 185 - PROG R CoBolL AM 15141 eooy 2002 2003 2204 P225 BoR6 LY poCs 0209 0210 PAGE 8013 Rp2y 0221 B@22 0p23 0p24 0025 0226 eg27 NO FILE SECTION., INFIL) LABEL FD REZQRDS VALUE oF BLOCK CONTAINS INREC, 81 FO ASSIGN MAG1, ASSIGN MAG2, 2¢ PJC x(80), VALUE OF IDENTIFICATION g1 PROCEDURE DIVISION, START. OPEN INPUT INFIL, LOOP REAU INFIL) AT OUTPUT ENp WRITE OUTREC FROM FIN, GO To LQOP, CLOSE OuTFIL, STOP RUN, GO QUTFIL, 554282 DUAL INFIL. DETECIED DATE CARD 20=APR=72° $J0B COBJOBL1p/1461) BVERS BOATE BASUM BATCON 7(53) 23=APR"72 - INP: OF COB 0BL10,1461) REQUEST 15133118 15139189 15139159 DAT", "OUTFILDAT", FIN, AFTER 15138318 "INFIL 70 INREG, 15137146 15137146 15137146 15137184 15138147 IS BLOCK cONTAINS 12 RECORDS. OUTREC, PIO X(Bfl)t ' FILE 15137154 15137154 15137154 IS OUTFIL, LABEL RECORDS ARE STANDARD,. END 1513750 15137153 15137153 15137153 1513754 STANDARD, RECORDS. STSUM 15137148 ‘ ARE IDENTIFJCATION 15137138 15137146 15137146 20=APR=72 DIVIS]ON, SELECT QUTFIL, DATA DIVISION, ERRORS 15137137 15137137 3(43) 3 FILE=CONTROL, SELECT INFIL, e@15 2018 P21 CoBolL INPUT-QUTPUT SECT]ON, 2214 2016 PR17 « IDENTIFICATION DIVISIpN, ENVIRONMENT eg11 0912 BEGINNER'S BATCH MONTR MONTR USER USER USER UNIQUEY +LOGIN JOB 24 OTHER - 1537 CREATED 2 AT 1 FILES, DYAL CPU VER 12(26) 86 DgK BLKS 06 0G FILE 20-APR-72 IN (10,1461 TTY103 PPN 20wAPRu72 THUR MONTR +SET TIME MONTR +SET SPOOL $J0B COBJOBL1p/1461) MONTR DSRSTK #8[10,14611 MONTR MCNTR B4 21 OF 15136134 REgTARTS SaME CARDS:, SUBJOB . FOR 10/1461 354250 JOBS 37 CPU 302 ALL MONTR MONTR MONTR USER USER USER USER «PLEASE NEED TWO MAG TAPES, IF CAN'T «MOUNT MTAIMAGA/VIDIINFIL/RONOLY OPERATOR NOTIFIED NAITINGogo MAG1 (MTAZ) MOUNTED 5-17 HAVE THEM, REQUEUE, - 186 BEGINNER'S BATCH 15139159 MONTR 15142121 USER 15141131 USER USER 18140:01 15141:31 USER" 15141131 MONTR 15144:31 1514135 1514159 1%141:59 MONTR 15141159 15144159 15141159 1%141159 USER MONTR MONTR MONTR MONTR MONTR USER USER 15142125 USER 151423026 UStR 15142127 USER 15142109 15142:09 MONTR MONTR MONTR 15142:29 MONTR 15142129 15142109 MONTR USER 15142310 USER 15142429 USER 15142129 15142329 15142134 15142131 MAG2 NOTIFIED MQUNTED (MTAL) MYPROS,CBL $COBOL ,COMP /7COMPI_g MYPRJG,CBL/LIST ;CREATED BY CDRSTk cosol EXIT EDATA MONTR 15142104 151421324 15142129 « e MOUNT MTAIWAG2/VID:OUTFIL/WENABL OPERATOR MONTR MONTR USER USER 15142347 15142347 USER 15142147 MONTR 15142147 1514251 15842153 MONTR ;CREATED BY CDRSTk +SET CUR QAA,CDR W EXEC . /MAPIVAP.LPT /REL MYPROG.REL LOADING 271462 1S THE LOW ' ICREATED BY CORSTK SEGMENT BREAK CoBolL 1k CORE EXEQUTION EXIY BSEOD «OISMOUNT MAG1I OPERATOR NOTIFIED WAITING,,, DISMOUNTED MAG1 Mag2: ., DISMOUNT OPERATOR NOTIFIED ¢ WATTING, MAG2 DISMOUNTED MONTR XFINY USER USER OEL MYPROG.RgLQAA,CDR,MYPROG.CBL FILES DELETE?D: MYPROG «REL, GAA,CDR 15142157 15142159 USER UsSER 153471022 USEK 15143%: 21 MONTR 15:43:€C1 15143:81 MONTR MONTR 15143123 KwQUE TOTAL OF 9 B_pCKS 151413142 15143143 Leaut LGCUT 15443:13 LAOUT SAVED ALL 43 FILES (855, 15143343 LGoUT RUNTIME @ MIN, 15:441027 LPMSG 190441145 15344125 1514425 LPMSGO JOR COBJUOB FILE DSKBLIMYPROG.LSTL10,1461) FQR [12,Y461]STARTED 153142129 15144135 KJCB LPMSG LPMSG LeM3G MYPROGCBL #7 gLOCKS FREE KJOE USKB!CDBJOB.LOGE12.1461]=/1/Z:4/B/VS:bZB/VLz2®fl/vafi0 OTHER IN LPT REQUEST JOBS SAME PPN JOB 24, USER [18.1461) ANOTHER JOB STILL LOGGED 07,14 SEC LOGGED OFF TTY1B3 DISK BLOCKS) 1543 2@-APRw72 IN UNDER [12,1461] LPTSPL VERSIIN 4A(141) RUNNING ON LPTEZ DSKR1iMYPRCG, STCL1A,1461] DONE . JOR COBJNB F1L_F DSKB1IMAP.LPT[18,1461] FOR [38,1461] STARTED DSKRLIMAP,LPT[106.,1461] DONE 5-18
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies