z/OS ISPF Software Configuration and Library Manager Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Sample JCL conversion

z/OS ISPF Software Configuration and Library Manager Guide and Reference
SC19-3625-00

This section contains commented sample JCL and language definitions that perform the same tasks: invoking the CICS® preprocessor and then invoking the OS COBOL compiler to produce an object module. Figure 1 contains the JCL used to accomplish these tasks; Figure 3 contains the equivalent SCLM language definition. Each sample contains comments with step numbers. The step descriptions that follow relate a line or command from the JCL to the equivalent SCLM language definition macro, option, or command.

  1. The JCL has a job step named TRN, which is the first translator called in this job.

    SCLM uses an FLMTRNSL macro to call this translator. This is the first FLMTRNSL macro for build in the language definition.

  2. Job step TRN executes a program called DFHECP1$, the CICS preprocessor for COBOL.

    SCLM uses the COMPILE=DFHECP1$ statement on the FLMTRNSL macro.

  3. The STEPLIB line in job step TRN tells the job where to find the program DFHECP1$.

    SCLM uses the DSNAME option on the FLMTRNSL macro. Both the STEPLIB and DSNAME point to the same data set, CICS.TS31.CICS.SDFHLOAD.

  4. The SYSIN statement defines the data set that contains the member to compile.

    SCLM uses an FLMALLOC macro to allocate the SYSIN data set to a ddname for the CICS preprocessor. Because we are using PORDER=1, the FLMALLOC macro assigns the ddname, SYSIN, that the CICS preprocessor is expecting.

  5. The TRN job step sends the preprocessor listing to the printer using the SYSPRINT statement.

    SCLM uses an FLMALLOC macro to allocate an output data set to the ddname SYSPRINT.

  6. The SYSPUNCH line in the TRN step creates the output of the CICS preprocessor and passes it to the next job step (COB) as a temporary file.

    SCLM uses an FLMALLOC macro with IOTYPE=W to allocate a work (temporary) file with the ddname of SYSPUNCH. This work file is passed to the next job step (FLMTRNSL).

  7. The JCL has a job step named COB, which is the second translator called in this job.

    SCLM uses an FLMTRNSL macro to call this translator. This is the second FLMTRNSL macro for build in our language definition.

  8. The job step COB executes (EXEC PGM=) a program called IGYCRCTL, the compiler for COBOL.

    SCLM uses the COMPILE=IGYCRCTL statement on the FLMTRNSL macro.

  9. To pass compiler options to the OS COBOL compiler, the COB job step uses a PARM= command.

    SCLM uses the OPTIONS= statement on the FLMTRNSL macro to perform the same task.

  10. This job has conditional execution for the COB step via the COND(5,LE) JCL command. The COB step will not execute if the return code of the TRN step is greater than 4.

    SCLM sets the GOODRC keyword parameter for the TRN step (CICS preprocessor) equal to 4. Build halts execution of all translators following the TRN step in the language definition if the return code from the TRN step is greater than 4.

  11. The STEPLIB statement in job step COB tells the job where to find the program IGYCRCTL.

    SCLM uses the DSNAME= option on the FLMTRNSL macro. Both the STEPLIB and DSNAME point to the same data set, IGY.SIGYCOMP.

  12. The SYSLIB statement in job step COB tells the job where to find the system type includes.

    The language definition uses the FLMSYSLB macro with IOTYPE=I and the FLMINCLS macro to do the same task.

    SCLM allocates these project data sets allocated for IOTYPE=I before the data sets on the FLMCPYLB macro(s). ALCSYSLB=Y parameter must be specified on the FLMLANGL macro to ensure that the FLMSYSLB data sets are allocated to the IOTYPE=I ddnames.

    Because PORDER=3 is being used, the SYSLIB DD is the fourth ddname passed to the compiler in a ddname substitution list. The COBOL compiler uses the fourth ddname as SYSLIB no matter what value is assigned to the DDNAME keyword parameter on the FLMALLOC macro.

  13. For each system library specified for the SYSLIB DD, the language definition has an FLMSYSLB macro. In this case both CICS.TS31.CICS.SDFHCOB and CICS.TS31.CICS.SDFHMAC are specified.
  14. The COB job step sends the compile listing to the printer using the SYSPRINT statement.

    SCLM uses an FLMALLOC macro to allocate an output data set to the ddname SYSPRINT.

  15. In the COB job step, the SYSIN DD statement identifies the data set that contains the member to compile. This is the output of the CICS preprocessor step TRN.

    SCLM uses an FLMALLOC macro with IOTYPE=U to refer to a ddname from a prior step. The language definition instructs MVS™ to allocate the data set assigned in the TRN step to the ddname SYSPUNCH.

  16. The SYSLIN statement in the COB step identifies the output data set for object code created by the COBOL compiler.

    The language definition uses an FLMALLOC macro with IOTYPE=O to allocate an output file. This FLMALLOC macro is the first in the COB FLMTRNSL because when using PORDER=3, the COBOL compiler expects the output data set ddname to be first in a ddname substitution list.

  17. The COB step allocates SYSUT1 as a temporary work file for the COBOL compiler.

    SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the eighth file provided to the COBOL compiler because PORDER=3 tells SCLM that we are using a ddname substitution list.

  18. The COB step allocates SYSUT2 as a temporary work file for the COBOL compiler.

    SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the ninth file provided to the COBOL compiler because we are using a ddname substitution list.

  19. The COB step allocates SYSUT3 as a temporary work file for the COBOL compiler.

    SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the tenth file provided to the COBOL compiler because we are using a ddname substitution list.

  20. The COB step allocates SYSUT4 as a temporary work file for the COBOL compiler. SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the 11th file provided to the COBOL compiler because we are using a ddname substitution list.
  21. The COB step allocates SYSUT5 as a temporary work file for the COBOL compiler.

    SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the 13th file provided to the COBOL compiler because we are using a ddname substitution list.

  22. The COB step allocates SYSUT6 as a temporary work file for the COBOL compiler.

    SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the 14h file provided to the COBOL compiler because we are using a ddname substitution list.

  23. The COB step allocates SYSUT7 as a temporary work file for the COBOL compiler.

    SCLM's language definition uses an FLMALLOC macro with IOTYPE=W to perform the same task. This must be the 15th file provided to the COBOL compiler because we are using a ddname substitution list.

  24. SCLM language definition only

    The language definition uses PORDER=3 for the COBOL compiler step (COB) to use a ddname substitution list. A ddname substitution list provides an ordered list(defined by the translator) of ddnames such that the position of a ddname in the list, and not the actual ddname, is used by the translator for a specific file.

    The input file for the compiler must be the output file from the CICS preprocessor. The ddname assigned to the TRN step is SYSPUNCH. Because this file has already been allocated to SYSPUNCH, another way (besides ddname) is needed to pass this file as the input to the compiler. By using PORDER=3, SCLM passes all the files that can be used by the COBOL compiler in the order specified for this compiler. To use PORDER=3, a specific parameter string must be built. The language definition must have an FLMALLOC macro for each of these parameters

    Those FLMALLOCs that are tagged for STEP 24 are not applicable for the COBOL compiler. SCLM places 8 bytes of hexadecimal zeros into the ddname substitution list for each FLMALLOC with IOTYPE=N.

