View previous topic :: View next topic
|
Author |
Message |
puneetvirmani143
New User
Joined: 24 Jul 2007 Posts: 55 Location: noida
|
|
|
|
Hi,
I have a Input file of LRECL 1200.
using SORT I want to reject the records which have all 'N' written starting from Byte position 601 till 1200.
ex. I want to reject records which have N(601th Pos)NNNNN..........N(1200 byte position).
Can anyone help on urgent note.
Regards
Puneet |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Yes, the documentation is available from the manuals indicated by the sticky post at the head of this forum.
Google gave 7,400+ results on omitting records, many examples which are available on this very forum. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Use the following DFSORT JCL which will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input Fb 1200 byte file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(1201:600C'N')
OUTFIL BUILD=(1,1200),
OMIT=((0601,256,CH,EQ,1201,256,CH),AND,
(0857,256,CH,EQ,1457,256,CH),AND,
(1113,088,CH,EQ,1713,088,CH))
//* |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Kolusu,
did you really have to create 600 bytes of N's, 256 bytes of N's would have been sufficient such as
Code: |
SORT FIELDS=COPY
INREC OVERLAY=(1201:256C'N')
OUTFIL BUILD=(1,1200),
OMIT=((0601,256,CH,EQ,1201,256,CH),AND,
(0857,256,CH,EQ,1201,256,CH),AND,
(1113,088,CH,EQ,1201,088,CH))
|
Gerry |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
How about:
Code: |
SORT FIELDS=COPY
INCLUDE COND=(601,599,SS,EQ,C'Y')
|
Assuming of course the opposite of "N" in "Y" in this application. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Or NE,'N'??! |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
gcicchet wrote: |
Hi Kolusu,
did you really have to create 600 bytes of N's, 256 bytes of N's would have been sufficient such as |
Gerry,
You are right about 256. I was just showing how to validate 600 characters. puneetvirmani143 use the control cards provided by gerry.
Nic,
I think OP wanted to Check 600 characters of N in pos 601 thru 1200. So he needs to validate all the 600 bytes. |
|
Back to top |
|
|
|
|