IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to embed a DB2 copybook?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sukhmeet Singh

New User


Joined: 28 Dec 2007
Posts: 12
Location: kolkata

PostPosted: Fri May 23, 2008 3:13 pm
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
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri May 23, 2008 3:32 pm
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
Reply with quote

thanks a lot..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Trying to change copybook in online c... CICS 4
No new posts Help to Filter File Manager Copybook ... DFSORT/ICETOOL 14
No new posts Need to add field to copybook, proble... COBOL Programming 14
No new posts Recompiling programs after a copybook... COBOL Programming 1
Search our Forums:

Back to Top