Figure 1. JCL: Invoke COBOL Preprocessor and Compiler (Part 1 of 2)
//USERIDC  JOB (AS05CR,T12,C531),'USERID',NOTIFY=&SYSUID,CLASS=A,
//              MSGCLASS=O,MSGLEVEL=(1,1)
//*
//*      THIS PROCEDURE CONTAINS 2 STEPS
//*      1.   EXEC THE CICS PREPROCESSOR
//*      2.   EXEC THE Enterprise COBOL COMPILER
//*
//*      CHANGE THE JOB NAME AND THE ACCOUNTING INFORMATION TO MEET THE
//*      REQUIREMENTS OF YOUR INSTALLATION.
//*
//*      CHANGE 'PROGNAME' TO THE NAME OF THE CICS/COBOL PROGRAM YOU
//*      WANT TO COMPILE.  CHANGE 'USERID' TO YOUR USERID.
//*
//*      CHANGE 'DEVL' TO THE GROUP THAT CONTAINS THE PROGRAM TO BE COMPILED.
//*
//* STEP 1: TRN STATEMENT; STEP 2: EXEC PGM STATEMENT
//*
//TRN    EXEC PGM=DFHECP1$,
//            REGION=2048K
//*
//* STEP 3: STEPLIB STATEMENT
//*
//STEPLIB DD DSN=CICS.TS31.CICS.SDFHLOAD,DISP=SHR
//*
//* STEP 4: SYSIN STATEMENT
//*
//SYSIN DD DSN=USERID.DEVL.SOURCE(PROGNAME),DISP=SHR
//*
//* STEP 5: SYSPRINT STATEMENT
//*
//SYSPRINT DD SYSOUT=A
//*
//* STEP 6: SYSPUNCH STATEMENT
//*
//SYSPUNCH DD DSN=&&SYSCIN,;
//             DISP=(,PASS),UNIT=SYSDA,
//             DCB=BLKSIZE=400,
//             SPACE=(400,(400,100))
//*
//* STEP 7: COB STATEMENT; STEP 8: EXEC PGM STATEMENT
 
