Joined: 14 Nov 2003 Posts: 7 Topics: 4 Location: Phoenix
Posted: Wed Apr 28, 2004 2:55 pm Post subject: Sort card to fill zeros in COMP-3 fileds
Hi All,
I have expanded a file from 200 to 400 record length, the new length contains COMP-3 fields. I need to populate hex zeros to the COMP-3 fields. I used the following sort card, to fill zeros. Due to this my pgm is failing with SC07, when I use comp-3 fields.
Could some one, please send me the sort card to fill hex zeros:
(1,400,202:5Z,209:26Z,140X)
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Apr 28, 2004 3:19 pm Post subject:
Bala,
Your have a couple of errors in your sort control cards.
1. You have overlapping columns in your control cards. you are copying the first 400 bytes and then you trying to overwrite the postions 202 thru 206 and position 209 for 26 bytes with binary zeroes and padding the rest of the bytes with spaces.
2. 5z and 26z will insert 5 and 26 binary zeroes respectively. But you wanted comp-3 fields which are equivalent to PD in sort. Did you mean to initialize the comp-3 fields to zeroes?
Show me the expanded layout(lrecl=400) and I will post the solution to fit your needs
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Apr 28, 2004 3:23 pm Post subject:
COMP-3 is equivalent to DFSORT's PD format. If you populate a PD field with hex zeros, it becomes a PD value with a 0 sign, which would result in a S0C7 if you tried to use it in a SUM statement.
Use X'00...0C' to populate the PD field with valid PD 0 values. Alternatively, if you have DFSORT R14 PTF UQ90053 (Feb, 2003), you can use:
Code:
+0,TO=PD,LENGTH=n
_________________ 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