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 prgm?

0 Answers  


What is the significance of 'above the line' and 'below the line'?

2 Answers   Nokia,


How can you declare the file ?

1 Answers   Wipro,


if a file has 1000 recods how copy the records from 1 to 100 records using sort

4 Answers   IBM,


What is the Purpose of Pointer in the string?

0 Answers  






explain sorting techniques in cobol program?

0 Answers  


hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?

1 Answers   CGI,


What are different data types in cobol?

0 Answers  


How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


Can a REDEFINES clause be used along with an OCCURS clause? if yes, 01 WS-TABLE. 03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'. 03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you expect? if no,why?

6 Answers  


how to create temporary data set in jcl? what is the use?

3 Answers   Cap Gemini, Temenos,


Categories