Replacing spaces with data using ICETOOL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Replacing spaces with data using ICETOOL

Postby n.haranath » Tue May 12, 2009 8:49 am

Hi,

Please help me in acheving the below mentioned requirement.

1.We have 2 Input Files and one Output files.
2.The order of the records written in the Output File will remain same as the Input File 2.
3.For each Matching key in the Input File 2 we need to replace first 3 bytes with the string ‘PRD’ and 4 – 11 bytes with the string present in Input file 1 starting at 9 Position till 8 bytes. The changed record is written in the output file
4.Non matching records are untouched and written as it is on to the output file.

The belos is the sample input and output data.

Input File 1: (1- 8 is the key ( 8 bytes),FB=80)
----------------------------------------------------------------------------------------------------
Tstkey11Tstkey12
Tstkey21Tstkey22
Tstkey31Tstkey32

Input File 2: (104 - 111 bytes is the key ( 8 bytes),FB=111,First 11 bytes is spaces)
----------------------------------------------------------------------------------------------------
aaaaaaaa. . . .Tstkey11
abaaaaaa. . . .Tstkey11
abcaaaaa. . . .Tsttey11
bbbbbbbb. . . .Tstkey21
bcbbbbbb. . . .Tstkey21
bctbbbbb. . . .Tstkes21
cccccccc. . . .Tstkey31
Output File:
PRDTstkey12aaaaaaaa. . . .Tstkey11
PRDTstkey12abaaaaaa. . . .Tstkey11
abcaaaaa. . . .Tsttey11
PRDTstkey22bbbbbbbb. . . .Tstkey21
PRDTstkey22bcbbbbbb. . . .Tstkey21
bctbbbbb. . . .Tstkes21
PRDTstkey32cccccccc. . . .Tstkes31

Please find the req in the attchment as well.

Thanks & Regards,
Honey.
You do not have the required permissions to view the files attached to this post.
n.haranath
 
Posts: 1
Joined: Tue May 12, 2009 8:33 am
Has thanked: 0 time
Been thanked: 0 time

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post