Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to embed a DB2 copybook?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions
Author Message
Sukhmeet Singh

New User


Joined: 28 Dec 2007
Posts: 12
Location: kolkata

PostPosted: Fri May 23, 2008 3:13 pm    Post subject: How to embed a DB2 copybook?
Reply with quote

Ques

1. in a cobol-db2 program, if a procedure division copybook COPYDB2C with embedded db2 statements has to be added to the code, which of the folloeing method has to be used..??

a). EXEC SQL
INCLUDE COPYDB2C
END-EXEC in working storage section, after including SQLCA.

b). procedure division copybook cannot contained embedded db2
statements

c). COPY COPYDB2C. at the end of the code, in area A

d). EXEC SQL
INCLUDE COPYDB2C
END-EXEC in procedure division.
Back to top
View user's profile Send private message
References
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1639
Location: germany

PostPosted: Fri May 23, 2008 3:32 pm    Post subject:
Reply with quote

a copybook that contains db2 statements - sql and not ddl?

if the db2 statements need to be precompiled, then d.
if the db2 statements are already precompiled, then e. copy statement at appropriate place.

db2 declares in data division do not have to be positioned before or after the sqlca.

a. is no good, there is executable code in the copybook, so it must be someplace in procedure division. again, position with sqlca is not a valid statement.

b. is an inaccurate statement.

c. makes no sense.

d. is the only answer that comes close.

this post reeks of classroom work.
RTFM
Back to top
View user's profile Send private message
Sukhmeet Singh

New User


Joined: 28 Dec 2007
Posts: 12
Location: kolkata

PostPosted: Fri May 23, 2008 3:41 pm    Post subject:
Reply with quote

thanks a lot..
Back to top
View user's profile Send private message
Moved: Fri May 23, 2008 4:05 pm by William Thompson From DB2 to Interview Questions
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions All times are GMT + 6 Hours
Page 1 of 1