Figure 2. JCL: Invoke COBOL Preprocessor and Compiler (Part 2 of 2)
//* STEP 9: PARM STATEMENT; STEP 10: COND STATEMENT
//*
//COB    EXEC PGM=IGYCRCTL,REGION=2048K,COND=(5,LE),
//                PARM='RENT,NODYNAM,LIB'
//*
//* STEP 11: STEPLIB STATEMENT
//*
//STEPLIB DD DSN=IGY.SIGYCOMP.DISP=SHR
//*
//* STEP 12: SYSLIB STATEMENT; STEP 13: DD STATEMENT
//*
//SYSLIB DD DSN=CICS.TS31.SDFHCOB,DISP=SHR
//       DD DSN=CICS.TS31.SDFHMAC,DISP=SHR
//*
//* STEP 14: SYSPRINT STATEMENT
//*
//SYSPRINT DD SYSOUT=O
//*
//* STEP 15: SYSIN STATEMENT
//*
//SYSIN DD DSN=&&SYSCIN,DISP=(OLD,DELETE)
//*
//* STEP 16: SYSLIN STATEMENT
//*
//SYSLIN DD DSN=USERID.DEVLEV.OBJ(PROGNAME),DISP=SHR
//*
//* STEP 17: SYSUT1 STATEMENT
//*
//SYSUT1 DD UNIT=SYSDA,SPACE=(460,(350,100))
//*
//* STEP 18: SYSUT2 STATEMENT
//*
//SYSUT2 DD UNIT=SYSDA,SPACE=(460,(350,100))
//*
//* STEP 19: SYSUT3 STATEMENT
//*
//SYSUT3 DD UNIT=SYSDA,SPACE=(460,(350,100))
//*
//* STEP 20: SYSUT4 STATEMENT
//*
//SYSUT4 DD UNIT=SYSDA,SPACE=(460,(350,100))
//*
//* STEP 21: SYSUT5 STATEMENT
//*
//SYSUT5 DD UNIT=SYSDA,SPACE=(460,(350,100))
//*
//* STEP 22: SYSUT6 STATEMENT
//*
//SYSUT6 DD UNIT-SYSDA,SPACE=(460,(350,100))
//*
//* STEP 23: SYSUT7 STATEMENT
//*
//SYSUT7 DD UNIT=SYSDA,SPACE=(460,(350,100))
Figure 3. SCLM Language Definition: Invoke COBOL Preprocessor and Compiler (Part 1 of 2)
***********************************************************************
*          SCLM LANGUAGE DEFINITION FOR
*          COBOL WITH CICS 3.1 PREPROCESSOR
*
* CICS OUTPUT IS PASSED VIA THE CICSTRAN DD ALLOCATION TO COBOL.
*
* POINT THE FLMSYSLB MACRO(S) AT ALL 'STATIC' COPY DATASETS.
* CUSTOMIZE THE 'OPTIONS' AND 'GOODRC' FIELDS TO YOUR STANDARDS.
* ADD THE 'DSNAME' FIELD IF THE TRANSLATOR IS IN A PRIVATE LIBRARY.
* WHEN A NEW TRANSLATOR VERSION REQUIRES TOTAL RECOMPILATION FOR THIS
* LANGUAGE, THE 'VERSION' FIELD ON FLMLANGL SHOULD BE CHANGED.
***********************************************************************
*
*STEP 13
COBCICS  FLMSYSLB CICS.TS31.CICS.SDFHCOB
         FLMSYSLB CICS.TS31.CICS.SDFHMAC
*
         FLMLANGL LANG=COBCICS,VERSION=CICS31,ALCSYSLB=Y
