PP2 can be invoked as a:
- z/OS batch program using a JCL (job control language) procedure
- z/OS TSO batch or TSO online program, either directly or using a CLIST
Operating PP2 in an IBM z/OS mainframe environment involves these files:
File Name | Usage | Requirement |
---|---|---|
SYSLIB | Library input | Required if the embedded SQL INCLUDE text name statement is used and PP2 is executing in the z/OS environment. |
SYSIN | Source input | Mandatory |
SYSPRINT | Listing | Required unless the NOPRINT option is specified. z/OS JCL must define DCB information for LRECL, RECFM and BLKSIZE parameters. |
SYSTERM | Diagnostics | Required if the TERM option is present. z/OS JCL must define DCB information for LRECL, RECFM and BLKSIZE parameters. |
SYSPUNCH | Source output | Required unless the NOPUNCH option is specified. z/OS JCL must define DCB information for LRECL, RECFM and BLKSIZE parameters. |
SYSUT1 | Work file 1 | z/OS JCL must define DCB information for LRECL, RECFM and BLKSIZE parameters. Required for C and COBOL precompilation. |
z/OS Batch
When running PP2 in the z/OS batch environment, use standard z/OS job control language (JCL).
The next example shows preprocessor invocation JCL stream for the COBOL preprocessor. Line numbers relate to the notes following the code and are not part of the JCL syntax.
//PRECOMP JOB (job statement information) 1 //PRECOMP EXEC PGM=PPBMAIN, // PARM=’option option’ 2 //STEPLIB DD DSN=TERADATA.TRLOAD,DISP=SHR 3 //DD DSN=TERADATA.APPLOAD,DISP=SHR 4 //SYSPRINT DD SYSOUT=*, //DCB=(LRECL=133,RECFM=FBA,BLKSIZE=1330) 5 //SYSTERM DD DUMMY 6 //SYSLIB DD DSN=customer.include.library,DISP=SHR 7 //SYSPUNCH DD DSN=customer.compiler.input, // UNIT=SYSDA,SPACE=(TRK,(5,5)), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=3600) // DISP=(NEW,CATLG) 8 //SYSIN DD DSN=customer.preproc.input,DISP=SHR 9 //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(5,2)), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=3600) //
Consider the following points.
- The PARM field specifies the options to be used by the preprocessor; within the PARM field, separate options by commas or blanks.
For details on the options, see PP2 Options.
- This STEPLIB partitioned data set is the Teradata-supplied C runtime library.
- This STEPLIB partitioned data set contains the preprocessor load module:
- PPBMAIN (COBOL)
- PPIMAIN (PL/I)
- PPCMAIN (C)
- SYSPRINT receives the preprocessor listing. SYSPRINT is required unless the NOPRINT option is specified.
The required DCB parameters are:
- LRECL
- RECFM
- BLKSIZE
- SYSTERM receives the preprocessor diagnostics, separated from the preprocessor listing.
SYSTERM is required when the TERM option is specified.
The required DCB parameters are:
- LRECL
- RECFM
- BLKSIZE
- The SYSLIB partitioned data set contains the preprocessor include members.
SYSLIB is required if the embedded SQL INCLUDE text name statement is used.
- SYSPUNCH receives the precompiler source. SYSPUNCH is required unless the NOPUNCH option is specified.
SYSPUNCH might be temporary if the appropriate host language compiler is invoked in a following job step.
The required DCB parameters are:
- LRECL
- RECFM
- BLKSIZE
- SYSIN contains the preprocessor source input.
SYSUT1 is a preprocessor work file.
UNIT=VIO may be used instead of UNIT=SYSDA.
The required DCB parameters are:
- LRECL
- RECFM
- BLKSIZE
Required for C and COBOL precompilation.
z/OS TSO
When running PP2 in an z/OS TSO environment, use standard TSO commands. To simplify this process, create a command list.
The next example shows a preprocessor invocation command stream for COBOL. Line numbers relate to the notes following the code and are not part of the syntax.
ATTR VBA1330 RECFM(V,B,A) LRECL(133) BLKSIZE(1330) ATTR F80 RECFM(F) LRECL(80) BLKSIZE(80) ATTR FB3120 RECFM(F,B) LRECL(80) BLKSIZE(3120) 1 ALLOCATE DDNAME(CTRANS) DATASET(’TERADATA.TRLOAD’) SHR 2 ALLOCATE DDNAME(SYSPRINT) SYSOUT(A) USING(VBA1330) 3 ALLOCATE DDNAME(SYSTERM) DATASET(*) USING(F80) 4 ALLOCATE DDNAME(SYSLIB) + DATASET(’customer.include.library’) SHR 5 ALLOCATEDDNAME(SYSPUNCH) + DATASET(’customer.fompiler.input’) NEW + TRACKS SPACE(5,5) USING(FB3120) 6 ALLOCATEDDNAME(SYSIN) + DATASET(’customer.preproc.input’) SHR 7 ALLOCATEDDNAME(SYSUT1) NEW BLOCK(1024) SPACE(50,50) 8 CALL ’TERADATA.APPLOAD(PPBMAIN)’ + ’option option’ FREE DDNAME(CTRANS) FREE DDNAME(SYSPRINT) FREE DDNAME(SYSTERM) FREE DDNAME(SYSLIB) FREE DDNAME(SYSPUNCH) FREE DDNAME(SYSIN) FREE DDNAME(SYSUT1) FREE ATTRL(VBA1330) FREE ATTRL(F80) FREE ATTRL(FB3120)
Consider the following points.
- The CTRANS data set is the Teradata-supplied C runtime library.
- The SYSPRINT data set receives the preprocessor listing.
SYSPRINT is required unless the NOPRINT option is specified.
- The SYSTERM data set receives the preprocessor diagnostics, separated from the preprocessor listing.
SYSTERM is required only if the TERM option is specified.
- The SYSLIB partitioned data set contains the preprocessor include members.
SYSLIB is required only if the embedded SQL INCLUDE text name statement is specified.
- The SYSPUNCH data set receives the precompiler source.
SYSPUNCH is required unless the NOPUNCH option is specified.
- The SYSIN data set contains the preprocessor source input.
- The SYSUT1 data set is a preprocessor work file.
- TERADATA.APPLOAD contains the preprocessor load module - PPBMAIN (COBOL), PPIMAIN (PL/I) or PPCMAIN (C).
The CALL parameter specifies the PP2 options to be used; within the parameter, separate options by commas or blanks.
For details on the options, see PP2 Options.