COBOL is abbreviated as Common Business Oriented Language and it is one of the oldest programming languages. It primarily used for business, finance and administrative systems for companies.
3. How do you specify and use a cursor in a COBOL program?
Use DECLARE CURSOR statement either in working storage or in procedure division ( before open cursor), to specify the SELECT statement. Then use OPEN, FETCH rows in a loop and finally CLOSE.
4. What is a synonym?
A synonym is an unqualified alternative name for a table or view.
5. What is a foreign key?
A foreign key is the key defined in one table to reference the primary key of a reference table. This foreign key must have the same structure as the reference table’s primary key.
6. What is referential integrity?
Referential integrity is the automatic enforcement of referential constrains that exist between a reference table and a referencing table. When referential integrity is enforced, the value of a foreign key exists as a primary key value in the reference table. In other words, when referential integrity is enforced, all of the foreign key values in, for example, the “department code” column in an “employee” table exist as primary key values in a “department” talbe.
7. How do you define a table/array in COBOL?
8. What is difference between COBOL and VS COBOL II?
9. How do you differentiate between COBOL and COBOL-II?
1. MVSXA and MVSESA support the compiler and the object programs it produces can be run in either 24- or 31-bit addressing mode.
2. VMXA and VMESA support the compiler and the object programs it produces can be run in either24- or 31-bit addressing mode.
3. VSEESA supports the compiler and the object programs it produces can be run under VSEESA.
The following features are available with VS COBOL II
A correlation name is a special type of column designator that connects specific columns in the various levels of a multilevel SQL query.
11. How to execute a set of JCL statements from a COBOL program?
Structured programming is logical way of programming where the functionalities are divided into modules and helps write the code logically.
Object Oriented Cobol language is a Natural way of programming in which you identify the objects, and then write functions and procedures around that object.
16. What happens when you say OPEN CURSOR?
If there is an ORDER BY clause, rows are fetched, sorted and made available for the FETCH statement. Other wise simply the cursor is placed on the first row.
17. What is the difference between SEARCH and SEARCH ALL? What is more efficient?
SEARCH is a sequential search from the beginning of the table. SEARCH ALL is a binary search, continually dividing the table in two halves until a match is found. SEARCH ALL is more efficient for tables larger than 70 items.
18. What guidelines should be followed to write a structured COBOL prgm?
1) Use ‘evaluate’ stmt for constructing cases.
2) Use scope terminators for nesting.
3) Use in line performs stmt for writing ‘do ‘constructions.
4) Use test before and test after in the perform stmt for writing do-while constructions.
19. What is the difference between a binary search and a sequential search? What are the pertinent COBOL commands?
20. What is LENGTH in COBOL II?