IEBCOPY SELECT

IEBCOPY EXCLUDE Converting Load Modules to Program

Advertisements


Specifies which members in the input data set are to be copied.

The SELECT statement specifies members to be selected from input data sets to be altered, copied, loaded, or unloaded to an output data set.

A SELECT statement cannot appear with an EXCLUDE statement in the same copy, unload, or load step.


syntax:


LabelStatementParameters
[label]SELECTMEMBER=({name1|
(name1,newname1[,R])|
(name1,,R)}
[,{name2|
(name2,newname2[,R])|
(name2,,R)}][,...])
MEMBER=({name|(name, newname[,R])|(name,,R)} [,...])

specifies the members to be selected from the input data set.

nameor filter pattern mask

identifies a specific member to be processed.

newname

specifies a new name for a selected member.

Member names can consist of A - Z, 0 - 9, or $ # @ _ } \, or {, and cannot be more than eight characters in length.

R

specifies that the members to be copied or loaded from input data set are to replace any identically named members on the output PDS.

Example:

A partitioned data set (DATASET1) is copied from one disk volume to another.


  //COPYDS   JOB   ...
  //STEP01   EXEC  PGM=IEBCOPY
  //SYSPRINT DD  SYSOUT=A
  //SYSUT1   DD  DSNAME=DATASET1,UNIT=disk,VOL=SER=111111,
  //             DISP=SHR
  //SYSUT2   DD  DSNAME=DATASET2,UNIT=disk,VOL=SER=111112,
  //             DISP=(NEW,KEEP),SPACE=(TRK,(5,1,2))
  //SYSIN    DD  *
       COPY INDD=(SYSUT1),OUTDD=SYSUT2 
       SELECT   MEMBER=B
  /*
  

Let’s discuss the example in detail.

  • SYSUT1 DD defines a PDS DATASET1 that contains three members (A, B and C).
  • SYSUT2 DD defines a new PDS DATASET2 that is to be kept after the copy operation.
  • Input and output data sets are identified as SYSUT1 and SYSUT2, the SYSIN data set is not needed.
  • The SYSUT1 data set will be copied to the SYSUT2 data set only B.
  • After the copy operation is finished, DATASET2 will contain the Bfrom DATASET1.

IEBCOPY EXCLUDE Converting Load Modules to Program

Advertisements