Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stephen Linkin Houston Community College 28-Mar-07 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM 1 JCL For VSAM Data Sets.

Similar presentations


Presentation on theme: "Stephen Linkin Houston Community College 28-Mar-07 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM 1 JCL For VSAM Data Sets."— Presentation transcript:

1

2 Stephen Linkin Houston Community College 28-Mar-07 © Mike Murach & Associates, HCC, IBM 1 JCL For VSAM Data Sets

3 2 Objectives Knowledge objectives Explain why you code only a few DD parameters for an existing VSAM data set. Explain how to delete a VSAM data set without using AMS if SMS is active. Explain what DD statements in a job that executes a COBOL program with alternate indexes to a VSAM file. Explain how using standard JCL (under SMS) instead of AMS to create a VSAM file simplifies volume allocation. Applied objectives Code a DD statement to requirements for a job that processes VSAM files, : a) A llocate an existing VSAM file b) A llocate a DUMMY file when the program expects a VSAM file c) C reate a VSAM file, assuming SMS is active

4 © Mike Murach & Associates, HCC, IBM3 Syntax Of DD Statement For Existing VSAM Data Sets The Syntax A DD Statement Allocating VSAM Set For Shared Access A DD Statement Specifying Exclusive Access And Deleting The Data Set On Job Step Completion (SMS Only) A DD Statement Allocating Dummy VSAM Data Set //ddname DD { DSNAME=data-set-name } { DUMMY } [,DISP=(status,normal-disp,abnormal-disp) ] [,AMP=(option,option...) ] //CUSTMAST DD DSNAME=MM01.CUSTOMER.MASTER,DISP=SHR //PAYTRAN DD DSNAME=MM01.PAYMENT.TRANS, // DISP=(OLD,DELETE) //PAYTRAN DD DUMMY,AMP=AMORG

5 © Mike Murach & Associates, HCC, IBM4 The COBOL SELECT Statement for KSDS processed by two alternate keys SELECT EMPMAST ASSIGN TO EMPMAST ORGANIZATION IS INDEXED ACCESS IS RANDOM RECORD-KEY IS ER-EMPLOYEE-NUMBER ALTERNATE RECORD KEY IS ER-SOCIAL-SECURITY-NO ALTERNATE RECORD KEY IS ER-DEPT-NO WITH DUPLICATES.

6 © Mike Murach & Associates, HCC, IBM5 The DD statements The EMPMAST file and its alternate indexes KSDS with a homogeneous ddname 8 characters long //EMPMAST DD DSNAME=MMA2.EMPLOYEE.MASTER,DISP=SHR //EMPBYSSN DD DSNAME=MMA2.EMPLOYEE.MASTER.SSN.PATH, // DISP=SHR //EMPBYDPT DD DSNAME=MMA2.EMPLOYEE.MASTER.DEPT.PATH, // DISP=SHR //EMMASTER DD DSNAME=MMA2.EMPLOYEE.MASTER,DISP=SHR //EMMASTE1 DD DSNAME=MMA2.EMPLOYEE.MASTER.SSN.PATH, // DISP=SHR //EMMASTE2 DD DSNAME=MMA2.EMPLOYEE.MASTER.DEPT.PATH, // DISP=SHR

7 © Mike Murach & Associates, HCC, IBM6 New VSAM Data Sets (SMS Only) The Syntax Of The DD Statement //ddname DD DSNAME=data-set-name, // DISP=(NEW,normal-disp,abnormal-disp) [,UNIT=unit ] [,VOL=SER=vol-ser ] [,SPACE=(unit,(primary,secondary)) ] [,AVGREC= U | K | M ] [,RECORG= KS | ES | RR ] [,LRECL=length ] [,KEYLEN=length ] [,KEYOFF=offset ] [,LIKE=data-set-name ] [,STORCLAS=storage-class ] [,DATACLAS=data-class ] [,MGMTCLAS=management-class ]

8 © Mike Murach & Associates, HCC, IBM7

9 8 Create A KSDS A DD Statement Using A Specific Volume Request A DD Statement Using A Non-specific Volume Request //DUNNING DD DSNAME=MM01.DUNNING.MASTER, // DISP=(NEW,CATLG), // UNIT=SYSDA,VOL=SER=MPS800, // SPACE=(CYL,(200,50)), // RECORG=KS,LRECL=120, // KEYLEN=7,KEYOFF=5 //DUNNING DD DSNAME=MM01.DUNNING.MASTER, // DISP=(NEW,CATLG), // UNIT=SYSDA, // SPACE=(CYL,(200,50)), // RECORG=KS,LRECL=120, // KEYLEN=7,KEYOFF=5

10 © Mike Murach & Associates, HCC, IBM9 Create A KSDS A DD Statement Using An SMS Classes //DUNNING DD DSNAME=MM01.DUNNING.MASTER, // DISP=(NEW,CATLG), // STORCLAS=MVPS100, // DATACLAS=MVPD050, // MGMTCLAS=MVPM010, // LRECL=120, // KEYLEN=7,KEYOFF=5

11 © Mike Murach & Associates, HCC, IBM10 End Presentation


Download ppt "Stephen Linkin Houston Community College 28-Mar-07 © 2002 - Mike Murach & Associates, 2007 - HCC, IBM 1 JCL For VSAM Data Sets."

Similar presentations


Ads by Google