Multiple Dynamic file allocations in COBOL Program
Posted: Tue Sep 23, 2014 6:36 pm
Hi All,
I need to split a file into multiple files (number of out files may vary from 1 to 50). so i use BPXWDYN to allocate files dynamically. I have allocated a file and write records into it and close, free the same. then allocate the new file (DSN) by using same file in FD section and write records into it.
In this, file allocation works fine. but when i FREE the DSN. its not working. can you please help on this?
below is the code i used to free the DSN.
MOVE 'FREE DSN('''HLQ1.BAL.REPORT.N001''') ' TO WS-PARM
CALL BPXWDYN USING WS-PARM
Thanks in advance for the help!
I need to split a file into multiple files (number of out files may vary from 1 to 50). so i use BPXWDYN to allocate files dynamically. I have allocated a file and write records into it and close, free the same. then allocate the new file (DSN) by using same file in FD section and write records into it.
In this, file allocation works fine. but when i FREE the DSN. its not working. can you please help on this?
below is the code i used to free the DSN.
MOVE 'FREE DSN('''HLQ1.BAL.REPORT.N001''') ' TO WS-PARM
CALL BPXWDYN USING WS-PARM
Thanks in advance for the help!