MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Parse ISRSUPC output with DFSORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sat Oct 06, 2007 3:43 am    Post subject: Parse ISRSUPC output with DFSORT Reply with quote

First of all, I have to admit that if I looked, and looked, and looked I would probably beable to piece the answer together. But, I am lazy, like most of the posters here and am hoping that Frank, Kolusu or someone else that already has the necessary parm cards will share it with me and thus saving much trial and error.

If i was home, I could look thru the tips,tricks and how-to's that I have PDFd and collected. But I am at a client site and have not transfered my complete library here and as a result, have to pray someone will take pity on me, show me mercy and also the necessary parsing parms.

anyway, thx to Kolusu, using IDPFX as one of the ISRSUPC PARMs, I can return output like this:
Code:

AZB001       114  009600          INCLUDE JCT041
AZB001       120  009705         INCLUDE HLT006
AZB001       126  009720         INCLUDE HYT014
AZB001       132  009780          INCLUDE SQLCA
AZB001       279  016797          INCLUDE HZC500

AZB001       284  016811     COPY HZL080.
AZB001       288  016815     COPY HZL855.
AZB001       292  016819     COPY HZL150.
AZB001       352  020900          INCLUDE HZP000


which saves a parsing pass. my goal is to extract from each non-blank line:
Cols 1-10 - whatever is there (is a pds member name in this case)
and after either ' copy ' or ' include ', whatever comes next. preferably without the period.
so my desired output is:
Code:

1 thru 10         15 thru ??
AZB001           JCT041
AZB001           HLT006
AZB001           HYT014
AZB001           SQLCA
AZB001           HZC500
AZB001           HZL080
AZB001           HZL855
AZB001           HZL150
AZB001           HZP000


whatever is in 1 thru 10 (non-blank lines) in 1-10. The extracted value after the ' COPY ' or ' INCLUDE ' would be in 15 thru whatever. The extracted value would be variable in length and end with a space.

I imagine I can generate a control card to remove the period. as well as sort out the space lines.

I hope someone will notice that I was so good to use a 'really good' topic title, something that could become a 'STICKY', perhaps?

holding my breath, dbz
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Oct 06, 2007 9:13 am    Post subject: Reply with quote

dbzTHEdinosauer,

I am still on vacation so here are untested control cards which would (i think) give you the desired results.

Code:

//SYSIN   DD *                                               
  OMIT COND=(01,10,CH,EQ,C' ')                               
  SORT FIELDS=COPY                                           
  INREC PARSE=(%01=(STARTAFT=C'INCLUDE ',                     
                    STARTAFT=C'COPY ',ENDBEFR=C' ',FIXLEN=8)),
        BUILD=(01,10,15:%01)                                 
                                                             
  OUTREC FIELDS=(1,10,15,08,TRAN=ALTSEQ)                     
  ALTSEQ CODE=(4B40)                                         
/*                                                           


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sat Oct 06, 2007 1:45 pm    Post subject: Reply with quote

Dick,

You don't need to apologe for asking for help. That's what this board is for and we're happy to help.

Kolusu's DFSORT control statements work, but here's an improved version that doesn't require OUTREC or ALTSEQ. The trick is to use ENDBEFR for a blank or a period.

Code:

  OMIT COND=(01,10,CH,EQ,C' ')                                   
  SORT FIELDS=COPY                                               
  INREC PARSE=(%01=(STARTAFT=C'INCLUDE ',STARTAFT=C' COPY ',     
          ENDBEFR=C'.',ENDBEFR=C' ',FIXLEN=8)),                   
        BUILD=(01,10,15:%01)                                     


Kolusu,

Enjoy your vacation and stop worrying about mvsforums. Laughing
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sun Oct 07, 2007 5:58 am    Post subject: Reply with quote

Frank & Kolusu,

thank you both. Unfortunately, the mainframe is on vacation during sundays (at least from us developers).

Modification of the STARTAFT parms will allow me to parse for anything that I 'searched for' with ISRSUPC.

I have rexx's to do this, but when you have 3000+ modules with 8000+ copybooks, after a while the output gets too large for a REXX. Also, I can use this as an example to help my current client to start using DFSORT instead of writing one-off cobol programs to rip&strip. Thx again for helping me, help my client.

dbz

dbz
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group