| IBM MAINFRAME HELP FORUMS for COBOL, JCL, CICS, DB2, IMS etc... Help & Support Forums for IBM Mainframe computers Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7, CA-11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, VSAM, ISPF, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
Sukhmeet Singh
Joined: 28 Dec 2007
Posts: 12
Location: kolkata
|
| Posted: Fri May 23, 2008 3:13 pm Post subject: How to embed a DB2 copybook? |
|
|
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 |
|
dbzTHEdinosauer
Joined: 20 Oct 2006
Posts: 1387
Location: germany
|
| Posted: Fri May 23, 2008 3:32 pm Post subject: |
|
|
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 |
|
Sukhmeet Singh
Joined: 28 Dec 2007
Posts: 12
Location: kolkata
|
| Posted: Fri May 23, 2008 3:41 pm Post subject: |
|
|
| thanks a lot.. |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|