The %PCDSN extension can be used both in JCL and in IDCAMS. You use it when creating a new data set. It specifies a physical PC filename to be associated with the MVS data set name. If you do not use it, a PC filename is generated automatically.
//SYSUT2 DD DSN=MFIDSA.NONVSAM.WITH.SPECIFIC.PCNAME,// DISP=(NEW,CATLG),SPACE=(TRK,1) //*MFE: %PCDSN='<CATALOGFOLDER>\MYFILE.NONVSAM.DAT'
The extension comes after a “//*”, so that the mainframe will see it as a comment. It must be on a line by itself and must follow the last of the DD statement lines to which it applies. The string “<CATALOGFOLDER>”, written exactly as shown, means the folder containing the catalog. The quotes (note: single quotes) surrounding the value are needed if the name does not conform to JCL’s rules; for example, if it contains spaces or lower-case characters.
You can create dynamic PDSs by using this extension syntax as illustrated in the following example:
//DD1 DD DSN='TEST.DYN1',DISP=(NEW,CATLG),// DCB=(RECFM=FB,LRECL=123,DSORG=PO) //*MFE: %PCDSN=C:\DPDS\*.DATThis will create TEST.DYN1 as a dynamic PDS whose members are files in the directory C:\DPDS with the extension .DAT. The data set organization must be PO.
DEFINE CLUSTER( - NAME(DSA.LIB.VSAMSRC2 ) - CONTROLINTERVALSIZE (4096) - RECORDSIZE(4088 4088) - REUSE - NUMBERED - SHAREOPTION (4 4) - CYLINDERS (2 1) - ) - ;MFE:%PCDSN(E:\MYDIR\MYFILE.DAT)
The extension comes after a semicolon, so that the mainframe will see it as a comment. We recommend that it be on a line by itself. Just as in JCL, you can use “<CATALOGFOLDER>” to mean the folder containing the catalog; and single quotes are needed surrounding the value if the name does not conform to IDCAMS’s rules.
//SYSUT2 DD DSN=MFIDSA.TEST.NONVSAM.WITH.LONG.PCNAME, // DISP=(NEW,CATLG),SPACE=(TRK,1),LRECL=80,RECFM=F,DSORG=PS //*MFE: %PCDSN='<CatalogFolder>/DATA/pcname_long_name.node_name3.node_n //*MFE: ame4.node_name5.node_name6.node_name7.node_name8.node_na //*MFE: me9.with.long.pcname.for.nonvsam.dataset'
In this case, the name begins immediately after "=", goes on until column 71 (there is nothing in column 72), then resumes on the next line at column 16 and so on, finishing with the ending quote. Make sure you have //*MFE: in columns 1 through 7 of all records.
//SYSUT2 DD DSN=MFIDSA.TEST.NONVSAM.WITH.LONG.PCNAME, // DISP=(NEW,CATLG),SPACE=(TRK,1),LRECL=80,RECFM=F,DSORG=PS //*MFE: %PCDSN='<CATALOGFOLDER>/DATA/PCNAME_LONG_NAME.NODE_NAME3.FL.DAT //*MFE: '
DEFINE CLUSTER(NAME(MFIDSA.TEST.VSAMKSDS.WITH.LONG.PCNAME ) - TRK(1 1) - RECSZ(80 80) KEYS(9 0) ) - ;MFE:%PCDSN - ('<CatalogFolder>/DATA/pcname_long_name.node_name3.node_t+ ame4.node_name5.node_name6.node_name7.node_name8.node_nam+ e9.with.long.pcname.for.vsamksds.dataset')