Page 1 of 1

COBOL program accessing DATACOM tables

PostPosted: Tue Jun 03, 2008 12:21 pm
by sivasenthil
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.

Re: COBOL program accessing DATACOM tables

PostPosted: Wed Jun 04, 2008 4:31 am
by dick scherrer
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.

Re: COBOL program accessing DATACOM tables

PostPosted: Wed Jun 04, 2008 10:19 am
by sivasenthil
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

Re: COBOL program accessing DATACOM tables

PostPosted: Wed Jun 04, 2008 7:10 pm
by dick scherrer
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.