can I copy book which contain db2 statment in procedure
divion?

Answers were Sorted based on User's Feedback



can I copy book which contain db2 statment in procedure divion?..

Answer / vikas pujar

No. Because the Precompiler will comment out all the SQL statements and replace them with equvi call statements. And if use DB2 statment in Copy ,during pre compilation the statements in the copybook wont be commented out.. they will get expanded during compliation of modified source code and we will get Complilation error there.

Is This Answer Correct ?    9 Yes 0 No

can I copy book which contain db2 statment in procedure divion?..

Answer / siddhesh

You can if you are using an integrated COBOL compiler. In
an intergrated COBOL compiler the DB2 precompiler, CICS
translator and the COBOL compiler work together. You can
CICS and/or DB2 statements in a copybook.

If you are using a standalone compiler, you cannot include
SQL statements in COPY.

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More COBOL Interview Questions

copy 100 records without using ibm utilities

3 Answers  


what is the difference between implicit and explicit scope terminator with example? 

1 Answers  


How do u sort the table for Search ALL? Is it only using ASCENDING KEY IS statement in occurs clause? If the data is input in non ascending order, will the ASC KEY IS automatically sort the data? or will it throw compile time error?

1 Answers   CTS,


Can we use icetool in cobol program?

3 Answers  


how would you resolve sb37 and SE37?

2 Answers   Hewitt,


What is COMP-1? COMP-2?

4 Answers   CitiGroup,


What is rmode(24)

0 Answers  


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records...

2 Answers   ITC Indian Tobacco Company, PNP, TCS,


What are the different open modes available in cobol?

0 Answers  


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

1 Answers   L&T,


what are the error codes in cobol, db2, cics, vsam , and jcl

2 Answers   TetraSoft,


which one is the best of com and com-3.using of real time ?

7 Answers   Cap Gemini,


Categories