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

What is the mode in which you will OPEN a file for writing?

4 Answers  


can we use reference modification an arry.

1 Answers  


How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.

10 Answers  


Difference between next and continue clause

4 Answers   Kanbay,


Difference between lrecl, blksize among PS, PDS issues? i.e in jcl at dcb

1 Answers  






1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

0 Answers   IBM,


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

0 Answers   Valtech,


Can we move X(9) to 9(9). If yes what are the ways for doing this?

3 Answers  


how will u code parm parameter and where pls ?

3 Answers   DELL,


I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?

6 Answers   IBM,


) What is the use of IGNORE?

1 Answers   IBM,


Can we move SPACES to numeric field and ZEROES to alphabetic field? If yes what are the way doing this?

6 Answers   T systems,






Categories