View previous topic :: View next topic
|
Author |
Message |
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
I know it is possible to allocate files dynamically in COBOL. I need to know is it possible to open/edit/close these dynamically allocated files in COBOL, without using any ASSEMBLER routine. Please suggest me if it is possible. |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Hi Ranjithkumar,
Is this COBOL question?
There are number of discussions occurred in this forum on dynamic file allocation.
one of them is :
http://www.ibmmainframes.com/viewtopic.php?t=46689&highlight=
You can search and learn a lot on this topic..
BTW.. your question is not clear..
Can you please state your requirement clearly? |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
I have a huge file , which i need to split into files having 50k records each. The record count of input file may vary . I need a standard process to do this splitting. Suggest me if any other option is available to do this. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
SORT can be your choice to split the file, however you need to tell teh rules and LRECL/RECFM of the input and output files. |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
There are no rules for splitiing the file. The file is FB / 2000. If i use a SORT routine, I have to modify it every time. For eg. When the input file has 500K records , i have to specify 10 output files in the SORT step. But the next time the input file may have 1000K records. This time i cannot use the same SORT since i need 20 output files. I need to split the files using a process , irrespective of the record count. I have achieved this using ASSEMBLER . But I need some other option , other than ASSEMBLER. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
This link has similar problem discussed some time back, a work around it should give you a working model for your requirement. |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
Hi Anuj, The JCL present in the link splits file based on the INCLUDE condition. In my case there is no condition. I have to split the files based on record count only. Each file should have 50k records. |
|
Back to top |
|
|
|