Mainframe Interview Questions

Q:

How does IDMS insure data integrity?

Answer

IDMS uses record locks to prevent another run-unit from updating the same record.

Report Error

View answer Workspace Report Error Discuss

0 2832
Q:

How do you define a sort file in JCL that runs the COBOL program?

Answer

Use the SORTWK01, SORTWK02,..... dd names in the step. Number of sort datasets depends on the volume of data being sorted, but a minimum of 3 is required.

Report Error

View answer Workspace Report Error Discuss

0 2770
Q:

What are different ways of Initiating Transaction in CICS?

Answer

The following are the ways of initiating a CICS transaction.


1. By entering Transaction Id


2. By Start command


3. By Return Trans Id (as in pseudo - conversation)


4. By Registering Tran ID in plt so that it will be automaticaly dusring CICS start


5. By ATI (Automatic task initiation)


6.PF & PA keys as defined in PCT

Report Error

View answer Workspace Report Error Discuss

0 2724
Q:

How do you eliminate duplicate values in DB2 SELECT?

Answer

Use SELECT DISTINCT ..... in DB2 query


 


The DISTINCT keyword can be used to return only distinct (different) values.


Syntax:


     SELECT DISTINCT column1,column2


      FROM table_name;


 

Report Error

View answer Workspace Report Error Discuss

0 2713
Q:

What is the difference between Cursor Stability and Repeatable Read isolation levels?

Answer

CURSOR STABILITY:


- CS is a row level locking


- Acquires an exclusive lock on the row that is to be updated


- When the control is moved to the next updatable row, the lock is released


REPEATABLE READ:


- RR is a page level locking


- Acquires an exclusive lock on the entire page which is the source of row availability


- When the control is moved to the next updatable page the lock is released

Report Error

View answer Workspace Report Error Discuss

0 2701
Q:

How do you display last 5 records in DB2?

Answer

SELECT * FROM table_name ORDER BY column_name desc Fetch first 5 rows only;

Report Error

View answer Workspace Report Error Discuss

0 2684
Q:

What is UNION , UNION ALL?

Answer

Both these are used to combine the results of different SELECT statements.


    UNION       - Selects only distinct values 


    UNION ALL - Selects duplicate values also


 


Syntax:


    SELECT column_name(s) FROM table1


    UNION / UNION ALL


    SELECT column_name(s) FROM table2;


Notice that each SELECT statement within the UNION must have the same number of columns. The columns must also have similar data types. Also, the columns in each SELECT statement must be in the same order.


 

Report Error

View answer Workspace Report Error Discuss

0 2678
Q:

Name some common VSAM error conditions and codes?

Answer

End of file  (10)


Duplicate key (22)


Record not found (23)


VSAM logic error  (90)


Open problem  (92)


Space problem (93)

Report Error

View answer Workspace Report Error Discuss

0 2622