can I copy book which contain db2 statment in procedure
divion?
Answers were Sorted based on User's Feedback
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 |
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 |
I have a occurs for 100 times but it has executed 101 time what could be the reason?
what is search and searchall?what is the diffrence between them?give an best example?
What type of Call you would use if you don;t want the control back to the calling program?
how to convert the recors form vsam file to db2 table tru file aid
how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?
what happens if we dont close cursor in db2-cobol pgm?
i have a file which contains records like 10,30,90,50,20,40,80,60,70 i want to display these records in reverse order like 70,60,80,40,20,50,90,30,10 please give me the cobol code (do not sort the records)
3 Answers Cap Gemini, Mind Tree,
If i initialize the 01 level variable in array, will it initialize all the array elements (occurs)?
if someone is using my file,how can i find which user id is using?
OCCURS clause is used in the DATA DIVISION on data names at (a) 01 level (b) 77 level (c) 88 level (d) any level from 02 to 49
which is better either static call or dynamic call? and why?
what are the limitations of Inline Perform?