Query :
I have a FB file with lrecl=133 containing around 2778999 records and being written onto tapes (filename = A.B.C).
My requirement is to create a separate descriptor file for A.B.C for an external interface with one record containing following fields :
1) Record count of A.B.C (length 10)
2) Current Date (RNYYMMDD) (length 8) RN is a symbolic parameter(Run number) in the JCL with value 02(may vary)
3) Current time (HH(24):MI:SS) (length 8)
4) RefId : An number incremental of 1 and starts from 1 for the first transmission and increments hencforth. (should be unique) (length 18). Previous descriptor file to be checked for previous RefId and then incrementing it by 1.
5) interface name : 30 characters
Can this be achieved thourgh DFSORT (sort/ICEMAN/ICETOOL).
Sample Record :
0002778999 02090502 16:12:00 000000000000000123 XYZ
Request :
Please have a look. Any help/direction on this would be appreciated.
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
Hi abhishek,
I think you want a header records and trailer record in the output file along with the existing data.
You can add this by HEADER/TRAILER options in he dfsort,
Also you can use the key word 'COUNT' to write the number of records in the output file. &DATE, & TIME will gives you the system date and system time.
I think you want a header records and trailer record in the output file along with the existing data.
You can add this by HEADER/TRAILER options in he dfsort,
Sorry but as I have written in the requirement it's not a header/trailer in the same file with all the records. It's separate file altogether with only one record as suggested in the requirement
Quote:
This does not sound like a header in the same/existing file. . .
No. It's not. A separate record in a different file.
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
Quote:
Can DFSORT be helpful for this requirement.
Yes, it can be helpful....
Quote:
Sorry but as I have written in the requirement it's not a header/trailer in the same file with all the records. It's separate file altogether with only one record as suggested in the requirement
Sorry, but a lot of the requirement can be done by trailer processing, and to argue this is stupid on your part.
Trailer processing on a dataset can produce a file with a single record.
Quote:
Can this be achieved thourgh DFSORT (sort/ICEMAN/ICETOOL).
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
abhishekmdwivedi,
Here is an idea. This will increase the refid everytime the job runs.
Create 2 80 byte FB recfm format. file 1 will have the Run number you want to pass to the job. And file 2 will refid.(to begin have 1)
Populate the above defined file with this
let us say this filename1 is userid.RN.sym
Code:
RN,C'02'
let us say this filename1 is userid.REFID.sym
Code:
REFID,C'000000000000000001'
This job will increment the REFID everytime it runs and if the input file is empty then it will set a return code of 4 and will NOT increment the Refid.