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

Need to extract the data after the Specific word using SORT


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

New User


Joined: 22 Apr 2007
Posts: 5
Location: Chennai

PostPosted: Mon Jun 16, 2008 12:16 pm
Reply with quote

I have the input file with the data as follows


MCD APRIL MCD TEST# RAJA REP# YUI
MCD DECEMBER MCD TEST# RAJA REP# HUI
MCD APRIL MCD TEST# RAJA REP# ZEN PLUS VARIOUS
MCD APRIL MCD TEST# RAJA REP# POSE PLUS VARIOUS
MCD APRIL MCD TEST# RAJA REP# HERE PLUS VAR


I need to extract the data after the word "REP#" from every row. Can anyoone help in extracting the data.
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: Mon Jun 16, 2008 8:28 pm
Reply with quote

Here's a DFSORT job that will do what you asked for. I assumed you want the blank after REP# and that the data after REP# can be a maximum of 50 bytes. Change as appropriate.

Code:

//S1    EXEC  PGM=ICEMAN                               
//SYSOUT    DD  SYSOUT=*                               
//SORTIN DD *                                           
MCD APRIL MCD TEST# RAJA REP# YUI                       
MCD DECEMBER MCD TEST# RAJA REP# HUI                   
MCD APRIL MCD TEST# RAJA REP# ZEN PLUS VARIOUS         
MCD APRIL MCD TEST# RAJA REP# POSE PLUS VARIOUS         
MCD APRIL MCD TEST# RAJA REP# HERE PLUS VAR   
/*         
//SORTOUT DD SYSOUT=*                                   
//SYSIN    DD    *                                     
  OPTION COPY                                           
  INREC PARSE=(%01=(STARTAFT=C'REP#',FIXLEN=50)),       
    BUILD=(%01)             
/*                           
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top