Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

find and extract values from different positions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: find and extract values from different positions
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 Moderator


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

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

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

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us