View previous topic :: View next topic
|
Author |
Message |
markzasz
New User
Joined: 04 Apr 2017 Posts: 9 Location: USA
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1255 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2022 Location: USA
|
|
|
|
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. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
looks like REXX/COBOL stuff would be easier and flexible. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1255 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
markzasz
New User
Joined: 04 Apr 2017 Posts: 9 Location: USA
|
|
|
|
thank you all for your input.... i will be seeking another alternative...... |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1255 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
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 |
|
|
|