Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 -> Mainframe Interview Questions
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    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

dbzTHEdinosauer

Global Moderator


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

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
No new posts Geneartion of COBOL copybook structre... murugan_mf COBOL Programming 3 Fri May 20, 2016 12:48 pm
No new posts View Copybook having COPY statement i... nkumar Compuware & Other Tools 6 Mon May 16, 2016 7:28 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us