Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Thu Jun 14, 2007 4:03 pm Post subject: Sort Detail; Create Header,Trailer;Add Batch# from 2nd file
I have only detail records in an 80 char fixed length input file
I have a batch number in another file, but the batch number can be placed in another DFSORT input area if easier. I am generating the JCL on the fly, I need a muster (boiler plate) for the control cards necessary to add a header record, and trailer record as indicated below:
Generated Header Record:
'HEADER RECORD' ................ in pos 01- 13 of generated header record
current-date............yymmdd in pos 20- 25 of generated header record
current-time............hhmmss in pos 30 - 35 of generated header record
batch-number.......99999999 in pos 40 - 47 of generated header record
source of batch-number is pos 1-8 of 80 char record of another file which only has 1 record.
Code:
12345678901234567890123456789012345678901234567890...
HEADER RECORD YYMMDD HHMMSS 99999999
Generated Trailer Record:
'TRAILER RECORD'............. in pos 01-14 of generated trailer record and
the count of detail records in pos 20-28 of generated trailer record and
the total count ................. in pos 30-38 [= count of detail records(in pos 20-28 ) + 2] of generated trailer record
Code:
12345678901234567890123456789012345678901234567890...
TRAILER RECORD 999999999 999999999
sort cols 1 for 20, char type ascending
Record length is 80 Fixed for input and output file. _________________ Dick Brenholtz
American living in Varel, Germany
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Thu Jun 14, 2007 4:18 pm Post subject:
Good...but I do not think that link answers your query since you have dynamic data in your header file - You need to do in 2 pass for this using ICETOOL/SYNCTOOL.
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Thu Jun 21, 2007 8:42 am Post subject:
Mahen246,
Is your question specific to the solution posted by Kolusu or is it a general query about report writing ?
Are you asking us - "How" to remove the ANSI control characters from the report ? If so, you need to use the REMOVECC parm - but this is already present in the JCL kolusu provided.
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