PARM PARAMETER:
COBOL PROGRAM TO RECEIVE DATA FROM JCL:
IDENTIFICATION DIVISION.
PROGRAM-ID. PARM1.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-VARIABLES.
05 DISP-TEXT PIC X(30) VALUE SPACES.
LINKAGE SECTION.
01 WS-PARM.
05 WS-LENGTH PIC 9(04) COMP VALUE ZEROS.
05 WS-TEXT PIC X(30) VALUE SPACES.
PROCEDURE DIVISION USING WS-PARM.
DISPLAY ' VALUE OF WS-TEXT : ' WS-TEXT
DISPLAY ' VALUE OF WS-LENGTH : ' WS-LENGTH.
STOP RUN.
JCL TO COMPILE AND LINK COBOL PROGRAM:
//Z57658SA JOB (3P10),'COMP JCL',
// CLASS=A,
// MSGCLASS=Q,
// NOTIFY=Z57658
//*
//JCL1 JCLLIB ORDER=Z57658.SOURCE.PROCLIB
//*
//STEP1 EXEC IGYWCL,MEM=PARM1
//COBOL.SYSIN DD DSN=Z57658.SOURCE.COBOL(&MEM),DISP=SHR
//LKED.SYSLMOD DD DSN=Z57658.SOURCE.LOADLIB(&MEM),
// DISP=SHR
//*
IGYWCL CATLOG PROCEDURE TO COMPILE AND LINK PROGRAM:
//IGYWCL PROC PGMLIB='&&GOSET'
//*
//COBOL EXEC PGM=IGYCRCTL,REGION=0M
//STEPLIB DD DSNAME=IGY420.SIGYCOMP,DISP=SHR
// DD DSNAME=CEE.SCEERUN,DISP=SHR
// DD DSNAME=CEE.SCEERUN2,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,UNIT=SYSALLDA,
// DISP=(MOD,PASS),SPACE=(CYL,(1,1))
//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT8 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT9 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT10 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT11 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT12 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT13 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT14 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSUT15 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//SYSMDECK DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//LKED EXEC PGM=IEWBLINK,COND=(8,LT,COBOL),
// REGION=0M
//SYSLIB DD DSNAME=CEE.SCEELKED,DISP=SHR
// DD DSNAME=CEE.SCEELKEX,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN
//SYSLMOD DD DSNAME=&PGMLIB(G0),
// SPACE=(CYL,(1,1,1)),
// UNIT=SYSALLDA,DISP=(MOD,PASS),
// DSNTYPE=LIBRARY
//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1))
//*
JCL TO EXECUTE COBOL PROGRAM ALONG WITH PARM PARAMETER:
//Z57658SA JOB (3P10),'ONLY RUN',
// CLASS=A,
// MSGCLASS=Q,
// NOTIFY=Z57658
//*
//JCL1 JCLLIB ORDER=Z57658.SOURCE.PROCLIB
//*
//STEP1 EXEC PGM=PARM1,PARM=(COBOL76,COBOL85,COBOLII)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//STEPLIB DD DSN=Z57658.SOURCE.LOADLIB,DISP=SHR
//*
OUTPUT OF COBOL PROGRAM:
********************************* TOP OF DATA ***
VALUE OF WS-TEXT : COBOL76,COBOL85,COBOLII
VALUE OF WS-LENGTH : 0023
******************************** BOTTOM OF DATA *
No comments:
Post a Comment