Mainframe Technologies: COBOL, JCL, and DB2
Test your knowledge of mainframe computing including COBOL programming, Job Control Language (JCL), and DB2 database management.
Questions
What will happen when a file that doesnt exist is opened in I-O mode?
- The file will be created and will be opened for reading and writing
- The open fails and error occurs
- File will be created and opened for writing only
- The file will be created and opened for reading only
What is an 88 level used for in COBOL?
- Elementary level
- For condition names
- Initialize
- Renames
What happens when the access mode of an indexed file is DYNAMIC?
- The records will be accessed one after the other in order of primary key
- The file will be accessed one record at a time and for each access an exact value for the primary key will be specified
- Both 1 and 2
- None of the above
What is the number of characters in COBOL-85 character set?
- 51
- 52
- 53
- 54
What is the name of the area from character positions 73 to 80?
- Area C
- Area AB
- Identification area
- Modification area
What does a disposition of (MOD,KEEP,) mean?
- Dataset is created if not available
- Dataset will deleted on abnormal termination
- Dataset will not be deleted on abnormal termination
- job will abend if the data is not available
Temporary datasets are created by
- DSN=*
- DSN=##TEMP
- DSN=&&TEMP
- By not specifying any DSNAME
What is COND=EVEN ?
- Execute next step even if the current step terminates abnormally.
- Execute this step even if any of the previous steps, terminated abnormally.
- Execute next step even if the current step terminates normally.
- Execute this step even if any of the previous steps, terminated normally.
What is COND=ONLY ?
- Execute this step only if any of the previous steps terminates normally
- Execute this step only if any of the previous steps terminates abnormally
- Execute next step only this step terminates abnormally
- Execute next step only this step terminates normally
What happens if both JOBLIB & STEPLIB is specified ?
- STEPLIB will be ignored
- JOBLIB will be ignored
- Both are referred
- JOBLIB overrides the STEPLIB
The DISP in the JCL is MOD, the dataset is already available and the program opens the file in OUTPUT mode. What happens ?
- Records will be appended at the end
- Records will be overwritten
- Dataset will be deleted and records will be written by creating a new file
- Job will abend
Maximum number of steps in a job
- 16
- 255
- 256
- No limit
Which of the following DB2 data types CANNOT be used to contain the date an employee was hired?
- TIMESTAMP
- VARCHAR
- TIME
- CLOB
Which of the following is defined on the dependent table to implement a referential constraint?
- Primary Key
- Check constraint
- Foreign Key
- Update trigger
Given the DDL statement: CREATE TABLE newtab LIKE tab. Which of the following would occur as a result of the statement execution?
- NEWTAB would have the same column names, attributes and referntial integrity as TAB.
- NEWTAB would have the same column names and attributes as TAB.
- NEWTAB would have the same column names, attributes, indexes and constraints as TAB.
- NEWTAB would have the same column names, attributes and data as TAB.
Which of the following occurs if an application ends abnormally during an active unit of work?
- The unit of work moves to pending status
- The unit of work moves to CHECK_PENDING
- The unit of work is rolled back
- The unit of work remains active
Given the table: COUNTRY NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?
- ORDER BY 2,1
- ORDER BY 2 ASC, 1 ASC
- ORDER BY 1,2
- ORDER BY 1 ASC, 2 ASC
Given the table COUNTRY: NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?
- ORDER BY 2,1
- ORDER BY 2 ASC, 1 ASC
- ORDER BY 1,2
- ORDER BY 1 ASC, 2 ASC
Given the table COUNTRY: NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?
- ORDER BY 2,1
- ORDER BY 2 ASC, 1 ASC
- ORDER BY 1,2
- ORDER BY 1 ASC, 2 ASC
Use OCCURS clause at 01 level
- True
- False