IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort to extract lines


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
markzasz

New User


Joined: 04 Apr 2017
Posts: 9
Location: USA

PostPosted: Fri Jun 11, 2021 4:51 pm
Reply with quote

Hello,

I have a datasets that contains 22 millions lines and 450,000 IDCMAS Define statements along with many other commands. I would like to scan the dataset and create multiple output files that contain the Define statements based on the usercatalog.

my defines look like this in the dataset.

Code:
/* DEFINE -
NONVSAM( -
NAME(PCMSS.MS3AT.EXTRACT.INDX.BASE.G0001V00) -
RECATALOG -
VOLUMES(MG4W12) -
DEVICETYPES(3390) -
) -
CATALOG(CATALOG.DZOSPLX.PROD05);


So when you find "/* DEFINE"
- save DEFINE and the next 7 lines
- and write the saved info to one of five output files.

the reason for five output files is we have 5 User Catalogs that these defines are going to and we would like to break the defines up by User Cataloag.

Thank you,

Mark...
Code'd for you
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Fri Jun 11, 2021 5:07 pm
Reply with quote

In general you should have some DEFINEs with more than one volume. With SORT you can IFTHEN GROUP with BEGIN and END.

Please post what you have tried and make use of code tags for data/code.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2022
Location: USA

PostPosted: Fri Jun 11, 2021 6:40 pm
Reply with quote

The post includes only the description of the task without any question…


I consider this as one more story like “One day in the life of a software developer”

Thank you very much for sharing your feelings about your IT life. 2014.gif 358.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri Jun 11, 2021 7:22 pm
Reply with quote

looks like REXX/COBOL stuff would be easier and flexible.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Fri Jun 11, 2021 8:44 pm
Reply with quote

Rohit Umarjikar wrote:
looks like REXX/COBOL stuff would be easier and flexible.

This is simple SORT stuff and does not need any additional programming IMHO. The DEFINE misses the closing comment, I am confident it's there. Use IFTHEN WHEN=GROUP BEGIN and END to filter for the individual sections. Do NOT rely on the fact that each section has 7 lines, if it looks too good to be true - it wont be.
Back to top
View user's profile Send private message
markzasz

New User


Joined: 04 Apr 2017
Posts: 9
Location: USA

PostPosted: Fri Jun 11, 2021 8:46 pm
Reply with quote

thank you all for your input.... i will be seeking another alternative......
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri Jun 11, 2021 9:44 pm
Reply with quote

Joerg.Findeisen wrote:
Rohit Umarjikar wrote:
looks like REXX/COBOL stuff would be easier and flexible.

This is simple SORT stuff and does not need any additional programming IMHO. The DEFINE misses the closing comment, I am confident it's there. Use IFTHEN WHEN=GROUP BEGIN and END to filter for the individual sections. Do NOT rely on the fact that each section has 7 lines, if it looks too good to be true - it wont be.
Wasnt a ask to create dynamic data sets per each /* DEFINE break? or I misunderstood the ask ?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Fri Jun 11, 2021 9:58 pm
Reply with quote

Rohit Umarjikar wrote:
Wasn't a ask to create dynamic data sets per each /* DEFINE break? or I misunderstood the ask ?

Five Catalogs to split the data for. Sorry when I have my picture of what (I would have) to do here. The task itself seems simple.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri Jun 11, 2021 10:36 pm
Reply with quote

I get it now and I agree DFSORT would be simple to split 5 DEFINEs +7 lines into 5 catalogs.
Earlier, I thought of more hence suggested programmatic approach.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top