%PCDSN Extension

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.

For example, to assign a PC physical filename to a data set you are creating using JCL:

//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.

Note: 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\*.DAT

This 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.

Similarly, to assign a physical PC filename to a data set you are creating using IDCAMS:

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.

To continue the %PCDSN parameter over more than one line, you must following the JCL rules for continuations.

//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.

If the name ends exactly in column 71, the only thing left to put in the next line in column 16 is the ending quote:

//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:        '

Finally, if you are using this in IDCAMS, then you follow IDCAMS rules (+ at the end etc. but columns 17/71 do not matter). For example:

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')