The following example shows a sorted cross-reference of COPY or BASIS statements to the data-set names of the associated copybooks, produced by the XREF compiler option under z/OS. Numbers in parentheses refer to notes after the example.
COPY/BASIS cross-reference of text-names, library names
(1) (1) (2) (3) (4)
Text-name Library File name Concat ISPF
(Member) (DDNAME) (Data set name) Level Created
ACTIONS OTHERLIB USERID.COBOL.COPY 0 1992/07/11
ACTIONS SYSLIB USERID.COBOL.COPY 0 1992/07/11
CUSTOMER ALTDDXXY USERID.COBOL.LIB3 0 2007/06/01
CUSTOMER SYSLIB USERID.COBOL.LIB2PDSE 1 2007/06/07
HOUSE ALTDDXXY USERID.COBOL.LIB2 1 2007/06/07
HOUSE SYSLIB USERID.COBOL.LIB2PDSE 1
IMOTOR SYSLIB USERID.COBOL.LIB4X 3 2007/06/07
ISOVERFY SYSLIB USERID.COBOL.COPY 0
NSMAP SYSLIB USERID.COBOL.LIB3 2
For example, four data sets in the example above are concatenated to ddname SYSLIB:
DDNAME DSNAME (concatenation level)
SYSLIB DD DSN=USERID.COBOL.COPY, 0
DD DSN=USERID.COBOL.LIB2PDSE, 1
DD DSN=USERID.COBOL.LIB3, 2
DD DSN=USERID.COBOL.LIB4X 3
Thus for example member NSMAP shown in the listing above was found in data set USERID.COBOL.LIB3, which is two levels down from the first data set in the SYSLIB concatenation.
If you compile in the z/OS UNIX shell, the cross-reference looks like the excerpt shown below.
COPY/BASIS cross-reference of text-names, library names, and file names
(5) (5) (6)
Text-name Library-name File name
'/copydir/copyM.cbl' SYSLIB /u/JSMITH/cobol//copydir/copyM.cbl
'/copyA.cpy' SYSLIB /u/JSMITH/cobol//copyA.cpy
'cobol/copyA.cpy' ALTDD2 /u/JSMITH/cobol/copyA.cpy
'copy/stuff.cpy' ALTDD2 /u/JSMITH/copy/stuff.cpy
'copydir/copyM.cbl' SYSLIB /u/JSMITH/cobol/copydir/copyM.cbl
'copydir/copyM.cbl' SYSLIB (default) /u/JSMITH/cobol/copydir/copyM.cbl
'stuff.cpy' ALTDD /u/JSMITH/copy/stuff.cpy
"copyA.cpy" (7) SYSLIB (default) /u/JSMITH/cobol/copyA.cpy
"reallyXXVeryLongLon> SYSLIB (default) (8)<JSMITH/cobol/reallyXXVeryLongLongName.cpy
OTHERDD ALTDD2 /u/JSMITH//copy/other.cob
. . .
Note: Some names were truncated. > = truncated on right < = truncated on left
COPY 'cobol/copyA.cpy' Of ALTDD2