Posted: Mon Jul 25, 2005 5:44 am Post subject: Removing dot from the Input record
Hi,
I have the input file like below.
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----
********************************* Top of Data
00276FAIRBANKS GORDON B 10.00 140.00
05561VASQUEZ WENDY F 10.00 140.00
14994WELLS ROBERT D 7.00 98.00
16300DALTON JOSEPH W 7.00 98.00
I need to write the Output file, after removing the '.' but still maintain the record length of 80. Also depending on the price field, the '.' may occur any where in the record between coloumn 46 to 60.
my output needs to be
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----
********************************* Top of Data
00276FAIRBANKS GORDON B 1000 14000
05561VASQUEZ WENDY F 1000 14000
14994WELLS ROBERT D 700 9800
16300DALTON JOSEPH W 700 9800
Can someone let me know how to do it using OUTREC. Thanks.
Karthik
P.S: I searched in the Posts couldn't find it. Thanks.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jul 25, 2005 10:29 am Post subject:
I've used ubb code tags to make your data more readable, but I'm not sure if that's the way it actually looks. Are the numeric values in the input record actually left aligned (e.g. 7.00b) as shown rather than right aligned (e.g. b7.00)? Do you want the numeric values in the output record left aligned as shown rather than right aligned?
The first numeric value starts in 46. What is its length (7 bytes? 6 bytes? 5 bytes?).
The second numeric values starts in 52. What is its length (7 bytes? 6 bytes? 5 bytes?) _________________ 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
First numeric value starts at 46 of the length 7 bytes.
Second one starts at 53 of length 7 bytes.
Actually, if I can get the left aligned value 10.00 as '0001000' (with leading zeros) starting col 46, that ll be good. Same case with the value starts at 53 as well.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Tue Jul 26, 2005 1:19 am Post subject:
I coded a DFSORT step above as I am a DFSORT user. I am sorry, I could not be of help to you with Syncsort. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Jul 26, 2005 10:37 am Post subject:
Karthik,
DFSORT supports the UFF format. Syncsort does not support the UFF format. _________________ 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
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Jul 26, 2005 10:41 am Post subject:
Cogito,
You can use OVERLAY to simplify your DFSORT job further:
Code:
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
00276FAIRBANKS GORDON B 10.00 140.00
05561VASQUEZ WENDY F 10.00 140.00
14994WELLS ROBERT D 7.00 98.00
16300DALTON JOSEPH W 7.00 98.00
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(46:46,7,UFF,TO=ZD,53,7,UFF,TO=ZD)
/*
_________________ 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