Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us