Joined: 04 Jun 2006 Posts: 6 Location: Charlotte, NC
I have a question on file handling in COBOL. How can we dynamically allocate flat files inside COBOL depending upon logic?
Say for example, I have a huge i/p file and want to split into x number of files using cobol and then process the same in next job or step. If I know the record count will be y and can split into 10 files, then my x = y/10 records which means 10 files are enough. If in case, my i/p comes as z which is way higher than y. then I might need to split into 20 files. so , I want to allocate files dynalically inside cobol to meet this criteria.
Can anyone please help me resolve this?
Also, please share your thoughts on the performance of my program if I have such dynamic allocations.