i would like to replace a cobol program by a more flexible solution. Whenever our group is requested to modify a specific cobol application, it takes between 3 to 6 months to deploy in production. If we do it with JCL, we get a one week turnaround. I don't know if Icetool can do this, i gave it a try with icetool but i need to be set in the right direction and i hope to be able to apply the code to other programs. Here is what the program needs to do:
Read 3 files, the key is in cc, 1 to 20. Merge the files based on the key by appending data at the end of each record. i.e. file#2 (account) is written at the end of file#1(client) and file#3 (document id.) is appened at the end of file#2. The challenge is that file#1 and file#3 have unique keys while file#2 may have multiple keys of the same. Duplicate keys are to be kept.
see sample below: (hope the cut/paste did not missalign the text)
123456 Name1a ADDR1a Addr2a Addr3a Addr4a
123457 Name1b ADDR1b Addr2b Addr3b Addr4b
123458 Name1c ADDR1c Addr2c Addr3c Addr4c
123459 Name1d ADDR1d Addr2d Addr3d Addr4d
Account file (key is not unique) Total: 90 chars (20 + 10 + 20 + 20 + 20)
123456 123456A Field1a Field2a Field3a
123456 123456H Field1b Field2b Field3b
123457 123457B Field1c Field2c Field3c
123457 123457H Field1d Field2d Field3d
123457 123457P Field1e Field2e Field3e
123458 123458C Field1f Field2f Field3f
123459 123459C Field1g Field2g Field3g
123459 123459D Field1h Field2h Field3h
Document File (key is unique) Total 22 chars (20 + 2) Records may be present.
Content: Client#, star, number
123456 Name1a ADDR1a Addr2a Addr3a Addr4a 123456A Field1a Field2a Field3a *2
123456 Name1a ADDR1a Addr2a Addr3a Addr4a 123456H Field1b Field2b Field3b *2
123457 Name1b ADDR1b Addr2b Addr3b Addr4b 123457B Field1c Field2c Field3c
123457 Name1b ADDR1b Addr2b Addr3b Addr4b 123457H Field1d Field2d Field3d
123457 Name1b ADDR1b Addr2b Addr3b Addr4b 123457P Field1e Field2e Field3e
123458 Name1c ADDR1c Addr2c Addr3c Addr4c 123458C Field1f Field2f Field3f *
123459 Name1d ADDR1d Addr2d Addr3d Addr4d 123459C Field1g Field2g Field3g 2
123459 Name1d ADDR1d Addr2d Addr3d Addr4d 123459D Field1h Field2h Field3h 2
For all 3 files, the key is 20 bytes long.
Namexx, Addrxx are 32 chars each, Fieldxx are 20 chars.
The client# and the document# repeats at each occurence of the account#.
The account# information is placed at the end of the matching client record and the document# is
tagged at the very end of the record.
If ICETOOL may be use for this, i would really appreciate you get me started in the right direction. Once i understand the pattern, i will be able to take it from there and apply the logic to other formats.