*
* PARSER TRANSLATOR
*
          FLMTRNS  CALLNAM='SCLM COBOL PARSE',                         C
               FUNCTN=PARSE,                                           C
               COMPILE=FLMLPCBL,                                       C
               PORDER=1,                                               C
               OPTIONS=(@@FLMLIS,@@FLMSTP,@@FLMSIZ,)
*      (*  SOURCE *)
           FLMALLOC IOTYPE=A,DDNAME=SOURCE
            FLMCPYLB @@FLMDSN(@@FLMMBR)
*
* BUILD TRANSLATORS
*        - CICS PRECOMPILE - STEP NAME TRN
*
* STEP 1
          FLMTRNSL CALLNAM='CICS PRE-COMPILE',                       C
               FUNCTN=BUILD,                                         C
* STEP 2
               COMPILE=DFHECP1$,                                     C
* STEP 3 (* STEPLIB *)
               DSNAME=CICS.TS31.CICS.SDFHLOAD,                       C
               VERSION=3.1,                                          C
* STEP 10 (* COND *)
               GOODRC=4,                                             C
               PORDER=1                                              C
               OPTIONS=(NOSEQ)
* STEP 4 (* SYSIN *)
           FLMALLOC IOTYPE=S,KEYREF=SINC,RECFM=FB,LRECL=80,          C
               DDNAME=SYSIN
* STEP 5 (* SYSPRINT *)
           FLMALLOC IOTYPE=O,RECFM=FBA,LRECL=121,                    C
               RECNUM=35000,PRINT=Y,DDNAME=SYSPRINT
*
* STEP 6 (* SYSPUNCH *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,                      C
               RECNUM=5000,DDNAME=SYSPUNCH
*
* STEP 7 (*COBOL INTERFACE - STEP NAME COB *)
* STEP 8
           FLMTRNSL CALLNAM='COBOL COMPILE',                         C
               FUNCTN=BUILD,                                         C
               COMPILE=IGYCRCTL,                                     C
Figure 4. SCLM Language Definition: Invoke COBOL Preprocessor and Compiler (Part 2 of 2)
* STEP 11 (* STEPLIB *)
               DSNAME=IGY.SIGYCOMP,                                  C
               VERSION=3.3.1,                                        C
               GOODRC=4,                                             C
* STEP 24
               PORDER=3,                                             C
* STEP 9 (* PARMS *)
             OPTIONS=(RENT,NODYNAM,LIB)                              C
* DDNAME ALLOCATIONS
* STEP 16
* 1 (* SYSLIN *)
           FLMALLOC IOTYPE=O,KEYREF=OBJ,RECFM=FB,LRECL=80,           C
               RECNUM=5000,DFLTTYP=OBJ
* STEP 24
* 2 (* N/A *)
           FLMALLOC IOTYPE=N
* STEP 24
* 3 (* N/A *)
           FLMALLOC IOTYPE=N
* STEP 12; STEP 13
* 4 (* SYSLIB *)
           FLMALLOC IOTYPE=I,KEYREF=SINC
* STEP 15
* 5 (* SYSIN *)
           FLMALLOC IOTYPE=U,KEYREF=SINC,DDNAME=SYSPUNCH
* STEP 14
* 6 (* SYSPRINT *)
           FLMALLOC IOTYPE=O,KEYREF=LIST,RECFM=FBA,LRECL=133,        C
               RECNUM=25000,PRINT=Y,DFLTTYP=LIST
* STEP 24
* 7 (* SYSPUNCH *)
           FLMALLOC IOTYPE=N
            FLMCPYLB NULLFILE
* STEP 17
* 8 (* SYSUT1 *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000
* STEP 18
* 9 (* SYSUT2 *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000
* STEP 19
* 10 (* SYSUT3 *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000
* STEP 20
* 11 (* SYSUT4 *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000
* STEP 24
* 12 (* SYSTERM *)
           FLMALLOC IOTYPE=N
            FLMCPYLB NULLFILE
* STEP 21
* 13 (* SYSUT5 *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000
* STEP 22
* 14 (* SYSUT6 *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000
*STEP 23
* 15 (* SYSUT7 *)
           FLMALLOC IOTYPE=W,RECFM=FB,LRECL=80,RECNUM=5000
* 5694-A01     COPYRIGHT IBM CORP 1980, 1989,2007
Note: For reference purposes, the language definition shown in Figure 3 contains comments with step numbers placed in the middle of commands; for this language definition to run, these comments must be removed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014