Hello,
I am working with Cobol in an HP3000 MPE/IX environment. I need to create a Cobol program which will sequentially read a file and break on a particular field. Upon each break I want to create a new file to which all records will be written until the next break occurs. My problem is that I want to assign a unique name to each new file. The number of files created will vary depending upon how many breaks are encountered. Each time there is a break I plan to execute an MPE BUILD command via intrinsics. Is there any way I can do this using only one SELECT/ASSIGN command for all of these files? My problem lies in identifying these files in the JCL. Here's an example:
Input data:
AAA 1234 klmf 999
AAA 1345 mkgh 111
AAA 7890 rtyu 222
BBB 6430 kred 555
CCC 4343 yemn 777
CCC 9090 mklo 888
Would result in the Building of 3 files, each with a unique name:
FILEA:
AAA 1234 klmf 999
AAA 1345 mkgh 111
AAA 7890 rtyu 222
FILEB:
BBB 6430 kred 555
FILEC:
CCC 4343 yemn 777
CCC 9090 mklo 888
My problem lies in assigning a unique name to each new file.
Any advise/suggestions would be helpful. Thanks
I am working with Cobol in an HP3000 MPE/IX environment. I need to create a Cobol program which will sequentially read a file and break on a particular field. Upon each break I want to create a new file to which all records will be written until the next break occurs. My problem is that I want to assign a unique name to each new file. The number of files created will vary depending upon how many breaks are encountered. Each time there is a break I plan to execute an MPE BUILD command via intrinsics. Is there any way I can do this using only one SELECT/ASSIGN command for all of these files? My problem lies in identifying these files in the JCL. Here's an example:
Input data:
AAA 1234 klmf 999
AAA 1345 mkgh 111
AAA 7890 rtyu 222
BBB 6430 kred 555
CCC 4343 yemn 777
CCC 9090 mklo 888
Would result in the Building of 3 files, each with a unique name:
FILEA:
AAA 1234 klmf 999
AAA 1345 mkgh 111
AAA 7890 rtyu 222
FILEB:
BBB 6430 kred 555
FILEC:
CCC 4343 yemn 777
CCC 9090 mklo 888
My problem lies in assigning a unique name to each new file.
Any advise/suggestions would be helpful. Thanks