Page 1 of 1

propagating a header into detail lines

PostPosted: Sat Dec 06, 2014 5:41 am
by migusd
Hi guys,
I have a process that contains several files...
obviously each file contains a header record and multiple details lines.
When you read each file, is there a way to get a value out of the header, and propagate that value into their own detail lines?
I mean for each of the files read in the same step.

The purpose is to obviously identify specifically what file the detail records are coming from for subsequent sort.
I know, I am just testing the limits of the tool.

Any ideas or suggestions?
Thanks...

Miguel

Re: propagating a header into detail lines

PostPosted: Sat Dec 06, 2014 1:32 pm
by BillyBoyo
Yes. Use IFTHEN=(WHEN=GROUP,BEGIN= to identify the header and PUSH= to extend the records to include the data from the header. You may need to relocate the data once you have the detail record,. If variable records, do the extension at the "front" of the record (use IFTHEN=(WHEN=INIT to make new space ready for the PUSH=) and if fixed at the end.