View previous topic :: View next topic
|
Author |
Message |
Abdul Lateef
New User
Joined: 08 Sep 2011 Posts: 5 Location: india
|
|
|
|
Hi,
I want to add header field to the file. Header file consist of text followed by DATE.
The header file should be in the format 'AAA HEADER YYYYMMDD'
My file contain records as below.
AAAAA
BBBBB
CCCCC
DDDDD
My output file should contain first byte as space and then the header and the file record should come. Below is the record which i want.
AAA HEADER YYYYMMDD
AAAAA
BBBBB
CCCCC
DDDDD
Also the output file RECFM should be fixed block (FB) |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why don't you also have an indicator on the detail records to show positively that they are detail records?
Saves the embarrasment of a client called "THE HEADER COMPANY" sending your program up the creek.
While you are at it, how about a trailer record? Count of records, maybe some hash totals.
I assume that by "DATE" you mean the current business date. Where are you going to get that from? |
|
Back to top |
|
|
Abdul Lateef
New User
Joined: 08 Sep 2011 Posts: 5 Location: india
|
|
|
|
Actually the file needs to be axiomed. so that they can download from axiom link. on top of the file they need the text with the current date.
I have a sample code but the RECFM for the output file is FBA. I want the RECFM with FB.
sort card.
Code: |
//SORTIN DD *
AAAAA
BBBBB
CCCCC
DDDDD
//SORTOUT DD *
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,
HEADER1=(2:C'AAA HEADER ',10:&DATE),
BUILD=(1:C' ',2:1,5)
/*
|
|
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
Use REMOVECC as below -
Code: |
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,REMOVECC,
HEADER1=(2:C'AAA HEADER ',10:&DATE),
BUILD=(1:C' ',2:1,5) |
|
|
Back to top |
|
|
Abdul Lateef
New User
Joined: 08 Sep 2011 Posts: 5 Location: india
|
|
|
|
The above code is working. I am getting result excactly what i want.
Thanks a lot...
|
|
Back to top |
|
|
|