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

find and extract values from different positions


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

New User


Joined: 05 Jun 2007
Posts: 5
Location: coimbatore

PostPosted: Sat Dec 01, 2007 3:44 pm
Reply with quote

Code:

ASDF ASDFS COPY SDFSGWER
ASDF COPY SDFSGWSD
ASDF COPY SDFSGWAC
COPY SDFSGWSE
SDFSSDF COPY SDFSGWSD
SDF COPY SDFSGWAR


The copybook names appear in different positions. I want to find each copybook name after 'COPY ' and extract it to the output file so I end up with just the list of copybook names like this

Bye

Nisha
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Dec 01, 2007 9:48 pm
Reply with quote

That's the example shown in the "Find and extract values from different positions" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

I'm not sure why you posted this here, but here's the DFSORT job.

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ASDF ASDFS COPY SDFSGWER
ASDF COPY SDFSGWSD
ASDF COPY SDFSGWAC
COPY SDFSGWSE
SDFSSDF COPY SDFSGWSD
SDF COPY SDFSGWAR
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  INREC PARSE=(%=(ENDAT=C'COPY'),
    %00=(STARTAFT=BLANKS,FIXLEN=8)),
    BUILD=(%00)
/*


SORTOUT will have:

Code:

SDFSGWER 
SDFSGWSD 
SDFSGWAC 
SDFSGWSE 
SDFSGWSD 
SDFSGWAR 
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top