Page 1 of 2

Add header and trailer to four files

PostPosted: Mon Nov 26, 2012 5:58 pm
by cbhargavi
Hi every one...my requirement is i have four input files.I want to add header and trailer to all files at a time by using sort card.
can we have that possiblity of getting more output files using sort card.
input files:four files.
1 .contains records A
2.Contains records B
3.Contains records C
4.Contains records D

out put should be
1.H
A
T in this format for every file..

I know the header and trailer sort cards.the thing is using same sort card i want to add header and trailer for each input file and get the output files respectively using header ,trailer sort card.
Do we have that possiblilty.Can anybody help me

Re: Add header and trailer to four files

PostPosted: Mon Nov 26, 2012 6:15 pm
by BillyBoyo
Why do you want to do four at once? What is wrong with a step to do one, and run the step four times?

Re: Add header and trailer to four files

PostPosted: Mon Nov 26, 2012 11:03 pm
by dick scherrer
Hello and welcome to the forum,

And Please - no - note this is Not the requirement. The requirement may be to add headers and trailers, but i would ask why the process(es) that create the files do not do it correctly/completely with no need to pass all of the data again to add h/t records?

Re: Add header and trailer to four files

PostPosted: Mon Nov 26, 2012 11:38 pm
by skolusu
cbhargavi wrote:Hi every one...my requirement is i have four input files.I want to add header and trailer to all files at a time by using sort card.
can we have that possiblity of getting more output files using sort card.
input files:four files.
1 .contains records A
2.Contains records B
3.Contains records C
4.Contains records D

out put should be
1.H
A
T in this format for every file..

I know the header and trailer sort cards.the thing is using same sort card i want to add header and trailer for each input file and get the output files respectively using header ,trailer sort card.
Do we have that possiblilty.Can anybody help me


cbhargavi,

1. What is the LRECL and RECFM of the files involved?
2. Is there any indicator in the records which can be used to identify as to which file the record begins?

Re: Add header and trailer to four files

PostPosted: Tue Nov 27, 2012 12:33 pm
by cbhargavi
Thanks for your quick response.This is one of the part in a code.I can do it for each file in each step.Steps will get increased.As the task is same that why i want to do in a single step.
All the input files has different record lengths.

Re: Add header and trailer to four files

PostPosted: Tue Nov 27, 2012 1:01 pm
by BillyBoyo
Why don't you answer Kolusu's questions?

Re: Add header and trailer to four files

PostPosted: Tue Nov 27, 2012 4:46 pm
by cbhargavi
The input files has different record lengths and record format=FB

Re: Add header and trailer to four files

PostPosted: Tue Nov 27, 2012 5:09 pm
by BillyBoyo
Since you can't concatenate FBs with different LRECLs in DFSORT this would be a problem.

If you put everything in a PROC and supply input/output to the PROC, I think one-at-a-time would be the way forward.

Re: Add header and trailer to four files

PostPosted: Tue Nov 27, 2012 5:32 pm
by cbhargavi
yes that will be fine..I want to know the possibility..thanks you

Space constraints

PostPosted: Wed Nov 28, 2012 1:56 pm
by cbhargavi
hi everyone,
This is my file containg the records,
HXY111128201201:52:44
D1234567
D1122333        abcdefgi
TXY000000000000002

This file rlecl=24,FB
In mainframes all the gaps are looking spaces..its fine.
But when i copied this to notepad,the page end is showing after D1234567 this data not at page end means at 24 position.

Can any one help me..What i can do..wher eis the mistake.
Do i need to use any sort card for this case