Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Compiling and linking a program

&pagelevel(5)&pagelevel

The COBOL.PROG program is to be compiled. It is a very complex program and compilation takes a relatively long time. The programmer would like to use this “waiting time” for other activities and starts compiling in an SDF-P command block in interactive mode (the programmer does not write a procedure because it is certain that the program no longer contains any errors and, therefore, this exact command sequence will not have to be entered again).

The programmer enters the following commands interactively:

/BEGIN-BLOCK
/ASSIGN-SYSDTA *SYSCMD
/START-EXE $COBOL85, MONJV = MJV
/SEND-DATA '*COMOPT ...'
/SEND-DATA '*END'
/IF (SUBSTR(JV('MJV'), 1, 2) EQ '$T')
/START-LMS
//...
//...
//END
/ELSE; PRINT-DOC COMPIL.LIST
/END-IF
/END-BLOCK

Since the entire command sequence is embedded in a BEGIN block, each line can be terminated with .

Program compilation is to be monitored by the monitor JV MJV (MONJV=MJV).

Following compilation, the contents of the monitor JV are to be evaluated and checked in the IF request. If the monitor JV contains $T, compilation was error-free and the program can be imported to the program library: the LMS utility is called.

If an error occurred during compilation (contents of MJV do not equal $T), the compilation log must be printed out.

The END-IF and END-BLOCK commands terminate the two command blocks nested one inside the other. Following END-BLOCK, command block execution is activated.