IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Dynamic file processing , in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 93
Location: India

PostPosted: Thu Mar 11, 2010 3:14 pm
Reply with quote

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
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu Mar 11, 2010 3:22 pm
Reply with quote

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
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 93
Location: India

PostPosted: Thu Mar 11, 2010 3:27 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 11, 2010 4:35 pm
Reply with quote

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
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 93
Location: India

PostPosted: Thu Mar 11, 2010 4:51 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 11, 2010 5:01 pm
Reply with quote

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
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 93
Location: India

PostPosted: Thu Mar 11, 2010 5:54 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top