Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Jun 15, 2006 6:08 pm Post subject:
I'm going to assume the following:
1) We can identify the records types by their length (e.g. if the length is 885 bytes, it's a detail 2 record).
2) The positions you gave included the RDW in positions 1-4. So the first byte of data would have position 5, not position 1. If you didn't include the RDW, then you'll need to adjust each position by adding +4.
3) For detail 1 records, you want to overlay 783-786 with 540-543 and overlay 790-793 with the sum of the other PD fields.
4) For detail 2 records, you want to overlay 787-789 with 545-547 and overlay 790-793 with the sum of the other PD fields.
5) You don't want to change the header, trailer or extended records.
The following DFSORT job will do all of that. If any of my assumptions are wrong, you can change the job appropriately, or indicate how the assumptions are wrong.
_________________ 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
Thanks for the response. The records can be Identified by the record type which is a PD field at Position 10( 1 indicates Detail record 1 and 2 indicates detail record 2). Sorry for not mentioning this before .
As far as your other assumption is concerned, I didn't add RDW field ( The positions mentioned are based on copybook layout). Based on these I changed the JCL in the following way
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Jun 16, 2006 11:06 am Post subject:
Quote:
I am getting zeroes in the new fields.
When I run your job with test input data similar to what you described, I get valid PD values greater than 0. So either your PD values are all zeros (X'0000000C') or your data doesn't look the way you described it. To see how the relevant fields in your input data really look (in hex), you can run this DFSORT job:
You can see that record type 1 (1C) and 2 (2C) each have valid PD values > 0 where they're supposed to have them.
I suspect when you run this job against your input data, you'll discover that the PD fields are either all zeros or not where you said they were. The output should help you figure out where your PD fields actually are so you can specify the correct positions in your job. _________________ 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: Fri Jun 16, 2006 2:29 pm Post subject:
Glad I could help. _________________ 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