stephen linkin houston community college 1/26/2007 © 2002 - mike murach & associates, 2007 -...
TRANSCRIPT
1/26/2007
© 2002 - Mike Murach & Associates, 2007 - HCC, IBM 1
Stephen LinkinHouston Community College
The Basics Of Job Control Language
Chapter 4 Chapter 4
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
2
Objectives
Applied ObjectivesApplied Objectives Code A Valid JOB StatementCode A Valid JOB Statement Code An EXEC Statement Code An EXEC Statement
Invoke A Program And Pass A ParameterInvoke A Program And Pass A Parameter Code A DD Statement For DASD Data Sets:Code A DD Statement For DASD Data Sets:
A.A. Existing Cataloged Data SetExisting Cataloged Data Set
B.B. Existing Uncataloged Data SetExisting Uncataloged Data Set
C.C. New Non-VSAM Data SetNew Non-VSAM Data Set Code JCL And Data For Instream Data SetCode JCL And Data For Instream Data Set
A.A. The Data May Or May Not Include JCLThe Data May Or May Not Include JCL Statements. Statements.
Code DD Statement For A SYSOUT Code DD Statement For A SYSOUT Data Set.Data Set.
Given Specifications Code JCL.Given Specifications Code JCL.
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
3
Knowledge ObjectivesKnowledge Objectives Basic Format Of JCL StatementsBasic Format Of JCL Statements Rules Followed Coding Names In Name FieldRules Followed Coding Names In Name Field Distinguish Positional And Keyword ParametersDistinguish Positional And Keyword Parameters How to code subparameters.How to code subparameters. Continue JCL statements on additional lines.Continue JCL statements on additional lines. How to code commentsHow to code comments The purpose of the DISP parameterThe purpose of the DISP parameter The purposes of UNIT, VOLUME, and The purposes of UNIT, VOLUME, and
SPACE parametersSPACE parameters Purpose of the DCB parameter in a DDPurpose of the DCB parameter in a DD
statement.statement.
Objectives (2)
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
4
Common JCL Statements
JOBJOB Identifies A Job, Defines TheIdentifies A Job, Defines TheEnvironment, Supplies AccountingEnvironment, Supplies AccountingInformationInformation
EXECEXEC Identifies Job Step Of Program Identifies Job Step Of Program ExecutedExecuted
DDDD Identify Data Set Allocated For JobIdentify Data Set Allocated For JobStepStep
delimiter (/*)delimiter (/*) End Of An Instream Data Set End Of An Instream Data Set null (//)null (//) End Of A Job (EOJ)End Of A Job (EOJ) comment (//*)comment (//*) Line To Provide CommentsLine To Provide Comments
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
5
Additional JCL Statements
OUTPUTOUTPUT Options For SYSOUT ProcessingOptions For SYSOUT Processing PROCPROC Start A ProcedureStart A Procedure PENDPEND End A ProcedureEnd A Procedure JCLLIBJCLLIB Identify Private Procedure LibraryIdentify Private Procedure Library INCLUDEINCLUDE Copy Statements From AnotherCopy Statements From Another
Library Member Into The Job.Library Member Into The Job. SETSET Set Values For Symbolic VariablesSet Values For Symbolic Variables IF/THEN/ELSE/ENDIFIF/THEN/ELSE/ENDIF
Conditional Execution Of Job Step.Conditional Execution Of Job Step. COMMANDCOMMAND MVS or JES command issued when MVS or JES command issued when
the job runs.the job runs.
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
6
A Multi-Step Job
Job steps
//MM01A JOB 36512//MM01A JOB 36512//STEP1 EXEC PGM=PROGA//STEP1 EXEC PGM=PROGA//FILEA DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR//FILEA DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR//FILEB DD DSNAME=MM01.CUSTOMER.LIST,DISP=(NEW,KEEP)//FILEB DD DSNAME=MM01.CUSTOMER.LIST,DISP=(NEW,KEEP)//STEP2 EXEC PGM=PROGB//STEP2 EXEC PGM=PROGB//FILEB DD DSNAME=MM01.CUSTOMER.LIST,DISP=(OLD,DELETE)//FILEB DD DSNAME=MM01.CUSTOMER.LIST,DISP=(OLD,DELETE)//FILEC DD DSNAME=MM01.CUSTOMER.INVOICE,DISP=SHR//FILEC DD DSNAME=MM01.CUSTOMER.INVOICE,DISP=SHR//REPORTA DD SYSOUT=*//REPORTA DD SYSOUT=*////
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
7
The Basic Format For JCL Statements
Basic Command SyntaxBasic Command Syntax
identifier [name] [operation] [parameters] [comments]identifier [name] [operation] [parameters] [comments]
//MM01A JOB 36512,'R. MENENDEZ',NOTIFY=MM01//MM01A JOB 36512,'R. MENENDEZ',NOTIFY=MM01//POST EXEC PGM=CM3000//POST EXEC PGM=CM3000//CUSTTRAN DD DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR//CUSTTRAN DD DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR//CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR//CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR//TRANJRNL DD SYSOUT=*//TRANJRNL DD SYSOUT=*//ERRLIST DD SYSOUT=*//ERRLIST DD SYSOUT=*////
Identifier Identifier fieldfield
NameNamefieldfield
OperationOperationfieldfield
ParametersParametersfieldsfields
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
8
Positional vs. Keyword
Positional parametersPositional parameters//MM01A JOB //MM01A JOB 36512,'R MENENDEZ‘36512,'R MENENDEZ‘//MM01A JOB //MM01A JOB ,'R MENENDEZ','R MENENDEZ'
Keyword parametersKeyword parameters//CUSTMAST DD //CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHRDSNAME=MM01.CUSTOMER.MASTER,DISP=SHR
Keyword and positional parameter combinationsKeyword and positional parameter combinations//CUSTMAST DD//CUSTMAST DD
DSNAME=MM01.CUSTOMER.MASTER,DSNAME=MM01.CUSTOMER.MASTER,DISP=(,CATLG,DELETEDISP=(,CATLG,DELETE),),//// UNIT=SYSDA,VOL=SER=MPS800,UNIT=SYSDA,VOL=SER=MPS800,//// SPACE=(CYL,(10,5,2)),SPACE=(CYL,(10,5,2)),//// DCB=DSORG=PODCB=DSORG=PO//DUNNING DD//DUNNING DD
DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),//// UNIT=SYSDA,UNIT=SYSDA,VOL=SER=MPS800,VOL=SER=MPS800,//// SPACE=(CYL,(1,1)),SPACE=(CYL,(1,1)),//// DCB=(DSORG=PS,RECFM=FB,LRECL=400)DCB=(DSORG=PS,RECFM=FB,LRECL=400)
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
9
Long Command Lines
Code as many parameters on one line as possibleCode as many parameters on one line as possible//DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),UNIT=SYSDA,|//DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),UNIT=SYSDA,|// VOL=SER=MPS800,SPACE=(CYL,(1,1)),DCB=(DSORG=PS,RECFM=FB,LRECL=400)// VOL=SER=MPS800,SPACE=(CYL,(1,1)),DCB=(DSORG=PS,RECFM=FB,LRECL=400)
Code only one or two parameters per lineCode only one or two parameters per line//DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),//DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP),// UNIT=SYSDA,VOL=SER=MPS800,// UNIT=SYSDA,VOL=SER=MPS800,// SPACE=(CYL,(1,1)),// SPACE=(CYL,(1,1)),// DCB=(DSORG=PS,RECFM=FB,LRECL=400)// DCB=(DSORG=PS,RECFM=FB,LRECL=400)
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
10
Ways To Code Comments In JCL
The comments field of a JCL statementThe comments field of a JCL statement//MM01A JOB 36512,MENENDEZ,NOTIFY=MM01//MM01A JOB 36512,MENENDEZ,NOTIFY=MM01//POST EXEC PGM=CM3000 //POST EXEC PGM=CM3000 **Post cust transactions****Post cust transactions**//CUSTTRAN DD DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR//CUSTTRAN DD DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR//CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR//CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR//TRANJRNL DD SYSOUT=*//TRANJRNL DD SYSOUT=*
The JCL comment statementThe JCL comment statement//MM01RP JOB 36512,'A PRINCE',MSGCLASS=X,MSGLEVEL=(1,1)//MM01RP JOB 36512,'A PRINCE',MSGCLASS=X,MSGLEVEL=(1,1)//********************************************************* //********************************************************* //* Prepare past-due reports from DUNNING file * //* Prepare past-due reports from DUNNING file * //********************************************************* //********************************************************* //AR7200 EXEC PGM=AR7200//AR7200 EXEC PGM=AR7200//DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=OLD,//DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=OLD,// UNIT=SYSDA,VOL=SER=MPS800// UNIT=SYSDA,VOL=SER=MPS800//ATB DD SYSOUT=*//ATB DD SYSOUT=*//OVERDUE DD SYSOUT=*//OVERDUE DD SYSOUT=*
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
11
The Syntax Of JOB Statement
//jobname JOB [ accounting-information ] [,programmer-name ]//jobname JOB [ accounting-information ] [,programmer-name ] [ ,MSGCLASS=class ] [ ,MSGCLASS=class ] [ ,MSGLEVEL=(stmt,msg) ] [ ,MSGLEVEL=(stmt,msg) ] [ ,NOTIFY=user-id ] [ ,NOTIFY=user-id ]
JOB statement examplesJOB statement examples//PAY40B1 JOB MMA2AB14//PAY40B1 JOB MMA2AB14
//PAY40B2 JOB (MMA-001,'06/11/02',206),MENENDEZ,MSGCLASS=A//PAY40B2 JOB (MMA-001,'06/11/02',206),MENENDEZ,MSGCLASS=A
//PAY40B3 JOB ,MENENDEZ,MSGCLASS=A//PAY40B3 JOB ,MENENDEZ,MSGCLASS=A
//PAY40B4 JOB MSGCLASS=A,MSGLEVEL=(0,0),NOTIFY=MM01//PAY40B4 JOB MSGCLASS=A,MSGLEVEL=(0,0),NOTIFY=MM01 A member named JOBCARD that contains a generic JOB statementA member named JOBCARD that contains a generic JOB statement
//MM01XXXX JOB 36512,'R MENENDEZ', //MM01XXXX JOB 36512,'R MENENDEZ',
// MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=MM01// MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=MM01
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
12
Job Names
Valid job names//MM01A//CS0166PR//$PSP06B
Invalid job names// MM01C Doesn’t start in column 3//(ABCDE) Starts with an invalid
character//PR_001 Contains an invalid
character//PAYMENT805 Contains more than 8
characters
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
13
Sample JOB Statements
Five JOB statements that use the programmer name Five JOB statements that use the programmer name parameterparameter //MM01A JOB 36512,RMENENDEZ//MM01A JOB 36512,RMENENDEZ //MM01B JOB ,R.MENENDEZ//MM01B JOB ,R.MENENDEZ //MM01C JOB ,'R MENENDEZ'//MM01C JOB ,'R MENENDEZ' //MM01D JOB 36512,'O''Brien'//MM01D JOB 36512,'O''Brien' //MM01E JOB ,DEPT-10//MM01E JOB ,DEPT-10
Two ways to code the NOTIFY parameterTwo ways to code the NOTIFY parameter //MM01A JOB 36512,LOWE,NOTIFY=MM01//MM01A JOB 36512,LOWE,NOTIFY=MM01 //MM01B JOB 36512,LOWE,NOTIFY=&SYSUID//MM01B JOB 36512,LOWE,NOTIFY=&SYSUID
The message returned to your TSO/E terminal when the job The message returned to your TSO/E terminal when the job completescompletes17.35.12 JOB02169 $HASP165 MM01B ENDED AT DDC1NJE 17.35.12 JOB02169 $HASP165 MM01B ENDED AT DDC1NJE
MAXCC=0 CN(INTERNAL)MAXCC=0 CN(INTERNAL)******
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
14
MSG Class
The syntax of the MSGCLASS parameterThe syntax of the MSGCLASS parameterMSGCLASS=classMSGCLASS=class
The syntax of the MSGLEVEL parameterThe syntax of the MSGLEVEL parameterMSGLEVEL=(stmt,msg)MSGLEVEL=(stmt,msg)
Typical JOB statement with both parametersTypical JOB statement with both parameters//MM01A JOB 36512,'R MENENDEZ',MSGCLASS=X,MSGLEVEL=(0,0)//MM01A JOB 36512,'R MENENDEZ',MSGCLASS=X,MSGLEVEL=(0,0)
stmtstmt A single digit specifying which statements should print.0 Print only the JOB statement.1 Print only JCL statements.2 Print only JCL statements submitted through
the input stream.msgmsg A single digit that specifying which system messages
should print.0 Print step completion messages only.1 Print all messages (the default).
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
15
The Syntax Of EXEC Statement
The syntax of the EXEC statementThe syntax of the EXEC statement//stepname EXEC PGM=program-name [ ,PARM=information ]//stepname EXEC PGM=program-name [ ,PARM=information ]
PGMPGM Specifies the name of the program to be executed for this jobstep.
PARMPARM Optional; specifies information that’s passed to the program.
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
16
Examples of the EXEC statement
An EXEC that executes program PAY5B10 in step An EXEC that executes program PAY5B10 in step PAYLISTPAYLIST//PAYLIST EXEC PGM=PAY5B10//PAYLIST EXEC PGM=PAY5B10
An EXEC that passes a parameter value of An EXEC that passes a parameter value of LINECT=0050 to program IEBDGLINECT=0050 to program IEBDG//DATAGEN EXEC PGM=IEBDG,PARM='LINECT=0050'//DATAGEN EXEC PGM=IEBDG,PARM='LINECT=0050'
An EXEC statement passing three parameters to An EXEC statement passing three parameters to program HEWLprogram HEWL//LINKED EXEC PGM=HEWL,PARM='LET,MAP,XREF'//LINKED EXEC PGM=HEWL,PARM='LET,MAP,XREF'
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
17
Syntax Of DD Statement For DASD Data Sets
The syntax for DASD data setsThe syntax for DASD data sets//ddname DD DSNAME=data-set-name,//ddname DD DSNAME=data-set-name,// DISP=(status,normal-disp,abnormal-disp)// DISP=(status,normal-disp,abnormal-disp)// [ ,UNIT=unit ]// [ ,UNIT=unit ]// [ ,VOL=SER=serial-number ]// [ ,VOL=SER=serial-number ]// [ ,SPACE=unit,(primary-qty,secondary-qty,dir) ]// [ ,SPACE=unit,(primary-qty,secondary-qty,dir) ]// [ ,DCB=(option,option...) ]// [ ,DCB=(option,option...) ]
Examples of the DD statementExamples of the DD statementA DD statement that allocates an existing data setA DD statement that allocates an existing data set
//INVMAST DD DSNAME=MM01.INVNTORY.MASTER,DISP=SHR//INVMAST DD DSNAME=MM01.INVNTORY.MASTER,DISP=SHRA DD statement that allocates a new data setA DD statement that allocates a new data set
//INVMAST DD DSNAME=MM01.ACCOUNT.MASTER,DISP=(NEW,CATLG),//INVMAST DD DSNAME=MM01.ACCOUNT.MASTER,DISP=(NEW,CATLG),// UNIT=SYSDA,VOL=SER=MPS8BV,// UNIT=SYSDA,VOL=SER=MPS8BV,// SPACE=(CYL,(10,2)),// SPACE=(CYL,(10,2)),// DCB=(DSORG=PS,RECFM=FB,LRECL=100)// DCB=(DSORG=PS,RECFM=FB,LRECL=100)
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
18
Syntax Of DSNAME Parameter
{DSNAME} = {data-set-name}{DSNAME} = {data-set-name} {DSN}= {data-set-name(member)}{DSN}= {data-set-name(member)}
A DD statement that accesses a sequential data setA DD statement that accesses a sequential data set//INVMAST DD DSNAME=MM01.INVMAST.DATA,DISP=SHR//INVMAST DD DSNAME=MM01.INVMAST.DATA,DISP=SHR
A DD statement that accesses a PDS memberA DD statement that accesses a PDS member//INVTRAN DD DSN=MM01.INV.DATA(TRANS),DISP=SHR//INVTRAN DD DSN=MM01.INV.DATA(TRANS),DISP=SHR
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
19
Device Parameters
The syntax of the UNIT parameterThe syntax of the UNIT parameter
{group-name}{group-name}UNIT= {device-type}UNIT= {device-type} {device-number} {device-number}
The syntax of the VOLUME parameterThe syntax of the VOLUME parameter
{VOLUME=}SER=serial-number{VOLUME=}SER=serial-number{VOL=}{VOL=}
A DD statement using the UNIT and VOLUME parametersA DD statement using the UNIT and VOLUME parameters//INVMAST DD DSNAME=MM01.INVNTORY.MASTER,DISP=(NEW,CATLG),//INVMAST DD DSNAME=MM01.INVNTORY.MASTER,DISP=(NEW,CATLG),// UNIT=SYSDA,VOL=SER=MPS8BV,...// UNIT=SYSDA,VOL=SER=MPS8BV,...
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
20
SPACE Parameter
The syntax of the SPACE parameterThe syntax of the SPACE parameterSPACE= (unit,(primary-qty,secondary-qty[,dir]))SPACE= (unit,(primary-qty,secondary-qty[,dir]))
TRKTRK Allocates space in tracks.Allocates space in tracks.CYLCYL Allocates space in cylinders.Allocates space in cylinders.blklgthblklgth Allocates space in blocks, with the block size given in bytes.Allocates space in blocks, with the block size given in bytes.reclgthreclgth Allocates space based on the average record length in bytes.Allocates space based on the average record length in bytes.
primary-qtyprimary-qty Number of units to be initially allocated to the file.Number of units to be initially allocated to the file.secondary-qtysecondary-qty Number of units to be allocated to each secondary Number of units to be allocated to each secondary
extent.extent.dirdir Number of directory blocks to allocate for a Number of directory blocks to allocate for a
partitioned data setpartitioned data set
Examples of the SPACE parameterExample 1SPACE=(CYL,(4,1,5))Primary: 4 cylindersSecondary: 1 cylinderDirectory: 5 blocksExample 2SPACE=(TRK,(5,2))
Primary: 5 tracksSecondary: 2 tracks
Example 3SPACE=(800,(500,100))
Primary: 500 800 byte blocksSecondary: 100 800 byte blocks
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
21
DCB Parameter
The syntax of the DCB parameterThe syntax of the DCB parameterDCB=(option,option...)DCB=(option,option...)
Examples of the DCB parameterExamples of the DCB parameter A DCB parameter for a sequential file with fixed-length A DCB parameter for a sequential file with fixed-length
records of 133 bytesrecords of 133 bytesDCB=(DSORG=PS,RECFM=F,LRECL=133)DCB=(DSORG=PS,RECFM=F,LRECL=133)
DD parameters for a file with variable-length records up DD parameters for a file with variable-length records up to 500 bytes longto 500 bytes long
RECFM=VB,LRECL=500RECFM=VB,LRECL=500
DSORG=xDSORG=x Specifies the data set’s organization, as follows:Specifies the data set’s organization, as follows:PSPS Physical sequentialPhysical sequential POPO PartitionedPartitionedDADA DirectDirect ISIS Indexed sequentialIndexed sequential
RECFM=xRECFM=x Specifies the format of the file’s records, as follows:Specifies the format of the file’s records, as follows:FF Fixed length, unblockedFixed length, unblocked FBFB Fixed length,Fixed length,
blockedblockedVV Variable length, unblockedVariable length, unblocked VBVB Variable length, Variable length,
blockedblockedVBSVBS Variable length, blocked, spannedVariable length, blocked, spannedUU UndefinedUndefined
LRECL=nLRECL=n Specifies the length of the file’s records.Specifies the length of the file’s records.BLKSIZE=nBLKSIZE=n Specifies the length of the file’s blocks; for FB, BLKSIZE Specifies the length of the file’s blocks; for FB, BLKSIZE is is
normally a multiple of LRECL.normally a multiple of LRECL.
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
22
DD For instream Data Sets
Syntax of the DD statement for instream data setsSyntax of the DD statement for instream data sets//ddname DD {*} [ ,DLM=xx ]//ddname DD {*} [ ,DLM=xx ] {DATA} {DATA}[/*][/*]
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
23
Customertransactions
Customermaster file
Errortransactions
Transactionjournal
Error listing
Postcustomer
transactions(CM3000)
Transactionsummary
report
Figure 4-18a
Book Example
System flowchart for the System flowchart for the transaction-posting transaction-posting applicationapplication
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
24
Name Associations
Data set requirements for the transaction-posting Data set requirements for the transaction-posting applicationapplication
ddnameddname Data Set NameData Set NameCUSTTRANCUSTTRAN MM01.CUSTOMER.TRANSMM01.CUSTOMER.TRANS
CUSTMASTCUSTMAST MM01.CUSTOMER.MASTERMM01.CUSTOMER.MASTER
ERRTRANERRTRAN MM01.CUSTOMER.TRANS.ERRSMM01.CUSTOMER.TRANS.ERRS
TRANJRNLTRANJRNL (SYSOUT data set)(SYSOUT data set)
TRANSUMTRANSUM (SYSOUT data set)(SYSOUT data set)
ERRLISTERRLIST (SYSOUT data set)(SYSOUT data set)
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
25Figure 4-18c
JCL For Transaction-Posting Application
//MM01PT JOB 36512,'M MURACH',MSGCLASS=A,MSGLEVEL=(1,1),// NOTIFY=MM02//POST EXEC PGM=CM3000//CUSTTRAN DD DSNAME=MM01.CUSTOMER.TRANS,DISP=SHR//CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR//ERRTRAN DD DSNAME=MM01.CUSTOMER.TRANS.ERRS,DISP=SHR//TRANJRNL DD SYSOUT=*//TRANSUM DD SYSOUT=*//ERRLIST DD SYSOUT=*
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
26
Figure 4-19a
Sort by invoicewithin customer
(SORT)
Extractdunning data
(AR7100)
Prepare ATBand overdueinvoice report
(AR7200)
Sort by invoice,customer,
state(SORT)
Prepare XREFreport andstatements(AR7300)
AR master fileCustomermaster file
Dunning fileSorted
dunning file
SortedAR master file
Aged trial balancereport
Overdue invoicedreport
StatementsCross reference
report
Multiple Program Application
Job Control Requirements Job Control Requirements For A Report-Preparation For A Report-Preparation ApplicationApplication
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
27
Name Associations
Data set requirements for programs Data set requirements for programs invoked by report-preparation applicationinvoked by report-preparation application
StepStep ProgProg ddnameddname Data set nameData set nameSORT1SORT1 SORTSORT SYSOUTSYSOUT (SYSOUT data set)(SYSOUT data set)
SORTINSORTIN MM01.ACCOUNT.MASTERMM01.ACCOUNT.MASTERSORTOUTSORTOUT MM01.ACCOUNT.MASTER.SORTMM01.ACCOUNT.MASTER.SORTSORTWK01SORTWK01 (temporary work file)(temporary work file)SYSINSYSIN (instream data set)(instream data set)
AR7100AR7100 AR7100AR7100 ARSORTARSORT MM01.ACCOUNT.MASTER.SORTMM01.ACCOUNT.MASTER.SORTCUSTMASTCUSTMAST MM01.CUSTOMER.MASTERMM01.CUSTOMER.MASTERDUNNINGDUNNING MM01.DUNNING.FILEMM01.DUNNING.FILE
AR7200AR7200 AR7200AR7200 DUNNINGDUNNING MM01.DUNNING.FILEMM01.DUNNING.FILEATBATB (SYSOUT data set)(SYSOUT data set)OVERDUEOVERDUE (SYSOUT data set)(SYSOUT data set)
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
28
(continued)
Step Step ProgramProgram ddnameddname Data set nameData set nameSORT2SORT2 SORTSORT SYSOUTSYSOUT (SYSOUT data set)(SYSOUT data set)
SORTINSORTIN MM01.DUNNING.FILEMM01.DUNNING.FILE
SORTOUTSORTOUT MM01.DUNNING.FILE.SORTMM01.DUNNING.FILE.SORT
SORTWK01SORTWK01 (temporary work file)(temporary work file)
SYSINSYSIN (instream data set)(instream data set)
AR7300 AR7300AR7300 AR7300 DUNSORTDUNSORT MM01.DUNNING.FILE.SORTMM01.DUNNING.FILE.SORT
XREFXREF (SYSOUT data set)(SYSOUT data set)
STMTSSTMTS (SYSOUT data set (SYSOUT data set
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
29
The JCL for report-preparation application
1 //MM01RP JOB 36512,'A PRINCE',MSGCLASS=X,MSGLEVEL=(1,1),// NOTIFY=MM03
2 //SORT1 EXEC PGM=SORT3 //SYSOUT DD SYSOUT=*4 //SORTIN DD DSNAME=MM01.ACCOUNT.MASTER,DISP=SHR5 //SORTOUT DD DSNAME=MM01.ACCOUNT.MASTER.SORT,DISP=(NEW,KEEP), // UNIT=SYSDA,VOL=SER=MPS800, // SPACE=(CYL,(1,1)), // DCB=(DSORG=PS,RECFM=FB,LRECL=400)6 //SORTWK01 DD UNIT=SYSDA,VOL=SER=MPS800,
// SPACE=(CYL,(1,1))7 //SYSIN DD * SORT FIELDS=(16,5,CH,A,1,5,CH,A) /* 8 //AR7100 EXEC PGM=AR71009 //ARSORT DD DSNAME=MM01.ACCOUNT.MASTER.SORT,DISP=(OLD,DELETE), // UNIT=SYSDA,VOL=SER=MPS80010 //CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR11 //DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=(NEW,KEEP), // UNIT=SYSDA,VOL=SER=MPS800, // SPACE=(CYL,(1,1)), // DCB=(DSORG=PS,RECFM=FB,LRECL=400)
1/26/2007 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM
30
(continued)12 //AR7200 EXEC PGM=AR720013 //DUNNING DD DSNAME=MM01.DUNNING.FILE,DISP=OLD, // UNIT=SYSDA,VOL=SER=MPS80014 //ATB DD SYSOUT=* //OVERDUE DD SYSOUT=* //SORT2 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DSNAME=MM01.DUNNING.FILE,DISP=(OLD,DELETE), // UNIT=SYSDA,VOL=SER=MPS800, //SORTOUT DD DSNAME=MM01.DUNNING.FILE.SORT,DISP=(NEW,KEEP), // UNIT=SYSDA.VOL=SER=MPS800, // SPACE=(CYL,(1,1)) // DCB=(DSORG=PS,RECFM=FB,LRECL=400) //SORTWK01 DD UNIT=SYSDA,VOL=SER=MPS800, // SPACE=(CYL,(1,1)) //SYSIN DD * SORT FIELDS=(43,2,CH,A,1,5,CH,A,50,5,CH,A) /* //AR7300 EXEC PGM=AR7300 //DUNSORT DD DSNAME=MM01.DUNNING.FILE.SORT,DISP=(OLD,DELETE), // UNIT=SYSDA,VOL=SER=MPS800 //XREF DD SYSOUT=* //STMTS DD SYSOUT=*