Hi,
Would need some assistance and directions for the below requirement of mine.
I Have a PDS : ABC.DEF.GHI
It has several members, I need to take all the members which start from a1 and copy into a PS. As in all the "A1* " members in a PDS.
My work
Utility IEBPTPCH helps to copy all members into a PS.
We can also give member names in it. But it does not supports wildcards such as * (asterisk).
Same is the case with IEBCOPY too.
Appreciate your time and help on this.
Let me know, if any other info is required.
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
You can use IEBCOPY as below:
Code:
//STEP01 EXEC PGM=IEBCOPY,REGION=4M
//SYSUT1 DD DISP=SHR,DSN=IN.PDS
//SYSUT2 DD DISP=SHR,DSN=OUT.PDS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY INDD=SYSUT1,OUTDD=SYSUT2
SELECT MEMBER=MEM00001, X
MEM00002, X
MEM00003, X
MEM00004, X
MEM00005
Note that X in col 72 is to continue the copy control statement and stop at a comma. You can put any nonblank character in column 72 and start in column 16 on the next record.
You can use ISPF commands or REXX or SORT to apply the formatting required to build the control crads for IEBCOPY.
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
How about copying the required members to a temporary PDS and then using IEBPTPCH or IEBCOPY?
You can easily get the members required:
use a mask in the member name in option 3.3
the S *
and voila - your target members are copied to a PDS all of their own.
Thanks Mistah and Nic.
I did get the simplicity involved with Nic's Suggestion.
How would I get the results from the 3.3 option in batch would be my next question ( Any utilities which would get me to choose the PDS memebers to be included with wild cards as *) . If I could get some help there, that would be great.
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
Although you list only COBOL and JCL as skills, Saurabh, if someone in your shop knows ISPF services (and preferably Rexx, although you could call the services from COBOL), this becomes a trivial exercise.