Mainframe Interview Questions

Q:

How is sign stored in a COMP field?

Answer

It is stored in the most significant bit. Bit is ON if -ve, OFF if +ve.

Report Error

View answer Workspace Report Error Discuss

1 2456
Q:

What is a junction record in IDMS?

Answer

A junction record is a member record type that allows for many-to-many relationship between its two owner records.

Report Error

View answer Workspace Report Error Discuss

0 2453
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 2437
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 2389
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 2360
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 2341
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 2319
Q:

How do you insert a record with a nullable column?

Answer

To insert a NULL, move -1 to the null indicator


To insert a valid value, move 0 to the null indicator


 

Report Error

View answer Workspace Report Error Discuss

0 2301