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

REXX to find /* Define and write the next 9 lines


IBM Mainframe Forums -> CLIST & REXX
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
markzasz

New User


Joined: 04 Apr 2017
Posts: 8
Location: USA

PostPosted: Fri Jun 11, 2021 4:22 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.

/* 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...
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


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

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

Consider using a SORT product for this mass data processing, more fun.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 502
Location: London

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

This seems a very odd thing to do unless perhaps you're cloning the volumes and making them available on other Sysplexes or VM Z/OS guests or something.

Trying to catalog the 'same' physical dataset, as implied by volser being coded, in 4 different catalogs on the same Sysplex? I'm not even sure it would be possible if they're SMS managed because the catalog backward pointer in the datasets NVR record in the volumes VVDS can only point to one catalog, which would get a mismatch during RECATALOG processing if a different catalog was specified.
Back to top
View user's profile Send private message
markzasz

New User


Joined: 04 Apr 2017
Posts: 8
Location: USA

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

I am not cloning the same dataset, i have a dataset with 25 million lines of IDCMAS statements created by a TACM Program, in this dataset i have 492,000 IDCAMS Define statements i would like to extract and place in a separate dataset that only contains the IDCAMS Define statements.

So one dataset with 492,000 of these.....

DEFINE -
NONVSAM( -
NAME(PCMSS.MS3AT.EXTRACT.INDX.BASE.G0001V00) -
RECATALOG -
VOLUMES(MG4W12) -
DEVICETYPES(3390) -
) -
CATALOG(CATALOG.DZOSPLX.PROD05);
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 201
Location: Toronto, ON, Canada

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

Try using SuperSearch (ispf option 3.15). Set process option LPSF which will list lines before and after a find. Then define and edit a Statements DSN and code a "LPSFV 7" to specify lines instead of the default 6. Using the results from this you can then process with a Rexx.
NOTE: the EXECIO cannot read a large quantity of lines. You will need to put inside a loop and process maybe 1000 lines at a time. Good luck.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


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

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

Mark Zaszczurynski, Please don't post twice the same question under different section.
ibmmainframes.com/viewtopic.php?p=352327#352327
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Write a current record plus previous ... DFSORT/ICETOOL 4
No new posts Sort to extract lines DFSORT/ICETOOL 8
No new posts Cant find hex value using IFTHEN=(WHEN DFSORT/ICETOOL 12
No new posts Write records with 3 or less rows in ... DFSORT/ICETOOL 3
No new posts rexx pgm to create multiple ps file IBM Tools 7
Search our Forums:

Back to Top