Q1. How will you use two different DB2 qualifiers in a single COBOL program?
Suppose we have 2 tables EMP1 and EMP2 with same structure defined in two different DB2 qualifiers QUAL1.EMP1 and QUAL2.EMP2 now during first 15 days we want to use QUAL1.EMP1 and rest of the days QUAL2.EMP2 how will we do this.
We can create a single program and a single load for this program.
Answers were Sorted based on User's Feedback
Answer / gaurav alugh
We can do our code (in this code define everything for both the tables) and on the basis of DATE function from COBOL we can see what's the date. on the basis of that we can call our query referring to required tables.
Is This Answer Correct ? | 4 Yes | 3 No |
What are catalog tables in db2?
What is the connection string to connect to the DB2 Database ?
how we will do null data selection in cobol-db2 program
What is the difference between db2 and oracle?
assume ther are 5000 records in a database and want to fetch using cursor. cursor fetches only 3000 records and fetch is not happening for remaining 2000 records. why it happens and how to rectify it
When would you prefer to use VARCHAR?
For Read Stability locks are not applicable for phantoms, What is Phantoms?
Hi. I am currently working as a application developer. I would like to persue a DB2 certification exam. Can anybody please provide me the details about this exam like Syllabus, Cost and how to take the certification?
Explain how can you do the explain of a dynamic sql statement?
In a Cobol-DB2 program, I am fetching rows from 4 tables using cursor and then based on the a field present in that table, It processes the information accordingly..for example stat-c is one digit field..if stat-c is 'D' then the a row is deleted from table and written those details in to a file. If the stat-c is 'U' then a row is updated (hardcoded what to update)in a table and written those details in to a file. If the stat-c is 'I' then a row is inserted in a table and written those details in to two files. The issue is i have to include the intermediate commits. When an abend occurs, due to commit statement db2 tables will be saved, But there will be lose of file contents. When we resubmitting the job associated with this program there will be insert ,update and delete anomolies to avoid that what measures could be taken?. The intermediate commit is nothing but issuing commit after massive inserts, updates and deletes(sum of 500actions)
How can we define a table? How can we apply SEARCH ALL on it ?
What is the use of commit in db2?