![]() Chapter Contents |
![]() Previous |
![]() Next |
| PDSCOPY |
| OS/390 specifics: | all |
| Syntax | |
| Details | |
| PROC PDSCOPY Statement | |
| Options | |
| EXCLUDE Statement | |
| SELECT Statement | |
| Output Data Set | |
| Usage Notes | |
| Output | |
| Example of Copying Members Using the PDSCOPY Procedure | |
Syntax |
PROC PDSCOPY INDD=file-specification
OUTDD=file-specification <options >;
|
| Details |
The PDSCOPY procedure can be used to copy an entire partitioned data set, or you can specify which members you want to copy. This procedure cannot be used to copy extended partitioned data sets (PDSEs). PROC PDSCOPY is useful for backing up source libraries and load module libraries to tape. If you use PROC PDSCOPY to copy a PDS to tape, then you must also use it if you want to copy that PDS back to disk. However, you can use either PROC PDSCOPY or other copy utilities to copy that tape to another tape.
When libraries are moved between disks that have different optimal block sizes, PROC PDSCOPY can be used to reblock the libraries. PROC PDSCOPY handles overlay programs and alias names. It also sets up the RLD count fields that are used by the FETCH program.
When a PDS contains load modules, it generally requires 13% to 18% less disk space after being copied by PROC PDSCOPY, because PROC PDSCOPY uses free space on a partially filled track to store records. The linkage editor constructs records that do not fit on a partially used track.
The PDSCOPY procedure does not copy scatter-loaded modules.
If errors are encountered during PDSCOPY processing, the return code for the job step is set to 8.
| PROC PDSCOPY Statement |
| PROC PDSCOPY INDD=file-specification OUTDD=file-specification <options>; |
Some of the options that can appear in the PROC PDSCOPY statement apply to both source libraries and load module libraries. Others apply only to load module libraries. The following options apply to both source libraries and load module libraries:
| ALIASMATCH=TTR | |
| BLKSIZE= | |
| INTAPE | |
| NEWMOD | |
| NOALIAS | |
| NOREPLACE | |
| OUTTAPE | |
| SHAREINPUT |
The following options apply only to load module libraries:
| ALIASMATCH=BOTH|EITHER|NAME | |
| DC | |
| DCBS|NODCBS | |
| MAXBLOCK= | |
| NE | |
| NOTEST |
All the options that can appear in the PROC PDSCOPY statement are discussed in this section. In the discussion, the term member refers to both source library members and to load modules. The term module refers only to load modules.
A situation in which names match even though TTR values do not match occurs when the main module is originally link edited specifying the alias names, and then link edited again without specifying them. In this case, the directory entries for the aliases still point to the old version of the module (that is, to a back-level version). Because of this, you should consider carefully whether to use the ALIASMATCH=NAME option or the NEWMOD option. ALIASMATCH=NAME updates the aliases to point to the current version of the main module rather than to the back-level version. The NEWMOD option causes the older version of the module to copy. Another alternative is to use TTR matching and not to copy the aliases when they are, in fact, obsolete names.
For load modules, the most common situation in which TTR values might match, but names may not match, occurs when the main module was renamed (for example, by using ISPF option 3.1) after the aliases were created. The alias directory entries may still contain the old main module name.
Whichever method you use, unmatched aliases are not copied to the output file unless you specify the NEWMOD option (see NEWMOD). Matched aliases in the output file always point to the main module to which they were matched (that is, they have the same TTR values), even if the TTR values were different in the input file (which might occur if ALIASMATCH=NAME or ALIASMATCH=EITHER was used). When modules are matched using the TTR values (that is, when TTR or EITHER was specified), the main module name in alias directory entries is changed in the output file.
For tape (sequential) format output, the specified block size cannot be less than 1.125 times the maximum input device block size, nor greater than 32,760. For disk output, the specified block size cannot be less than 1,024.
If the NODCBS option is specified, PROC PDSCOPY changes the DSCB (data set control block) block size of the output partitioned data set to the maximum permissible block size for the device. Otherwise, the maximum permissible value of the BLKSIZE= option is the current block size value from the DSCB, and the DSCB block size is not changed.
Using the NODCBS option may enable PROC PDSCOPY to block output load modules more efficiently. However, changing the DSCB block size could cause problems when the data set is moved, copied, or backed up by a program other than PROC PDSCOPY, particularly if your installation has more than one type of disk drive. Consult your systems staff before specifying NODCBS.
| EXCLUDE Statement |
| EXCLUDE member-name-1 <. . . member-name-n>; |
If you follow a specification in the EXCLUDE statement with a colon (:), then all members whose names begin with the characters preceding the colon are excluded.
Note: You cannot use both the
SELECT statement and the EXCLUDE statement in one PROC PDSCOPY step. ![[cautionend]](../common/images/cautend.gif)
| SELECT Statement |
| SELECT member-name-1 <. . . member-name-n>; |
If you follow a specification in the SELECT statement with a colon (:), then all members whose names begin with the characters preceding the colon are copied. In the following example all members whose names begin with the characters FCS are copied:
select fcs:;
Note: You cannot use both the SELECT statement and the EXCLUDE statement
in one PROC PDSCOPY step. ![[cautionend]](../common/images/cautend.gif)
| Output Data Set |
If you use PROC PDSCOPY to copy partitioned data sets that contain source members, then the RECFM and LRECL of the output data set must match those of the input data set. If they differ, an error message is displayed. The BLKSIZE values for the input and output data sets do not have to be the same, however.
| Usage Notes |
If a member that you specified in a SELECT statement does not exist, PROC PDSCOPY issues a warning message and continues processing.
PROC PDSCOPY enqueues the input and output data sets using the SPFEDIT and SPFDSN QNAMEs.
| Output |
The PDSCOPY procedure writes the following information to the SAS log:
If the output device is a disk, PROC PDSCOPY also writes the following information next to each member name:
| Example of Copying Members Using the PDSCOPY Procedure |
filename old 'userid.mvs.output' disp=shr;
filename new 'userid.mvs.output2' disp=old;
proc pdscopy indd=old outdd=new aliasmatch=both
shareinput;
select out:;
run;
PDSCOPY Procedure Example shows the results.
1 filename old 'userid.mvs.output' disp=shr;
2 filename new 'userid.mvs.output2' disp=shr;
3
4 proc pdscopy indd=old outdd=new aliasmatch=both shareinput;
5 select out:;
6 run;
SAS PROC PDSCOPY VERSION 8.00 04/24/99
INPUT DSNAME=USERID.MVS.OUTPUT VOL=SER=XXXXXX
OUTPUT DSNAME=USERID.MVS.OUTPUT2 VOL=SER=XXXXXX
MEMBER TRACKS SIZE
ALIAS
OUT1601 2.6 40019 replaced
OUT1602 10.6 165519 replaced
OUT1603 53.3 829081 replaced
TRACKS USED 67.0
UNUSED 8.0
TOTAL 75.0
EXTENTS 5 |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.