Access VB and FB files with same File Defination



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Access VB and FB files with same File Defination

Postby nikesh_rai » Fri Jan 25, 2013 8:16 pm

Hi,

is it possible to use same file definition in COBOL for VB and FB files.. by using Recording modes.. i don't want to use JCL Sort.. its a simple requirement where i need to call a COBOL module for three different files, 1 of them would be FB and rest of them will be VB..

If there is such possibility, i have to use a single COBOL module.. otherwise i need to create a another COBOL module.. can you please suggest..
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: Access VB and FB files with same File Defination

Postby Robert Sample » Fri Jan 25, 2013 9:36 pm

RECORDING MODE is specified when you COMPILE a program. When you EXECUTE the program, this compile could be seconds ... minutes ... hours ... days ... months ... years in the past. Information set at compile time (such as RECORDING MODE) cannot be changed at execution time. Hence, what you want to do cannot be done in COBOL and you will need another program.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Access VB and FB files with same File Defination

Postby dick scherrer » Fri Jan 25, 2013 10:33 pm

Hello,

Why not mak the change(s) to have all 3 the same? This is a rather poor design approach and will cause wasted time everywhere used.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post