Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 4th, 2008, 11:24 PM
Newbie
 
Join Date: Sep 2008
Posts: 1
Default host variables in cobol

what type of overhead will this select statement cause to db2 on z/os mainframe ? This is an imbedded SQL in COBOL

Declare cursor C1 for
select number, key1, key2
from table
where type = 'TYPE'
and number = :ws-number
and date(eff_date) <= :ws-start-date
and date(exp_date) >= :ws-end-date

ope cursor c1
loop until sqlcode = 100
fetxh c1 into :dclgen.number,
:dclgen.key1,
:dclgen.key2
end-loop
close cursor c1

I'm doing this because I want to display the contents of the number column on a report.

My DBA is telling me do not select a column where predicate is = to host variable, because the value is already known, in this case, the number column will equal :ws-number. The DBA wants me to move ws-number to the report everytime instead of using the DCLGEN host variable.

Isn't this defeating the purpose of a DCLGEN ?
Isn't the DCLGEN supposed to be used as INPUT to DB2 and as output back to the COBOL program ?
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles