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 guidelines should be followed to write a structured Cobol program?

1 Answers  


Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS

2 Answers  


What is "Call by content" and "call by reference"?

4 Answers   Syntel, ADP,


What is LENGTH in COBOL II?

2 Answers   CSC,


what are the diferences b/w sub-script and index?

4 Answers  






how will you define vsam file in select clause?

3 Answers   Patni,


in a indexed file what is procedure for read the records from 12 to 18. please give the code example

2 Answers   L&T,


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


I want ALL jcl ERROR cods

1 Answers  


How do u find the programs calling the given module, without having doing 3.13 on loadlib/source library?

2 Answers  


In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?

1 Answers  


What is the difference between static call & Dynamic call?

2 Answers   TCS, CSC,






Categories