|
|
| Author |
Message |
Krishnaraja
New User
Joined: 22 Apr 2007 Posts: 4 Location: Chennai
|
|
|
|
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 |
|
 |
References
|
Posted: Mon Jun 16, 2008 12:16 pm Post subject: Re: Need to extract the data after the Specific word using SORT |
 |
|
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4228 Location: San Jose, CA
|
|
|
|
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 |
|
 |
|
|