Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 14 Mar 2007
Posts: 10700
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

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 Members search in PDS Dilipmg05 JCL & VSAM 9 Wed Sep 16, 2020 11:29 pm
No new posts How to process dependent file based o... HithaSri JCL & VSAM 8 Sun Sep 06, 2020 12:42 pm
This topic is locked: you cannot edit posts or make replies. SORT the records based on the second ... Ramsee SYNCSORT 1 Wed Aug 19, 2020 3:01 pm
No new posts Determine what library member is in, ... mdwait JCL & VSAM 9 Thu Jul 23, 2020 3:02 am
No new posts VSAM Open During Copy-Excessive EXCP ... David Beckham JCL & VSAM 1 Sat Jun 27, 2020 5:23 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us