View previous topic :: View next topic
|
Author |
Message |
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
I stumbled on something in DFSORT that could be considered a feature or a bug. In my case it was a feature since it gave me what I wanted.
Below are the sort statements. Notice the use of both OVERLAY and IFTRAIL
Code: |
SORT FIELDS=COPY
OUTFIL FNAMES=INSERT,
OVERLAY=(24:C'I'),
IFTRAIL=(TRLID=(1,3,CH,EQ,C'TRL'),
TRLUPD=(12:COUNT=(M11,LENGTH=11)),HD=YES)
|
This does not overlay the first (header) and last (trailer) records in the output. If I remove "HD=YES" then it updates the header record. If I remove the entire IFTRAIL then it overlays all records.
I did not see anything in the manual that states this as the expected result. The OVERLAY should have udpated all records. So is this a feature or a bug? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
From the manual:
Quote: |
The trailer record will NOT be treated as a data record, that is, no other OUTFIL processing will be performed against the trailer record. You can optionally specify that the header (first) record will NOT be treated as a data record. |
Not a feature, but working as designed and described. |
|
Back to top |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
The DFSORT manual has 173 pages to describe the operation of the OUTFIL statement. About 3.5 pages cover the IFTRAIL. I missed the 2 sentences buried in the middle to state the header and trailer records are kept as is. It seems to function similiar to the icetool DATASORT in how it treats the header/trailer. |
|
Back to top |
|
|
|