Posted: Wed Sep 28, 2005 2:13 pm Post subject: Reformatting no of records calculated by COUNT in trailer
hi,
I need to extract the record count of a particular type of record in a file and edit the count so that the left blanks will get padded with zeros and expanded by a byte.
Below is my job
COUNT occuppies 8 bytes of spaces. I want this to be made 9 bytes, as well as padded with zeros to the left. I tried with TRAILER1=(DATENS=(4MD),COUNT,EDIT=(TTTTTTTTT)), but was giving me syntax error.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Sep 28, 2005 2:21 pm Post subject:
The following OUTFIL statement works with DFSORT and will give you what you want. PGM=SYNCSORT suggests you're using Syncsort - I don't know if this will work with Syncsort.
_________________ 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
What is intended is to have first 10 bytes of the actual file trailer retained and add count and date that. Going a step further, can we update the a particular field in the trailer. For eg: as in the case abbove if the trailer was:-
99 TRAILER00000000720050928 considering entire data, only for record type 05, can I modify the trailer as 99 TRAILER00000000320050928 ???
For eg: as in the case abbove if the trailer was:-
99 TRAILER00000000720050928 considering entire data, only for record type 05, can I modify the trailer as 99 TRAILER00000000320050928 ???
I don't understand what you are upto. Do you want two trailers ??? one for 05 records and the other which contains the count of all records ?.
If you remove the include cond, you will get trailer with 000000007 as count else you have count 000000003. Please clarify the requirement (provide input and complete output expected)
I reuiqre ONLY one trailer with the record count rewritten in that with the no of occurrences of record type '05'.
Giving reference to the trailer above, first 10 bytes "99 TRAILER" will remain as it is in the input modify the count from 000000007 to 000000003 and rest of the trailer as it was in the input.
From the solution you mentioned, the sort program will be inserting "99 TRAILER" as new set of characters. I need to bring in the first 10 bytes whatever may be the trailer (of course, the record type 99 remains the same as is to identify the trailer record), update with count for record type '05', then, the rest of trailer (after count) from the total of 160 (LECL).
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Oct 29, 2010 3:53 pm Post subject:
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use DFSORT's new IFTRAIL function to do this more easily like this:
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