Using ICEMAN, I would like to extract a fixed field from each record of an input file, create a new output file with the trailing blanks removed, and a character '~' suffixed.
This fixed field contains naming information, starts from position 26 for 59 bytes.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Thanks Frank,
Your step works but I neglected another requirement, to append the 3rd field to the end of the "justified/squeezed" 2nd field.
I can get it to work by running multiple steps, but unable to with a single step. Any help is greatly appreciated.
Input file records:
fixed field 1: 1 - 25
fixed field 2: 26 - 85 >> contains naming info, ie. company name.
fixed field 3: 86 - 100
Desired output file records:
fixed field 1: 1 - 25
field 2: extracted content from 26 - 85, remove trailing spaces and add trailer
character "~". this field would start from position 26 and end at the
trailer character "~".
field 3: append to the end of field 2.
I can't figure out what exactly your records look like with respect to the | and ~ characters included in the input records and to be included in the output records.
Please show a better example of your input records (more than one) and expected output records with all of the fields included.
Also, tell me the RECFM and LRECL of the input and output files.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Hi Frank, here are 2 input records....
both files are RECFM = FB, LRECL = 100
Thanks
input record 1
field 1 ( column 1-25 )
451902XXXXXXXXXX~|00119~|
field 2 ( column 26 - 85, data is left justified )
6411223 CANADA INC
field 3 ( column 86 - 100 )
|~2009-08-17~~|
input record 2
field 1 ( column 1 )
451902XXXXXXXXXX~|00119~|
field 2 ( column 26 - 85, data is left justified )
WORKFORCE PLANNING INC
field 3
|~2009-08-17~~|
to look like:
451902XXXXXXXXXX~|00119~|6411223 CANADA INC~|~2009-08-17~~|.............
451902XXXXXXXXXX~|00119~|WORKFORCE PLANNING INC~|~2009-08-17~~|....
Ok, but what do the dots at the end of the output record represent? Are there more fields in the input records that you didn't show, or are they blanks, or what?
Out of curiosity, what are the ~ characters for ... they seem to be used rather inconsistently.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
there are no more fields, the dots represent blanks...
the ~ character at the end of each field is a required spec by a UFS application. This output file will need to be converted to UTF-8 format.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Thank you very much Frank, desired output is achieved with your help. I have been reading your forum with interest, you are always willing to help with utmost courtesy.