File 1 (FB/100): Contains only 1 rec and has the below data.
11015
File 2 (FB/1000): Contains only 1 rec and has the below data.
From this file I need to copy data from byte number 20 to 1000 (ALL data is in Packed decimal).
Output file (FB/2000): Will Contain only 1 rec and should be having the below data.
The output needs to look like this
OUT11015XXXXXXXXXXX
OUT --> hardcoded (We need to move OUT in this output file)
11015 --> from File 1
XXXXXXXXXXX --> From File 2 (data from byte number from 20th to 1000th)
The above is a simplified version of what I actually require. In the real scenario I am dealing with different LRECLs and different data.
My attempt is as follows:
I tried using FILEAID utility (via JCL) and successfully achieved only two parts of the requirement. That is I got my output as:
OUT11015
For OUT I used --> MOVE=(1,C'OUT')
For 11015 -->I again used MOVE statement to copy the data from FILE 1
But I couldn't manage to write data from FILE 2. I tried many things in FILEAID but didn't get any success.
Could you please advise on this. I am open to use other utilities too.
Thanks Frank. Sorry for the late reply. Unfortunately, my system isn't updated with latest SORT and therefore I cannot use Joinkeys. I am trying to get it working thru spice/icetool step.
I have got one more requirement which is as follows:
File 1 (FB/80): (Contains only 1 record)
XXXXXXX11029XXXXXXXX11030XXXXXXXX11031
File 2 (FB/80): (Contains only 1 record)
FFQ#####00100999999999999999999999999999
Now I want to replace "#####" in FILE 2 with 11029 (from FILE 1).
Again I tried it using FILEAID and I am able to copy the required data but everything else is replaced by spaces.