Copies a PDS member from a source data set to a target data set.
EXEC $DSCALL OPT=COPYPDS
FROMDSN=source_dsn TODSN=target_dsn
MEMBER=member_name
REPLACE={ YES | NO }
STAT={ SHR | MOD | OLD }
SYSPRINT={ KEEP | DELETE | DSN }
DISPLAY={ YES | NO }
This call is used to copy a PDS member from a source data set to a target data set.
Operands:
Indicates that a copy of a PDS member is requested.
Specifies the data set which contains the member to be copied.
Specifies the data set to be copied to.
Specifies the names of the members to be copied. If MEMBER=* is specified, all members in the PDS are copied.
Specifies whether to replace an existing data set of the same name and is only applicable where the values of the FROMDSN and TODSN operands are both PDS data sets.
If REPLACE=YES is specified, the member name specified in the FROMDSN operand is copied and given the member name specified in the TODSN operand even if that member name already exists.
If REPLACE=NO is specified, the member specified in the FROMDSN operand is not copied if the member name specified in the TODSN operand already exists.
Specifies whether the data set specified in the TODSN operand is allocated exclusively for the copy operation (STAT=OLD), or is shared with other users (STAT=SHR). It is recommended that STAT=OLD be used as data set integrity cannot be guaranteed if another user attempts to access the data set while the copy operation is in progress.
The data set specified in the FROMDSN operand is always allocated with STAT=SHR.
You can use STAT=MOD to modify a sequential data set by adding new records after the last record in the data set.
Specifies the type of data set to be allocated to the SYSPRINT DD for the copy operation.
Specifies whether to display the output on completion of the function. This operand is only valid if SYSPRINT=DSN is specified. If DISPLAY=YES is specified, a full-screen display of the SYSPRINT data set is presented after the copy operation has completed.
Return Codes:
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Examples: OPT=COPYPDS
EXEC $DSCALL OPT=COPYPDS FROMDSN=dsn1_name TODSN= dsn2_name MEMBER=member_name STAT=SHR SYSPRINT=DSN DISPLAY=YES
This example copies member_name from dsn1_name to dsn2_name and displays the sysprint output to the screen.
EXEC $DSCALL OPT=COPYPDS FROMDSN=dsn1_name TODSN=dsn2_name MEMBER=member_name STAT=SHR SYSPRINT=DELETE
This example copies member_name from dsn1_name to dsn2_name and deletes the sysprint output.
| Copyright © 2009 CA. All rights reserved. |
|