Is it possible to have fields from OUTPUT file to remain while we OUTREC the required portion, in SORT/ICETOOL?
My requirement: OUTfile exists. Need to copy a date field from header of INfile (position 11) into 45th position (8th record) of output file.
Input File: Uniquely identifiable header record, Date: position 11
Output file: Need to modify 8th record alone, position 45 with date from input file.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Well, what you're calling the "output file" is really an input file that you're going to modify for output, but yes you can do it with DFSORT.
What is the RECFM and LRECL of the file containing the date?
What is the RECFM and LRECL of the file containing the record to be modified?
What is the length of the date field?
Is the date field the only record in file containing the date? If not, what identifies the record with the date field (e.g. first record, or record with 'HDR' in positions 1-3).
Is the record to be modified only identified by the fact that it's the 8th record or is there something else in that record that could be used to identify it uniquely (e.g. 'ABC' in positions 1-3).
It would help if you showed an example of the records in each file and what you want for output.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Not sure what all that is supposed to tell me. I think you're saying that the RECFM and LRECL of the file with the date is FB/335 and the RECFM and LRECL of the file to be modified is FB/80. And the length of the date field is 8.
But it isn't clear what your answers are to my other two questions:
Quote:
Is the date field the only record in file containing the date? If not, what identifies the record with the date field (e.g. first record, or record with 'HDR' in positions 1-3).
Is the record to be modified only identified by the fact that it's the 8th record or is there something else in that record that could be used to identify it uniquely (e.g. 'ABC' in positions 1-3).
Please answer these questions more directly. I don't have time for guessing games.
You show:
Code:
INCLUDE COND=(11,8,CH,EQ,C'HRDRKPNS')
Is that how you identify the record to be modified, or what? Please be clear.
Again, It would help if you showed an example of the records (relevant fields only) in each file and what you want for output.
File2:
10.999.99.99
XXXXX
ASCII
PUT 'XXX.XX.XXXXX.OUTBOUND(+0)' 20061030_RMS_PAS_OUTBOU
CLOSE
QUIT
No key in either file.
Output:
10.999.99.99
XXXXX
ASCII
PUT 'XXX.XX.XXXXX.OUTBOUND(+0)' 20061028_RMS_PAS_OUTBOU
CLOSE
QUIT
Is the date field the only record in file containing the date? If not, what identifies the record with the date field (e.g. first record, or record with 'HDR' in positions 1-3). == > NO, Identified by "HRDR" in 11 position.
File 1: RECFM = Fixed Block, Length = 335.
Is the record to be modified only identified by the fact that it's the 8th record or is there something else in that record that could be used to identify it uniquely (e.g. 'ABC' in positions 1-3).
==> NO, Identified by "PUT" in positions 1-3 or simply 8th record.
File 2: RECFM = Fixed Block, Length = 80.
Issues:
CTL1CNTL extracts well !
CTL2CNTL says syntax error (cant think why) !
Also SPLICE would map on the key 81,4 which is seqnum. But I would need all records
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
My job works fine with DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Since you're using Syncsort, you're using Syncsort's SYNCTOOL, not DFSORT's ICETOOL. Note that Syncsort's SYNCTOOL is undocumented, whereas DFSORT's ICETOOL is fully documented. Be aware that when you look at the documentation for DFSORT's ICETOOL, it won't necessarily apply to Syncsort's SYNCTOOL.