Posted: Wed Sep 26, 2007 9:29 am Post subject: File-Aid/Syncsort trick required please !
Hi,
I have an input file of 91 bytes.
I want to extract the records based on following criteria:
1). Column 14 to 16 should contain value "ABC".
2). Column 23 to 31 should be spaces
3). Column 65 to 71 should be greater than zero
4). Column 32 to 37 should have any of these values (ARMADA, XANDAR, PUGEOT, BEOHVA, VAJRAN, URAM).
Length of output file is also 91 bytes.
Would you please give me File-Aid/Syncsort code for this
Thanks in Advance. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
Posted: Wed Sep 26, 2007 10:17 am Post subject:
Have you tried seaching for the answer, it seems to me that a lots of examples doing the same sort of thing, you may have to adjust position number etc but a little thinking never harmed anyone.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Sep 26, 2007 12:54 pm Post subject:
Alissa,
FYI, you don't need to code all those blanks for a condition like
Code:
23,9,CH,EQ,C' '
One blank will do
Code:
23,9,CH,EQ,C' '
DFSORT pads the character string with blanks on the right to the length of the field. I'd be very surprised if Syncsort doesn't. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You are correct, SyncSort does the same, so the extra blanks are not necessary. It's just my coding style/preference. I like to code the "place holders". _________________ Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Sep 26, 2007 2:32 pm Post subject:
Quote:
I like to code the "place holders".
That must be fun when the field is 100 characters. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum