COBOL program accessing DATACOM tables



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

COBOL program accessing DATACOM tables

Postby sivasenthil » Tue Jun 03, 2008 12:21 pm

Hi, We have several COBOL programs which access DATACOM database. As we are in the process of migrating DATACOM to DB2, we are facing issues in using the DATACOM commands in the batch program. We are using third party product which acts as a intermediate to interpret DATACOM commands used in batch program to access DB2 tables. But the product is not supporting the GSETL & GETIT commands. Hence we want to replace them with REDKR/REDNR or RDUKR... Can anyone of you provide some inputs in doing this change? Any sample will also do good :)

Thanks.
sivasenthil
 
Posts: 2
Joined: Tue Jun 03, 2008 12:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL program accessing DATACOM tables

Postby dick scherrer » Wed Jun 04, 2008 4:31 am

Hello,

I'd suggest you make new urt's and copy the programs and replace the gsetl/getit.

Look at what is being processed and substitute the appropriate other Datacom calls to replicate the functonality.

If the gsetl/getit code is in programs that are driven by this sequential processing of the table, you might consider extractining the table and simply using the qsam extract file to drive the process. Even if other tables are referenced in the process, you could fairly easily replace the gsetl/getit with the qsam file. I mention this to possibly ease coding, but more importantly, if these are tables with huge row counts, there may be a performance issue.
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

Re: COBOL program accessing DATACOM tables

Postby sivasenthil » Wed Jun 04, 2008 10:19 am

Hi,
First of all thanks for your thoughts. I came to a conclusion to replace gsetl/getit with appropriate DATACOM commands based on the mode(read only/Read for updates) in which it has been used in the program. I can't use qsam file option as its not applicable due to the reason you have mentioned in the last line of your reply.

Once again thanks.
Cheers
sivasenthil
 
Posts: 2
Joined: Tue Jun 03, 2008 12:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL program accessing DATACOM tables

Postby dick scherrer » Wed Jun 04, 2008 7:10 pm

Hello,

I believe you misunderstood what i was saying. . .

If the volume is huge it is often much faster to extract the data and process the qsam file.

Actually, this (big batch sequential processing) is the reason gsetl/getit were added.

FWIW, i've been a Datacom dba/support person since before the gsetl/getit commands were implemented.
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