Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy member from one PDS to another based on Search String

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
S0C7

New User


Joined: 19 May 2006
Posts: 26

PostPosted: Thu May 29, 2014 10:39 am    Post subject: Copy member from one PDS to another based on Search String
Reply with quote

Hi,
I have a PDS which contains a mix of JCLs, PROCs, DMS cards etc. All of them are in a single PDS. I need to copy them into new PDS based on certain Search Strings. Example:

INPDS = "INPDS.PDS"
OUTPDSJ = "OUTPDS.JCL"
OUTPDSP = "OUTPDS.PROC" ....

My Search string wil use some keywords to identify if the member is JCL/PROC etc. Example, if 1st line contains " JOB " then its a JCL and should be copied to OUTPDS.JCL, if 1st line contains " PROC " then its a PROC and needs to be copied to OUTPDS.PROC and so on.

I am searching between REXX/SORT and other utilities to code this. Can someone please advise the shortest/easiest way to do this and possibly what code needs to be put in for this? I searched some topics on the forum but unable to get to something similar to this. Thanks in advance!
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Thu May 29, 2014 10:58 am    Post subject: Reply to: Copy member from one PDS to another based on Searc
Reply with quote

no out of the box solution ...
You could have a 3 steps job

1) SRCHFOR to extract the members
2) <SORT> to cleanup the srchfor sysout and build the relevant iebcopy control statements
3) IEBCOPY
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu May 29, 2014 11:46 am    Post subject: Reply to: Copy member from one PDS to another based on Searc
Reply with quote

When doing something like this, always remember "comments" in the members.

A JOB may include a comment about a PROC.

A PROC may include a comment about a JOB.

Of course, you may get lucky, and find that there are no useful comments in the PDS at all.

I'd go with enrico's suggestion.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us