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
 
Need to extract the data after the Specific word using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need to extract the data after the Specific word using SORT
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 Moderator


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

PostPosted: Mon Jun 16, 2008 8:28 pm    Post subject:
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    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 OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 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 Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
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