To compile your program under TSO, use the commands, ALLOCATE and CALL. Under TSO, you can use TSO commands or command lists (CLIST) or 1SPF to compile your program.
Allocating Compilation Data Sets—ALLOCATE Command
First, allocate the data sets you need for compilation, as shown in the following listing:
You can enter these ALLOCATE commands in any order. However, you must enter all of them before you start to compile. (Good programming practice dictates that you free your files before you allocate them.)
Requesting Compilation-CALL Command
After you have allocated the data sets, issue a CALL command requesting compilation. To request compilation using the default compiler options, enter:
You can also put the commands for allocating data sets in a CLIST.
A sequence of separate COBOL programs may be compiled with a single invocation of the compiler. The object programs produced from this compilation may be link-edited into either one load module or separate load modules. The NAME compiler option may be used for this.
Each program in the sequence must be terminated by an END PROGRAM header, except the last program in the batch (for which the END PROGRAM header is optional). CBL/PROCESS statements may optionally precede each program in the sequence.
If the END PROGRAM header is omitted from a program (other than the last program in a sequence of separate programs), the next program in the sequence will be nested within the preceding program. In this case, an intervening PROCESS statement will cause the generation of error diagnostics. An intervening CBL statement will also cause the generation of error diagnostics unless the CBL statement is coded entirely within the sequence number area (columns 1 through 6). In this case, no diagnostic message will be issued for the CBL statement because it is considered a label for the source statement line.
Options for each program in the sequence may be specified in the installation default macro, on the invocation of the compiler, and on CBL/PROCESS statements preceding a program. The following rules hold for options in a batch compile:
If the current program does not contain CBl/PROCESS statements, then the settings of options that were in effect for the previous program are used. If a CBL/PROCESS statement is specified in the current program, the CBL/PROCESS statements are resolved together with the options in effect prior to the first program.
Required Compiler Data Sets
Basic compilation requires the following data sets:
If you are requesting specific compilation features, specify the following data sets (through DD statements):
Logical Record Length and Block Size for Compiler Data Sets
For compiler data sets other than the work data sets, block size can be specified by using the BLKSIZE sub-parameter of the DCB parameter. The value specified must be permissible for the device on which the data set resides. LRECL equals the logical record length, and BLKSIZE equals LRECL multiplied by n, where it is equal to the blocking factor. The logical record lengths for the compiler data sets have the following default values and should not be changed:
Defining the Source Code Data Set-SYSIN
Define the data set that contains your source code with the SYSIN DD statement.
You can place your source code or BASIS statement directly in the input stream. If you do so, use this SYSIN DD statement:
When you use the DD convention, the source code or BASIS statement must follow the statement. If another job step follows the compilation, the EXEC statement for that step follows the /* statement or the last source statement.
Defining the Output Data Set-SYSPRINT
This data set is used by the compiler to produce a listing. Output may be directed to a printer, a direct access device, or a magnetic-tape device. The listing will include the results of the default or specified options of the PARM parameter (that is, diagnostic messages, the object code listing). For example:
Directing Compiler Messages to Your Terminal—SYSTERM
Define the SYSTERM data set to send compiler messages to your terminal.
SYSTERM can be defined as a SYSOUT data set, as a data set on disk or to another print class, and so on.
Add the SYSLIB DD statements if your program contains COPY or BASIS statements. These DD statements define the libraries (partitioned data sets) that contain the data requested by COPY statements (in the source code) or by a BASIS statement in the input stream.
You don't need the SYSLIB DD statement if the NOLIB option is in effect. Concatenate multiple DD statements if you have multiple copy or basis libraries. Libraries are kept on direct-access storage devices. For example:
Creating Object Code-SYSLIN or SYSPUNCH
When using the OBJECT compiler option, you can store the object code on disk or tape. The compiler uses the file you define in the SYSLIN or SYSPUNCH DD statement to store the object code. You don't need the SYSLIN DD statement if the NOOBJECT option is in effect.
Through the DJSP parameter of the SYSLIN DD statement, you can specify whether the object code data set is to be:
In the example above, the data is created and passed to another job step, the linkage editor job step. Your installation may use the DECK option and the SYSPUNCH DD statement. An example of the SYSPUNCH DD statement follows.
'B' is the standard output class for punch data sets. You don't need the SYSPUNCH DD statement if the NODECK option is in effect.
Cataloged Procedures Make Compiling Simpler
A cataloged procedure is a set of job control statements placed in a partitioned data set called the procedure library (SYS1.PROCLIB). Using cataloged procedures can save you some JCL coding. To use a cataloged procedure, specify it in an EXEC statement in your job control procedure.
IBM Mainframe Related Interview Questions
|IBM Lotus Notes Interview Questions||IBM-CICS Interview Questions|
|COBOL Interview Questions||Linux Interview Questions|
|IBM-JCL Interview Questions||IBM Mainframe Interview Questions|
|IBM AIX Interview Questions||IBM WAS Administration Interview Questions|
|IBM Lotus Domino Interview Questions||IBM Integration Bus Interview Questions|
|Mainframe DB2 Interview Questions||Unix Production Support Interview Questions|
Ibm Mainframe Tutorial
Introduction To Software Development
Introduction To Ibm Mainframes
Tso And Ispf
Jes2, ]es3 And Sms
Introduction To Job Control Language (jcl)
The Job Statement
The Exec Statement
The Job And Exec Statements
The Dd Statement
Procedures And Symbolic Parameters
Generation Data Groups (gdg), Compile/link-edit And Run Jcls
Access Method Services (ams)
Additional Vsam Commands
Introduction To Rexx
Overview Of Rexx
Introduction To Cics
Exception Handling In Cics
Developing A Cics Application
Cics Programming Techniques
Basic Mapping Support (bms)
Transient Data Control
Temporary Storage Control
Interval And Task Control
Cics Application Design
Recovery And Restart
System Security And Intersystem Communication
Cics Debugging Facilities And Techniques
Bms Map Definition Macros And Copylib Members
Cics Response And Abend Codes
Data, Information And Information Processing
Introduction To Database Management Systems
Introduction To Relational Database Management Systems
Database Architecture And Data Modeling
Overview Of Db2
Structured Query Language (sql)
Data Security And Access
Db2 Application Development
Qmf And Db2i
Db2 Performance Monitoring, Utilities And Recovery/restart
Overview Of Information Management System (ims)
Introduction To Vs Cobol Ii
Overview Of Application Development In Vs Cobol Ii
Overview Of The Cobol Program
Sorting And Merging Files
Coding Cobol Programs That Run Under Cics. Ims, Db2 And Ispf
Compiling The Program
Link-editing The Program
Executing The Program
Improving Program Performance
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.