Posted: Mon Nov 15, 2010 10:54 am Post subject: Joinkeys 2 files, retain date in discarded file
I am comparing File A and File B.
1.File A has date info as first rec.
2.Match recs in File B will be written to output.
3. I want to retain Date info as first record in the output file but it is there only in the discarded file A as first rec.
I know I can do it in two sync sort steps or say join unpaired write date row only to unpaired file and concatenate that file with Matched output file and use it next step. I am trying to find out if there is any other simpler way to do it.
********************************* Top of Data **********************************
DATE=111510
MATCH12 22222
MATCH22 33333
******************************** Bottom of Data ********************************
I guess the file would be equal to the length of file at the reformat ? _________________ Vivek,NJ
1. I wasn't using when(none) condition so syncsort must have kept the whole file length for that condition. I added that condition and got an error that omit/include was out of bounds. This is because
2. I was using Outrec as control statement instead of Outfil parm. Ifthen replaces outrec in outfil statement. Since outrec control statement runs before outfil even though it is coded after, it decreased file length to 20 bytes and i was referring 21st byte in the include. I fixed that and solved the problem. _________________ Vivek,NJ
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum