Edit model example: JCL that calls the DSC function
This example shows how to use edit models to generate a batch job to copy a data set using the DSC function.
- Select option 2 from the ISPF Primary Option Menu.
- In the Edit Entry Panel, enter the name of a new member in a data set of
type
JCL
. Example:Data Set Name . . . 'EXAMPLE.JCL(newdscx)'
- In the edit session, enter the MODEL primary
command.
File Edit Edit_Settings Menu Utilities Compilers Test Help ─────────────────────────────────────────────────────────────────────────────── EDIT EXAMPLE.JCL(NEWDSCX) - 01.00 Columns 00001 00072 Command ===> model Scroll ===> CSR ****** ***************************** Top of Data ****************************** '''''' ''''''
The File Manager Models panel lists the available edit models in the JCL class. - Enter JB.
The edit model for the File Manager Base JCL is copied into the edit session.
File Edit Edit_Settings Menu Utilities Compilers Test Help ─────────────────────────────────────────────────────────────────────────────── EDIT EXAMPLE.JCL(NEWDSCX) - 01.00 Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ****************************** =NOTE= ---------------------------------------------------- =NOTE= -- --- =NOTE= -- BASE JCL --- =NOTE= -- --- =NOTE= ---------------------------------------------------- 000001 //FILEMGR EXEC PGM=FILEMGR 000002 //STEPLIB DD DSN=FMN.SFMNMOD1,DISP=SHR =NOTE= If using WMQ queues via batch, uncomment and update MQHLQ to suit =NOTE= your sites WMQ high level qualifier =NOTE= DD DSN=MQHLQ.SCSQLOAD,DISP=SHR =NOTE= DD DSN=MQHLQ.SCSQANLE,DISP=SHR =NOTE= DD DSN=MQHLQ.SCSQAUTH,DISP=SHR =NOTE= If referring to CICS resources uncomment and update CICSHLQ to suit =NOTE= your sites CICS high level qualifier =NOTE= DD DSN=CICSHLQ.SDFHEXCI,DISP=SHR =NOTE= Uncomment and update IGY if you need the COBOL compiler in STEPLIB =NOTE= DD DSN=IGY.SIGYCOMP,DISP=SHR =NOTE= //FMNCOB DD DUMMY Include to force use of FM COBOL Compiler =NOTE= //FMNCLERR DD SYSOUT=* Include to force output of Compiler listing 000003 //FMNFRPT DD SYSOUT=* 000004 //SYSTSPRT DD SYSOUT=* ⋮
Notes are identified by the characters
=NOTE=
in the line command field. The notes contain information to help in modifying the JCL statements and parameters. - Issue the RESET command to permanently remove the note lines, leaving only the data lines.
- Overtype line 000013 with the A line command and then enter the
MODEL primary
command.
File Edit Edit_Settings Menu Utilities Compilers Test Help ─────────────────────────────────────────────────────────────────────────────── EDIT EXAMPLE.JCL(NEWDSCX) - 01.00 Columns 00001 00072 Command ===> model Scroll ===> CSR ****** ***************************** Top of Data ****************************** 000001 //FILEMGR EXEC PGM=FMNMAIN 000002 //STEPLIB DD DSN=FMN.SFMNMOD1,DISP=SHR 000003 //FMNFRPT DD SYSOUT=* 000004 //SYSTSPRT DD SYSOUT=* 000005 //SYSTSIN DD * 000006 //SYSPRINT DD SYSOUT=* 000007 //SYSOUT DD SYSOUT=* 000008 //FMNTSPRT DD SYSOUT=* 000009 //SYSTERM DD SYSOUT=* 000010 //FMNODPP DD DISP=SHR,DSN=OPTIM.ODPP.SAMPLIB(ENVVARS) 000011 //FMNAUTH DD DISP=SHR,DSN=fmn.auth.dsn 000012 //FMNEXEC DD DISP=SHR,DSN=fmn.exec.library a //SYSIN DD * ****** **************************** Bottom of Data ****************************
- Enter DSC.
The edit model for the data set Resource Copy function is copied into the edit session.
File Edit Edit_Settings Menu Utilities Compilers Test Help ─────────────────────────────────────────────────────────────────────────────── EDIT EXAMPLE.JCL(NEWDSCX) - 01.00 Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ****************************** 000001 //FILEMGR EXEC PGM=FMNMAIN 000002 //STEPLIB DD DSN=FMN.SFMNMOD1,DISP=SHR 000003 //FMNFRPT DD SYSOUT=* 000004 //SYSTSPRT DD SYSOUT=* 000005 //SYSTSIN DD * 000006 //SYSPRINT DD SYSOUT=* 000007 //SYSOUT DD SYSOUT=* 000008 //FMNTSPRT DD SYSOUT=* 000009 //SYSTERM DD SYSOUT=* 000010 //FMNODPP DD DISP=SHR,DSN=OPTIM.ODPP.SAMPLIB(ENVVARS) 000011 //FMNAUTH DD DISP=SHR,DSN=fmn.auth.dsn 000012 //FMNEXEC DD DISP=SHR,DSN=fmn.exec.library 000013 //SYSIN DD * =NOTE= The following are main parameters that will be used for Data Set Copy 000014 $$FILEM DSC , =NOTE= ******************************************************** =NOTE= ** ** =NOTE= ** Main DSC parameters input/output resources ** =NOTE= ** ** =NOTE= ******************************************************** 000015 $$FILEM DSNIN=dsname, =NOTE= DSNIN=dsname =NOTE= Defines the name of the From data set or an absolute path to the ⋮
- Once again, issue the RESET command to remove the note
lines.
File Edit Edit_Settings Menu Utilities Compilers Test Help ─────────────────────────────────────────────────────────────────────────────── EDIT EXAMPLE.JCL(NEWDSCX) - 01.00 Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ****************************** 000001 //FILEMGR EXEC PGM=FMNMAIN 000002 //STEPLIB DD DSN=FMN.SFMNMOD1,DISP=SHR 000003 //FMNFRPT DD SYSOUT=* 000004 //SYSTSPRT DD SYSOUT=* 000005 //SYSTSIN DD * 000006 //SYSPRINT DD SYSOUT=* 000007 //SYSOUT DD SYSOUT=* 000008 //FMNTSPRT DD SYSOUT=* 000009 //SYSTERM DD SYSOUT=* 000010 //FMNODPP DD DISP=SHR,DSN=OPTIM.ODPP.SAMPLIB(ENVVARS) 000011 //FMNAUTH DD DISP=SHR,DSN=fmn.auth.dsn 000012 //FMNEXEC DD DISP=SHR,DSN=fmn.exec.library 000013 //SYSIN DD * 000014 $$FILEM DSC , 000015 $$FILEM DSNIN=dsname, 000016 $$FILEM INPUT=ddname, 000017 $$FILEM VOLSERIN=volser, 000018 $$FILEM MEMBER=member1, 000019 $$FILEM DSNOUT=dsname, ⋮
You now have a JCL member that can be used to copy a data set using the File Manager DSC function.