Friday, September 21, 2007

Mainframe Interview Q's

MAINFRAME INTERVIEW QUESTIONS


JCL

1.What is the use of EXEC statement?

Marks the beginning of the JOB
Identifies the program to be executed
To pass the inputs to the program
To terminate the program

2.What is 822 abend ?

Job or tso session exceeded maximum job wait time or operator did not mount the required tape within allowed time limit
A region required to run the step could not be obtained.
Outlim maximum has reached.
Job or tso session exceeded maximum job wait time or operator did not mount the required tape within allowed time limit.

3. Which one of the following renames the member OLD to NEW in USERID.SYSTEST.JCL

a. //STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALTER USERID.SYSTEST.JCL (OLD) -
NEWNAME(USERID.SYSTEST.JCL(NEW))
/*

b. //STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DD1 DD DSN=USERID.SYSTEST.JCL,DISP=SHR
//SYSIN DD *
ALTER USERID.SYSTEST.JCL (OLD) -
NEWNAME(USERID.SYSTEST.JCL(NEW))
FILE (DD1)
/*

c. //STEP1 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
RENAME ‘USERID.SYSTEST.JCL(OLD)’ +
‘USERID.SYSTEST.JCL(NEW)’
/*

d. //STEP1 EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
RENAME ‘USERID.SYSTEST.JCL(OLD)’ +
‘USERID.SYSTEST.JCL(NEW)’
/*

both a & b
both b & c
both c& d
none of the above renames the member.

4.The utility which is used to compress dataset is

IEBCOPY
IKJEFT01
IEBGENER
IEBCOMPR

5.What is the default DISP=(OLD,,) parameter for an already existing dataset when accessing

DISP=(,CATLG,DEL)
DISP=(,DEL,DEL)
DISP=(,KEEP,KEEP)
DISP=(,PASS,DEL)

6.Name the input and output DD statements used in IEBGENER utility

SYSUT1,SYSUT2
SYSTSIN1,SYSUT2
SYSDD,SYSPRINT
SYSUT1,SYSTSIN2

7. The maximum number of keys given in a SORT FIELD is

10
255
16
8
12

8.Which of the following DD statements creates the temporary dataset

//DD1 DD DSN=&&TEMP
//DD1 DD SPACE=(TRK,(2,1))
//DD1 DD DSN=A.B.C,DISP=(NEW,CATLG,DEL)
//DD1 DD DSN=&&SPACE

Both a & b
Both b & c
Both c & d
Both a & d

9.Total number of insream procedure that can be coded inside a JOB is

12
15
16
8

10.Read the following code

//STEP1 EXEC PGM= ADD
//STEP2 EXEC PGM= SUB,COND=(0,LE)
//STEP3 EXEC PGM= MUL,COND=(0,LE)
//STEP4 EXEC PGM= DIV

a. STEP1& STEP 4 is executed
b. STEP2 & STEP3 is bypassed
c. STEP1 & STEP4 is bypassed
d. STEP2 & STEP3 is executed

a. a alone is true
b. b alone is true
c. Both a & b is true
d. Both c & d is true

11.The TSO command which is used for Search string for extended is

Option 3.15
Option 3.12
Option 3.13
Option 3.14

12.What are all the different ways to pass inputs from JCL to COBOL program

a. Parm parameter, sysin dd * , sysin dd data
b. TSQ,TDQ,DFHCOMMAREA
c. Through BP0,BP1,BP2,BP3
d. It is not possible to pass data from JCL to COBOl programs

13.What are all the common parameters that can be used in both JOB and EXEC statement

a. COND,RESTART,TIME
b. COND,REGION,TYPRUN
c. COND,RESTART,TIME
d. COND,REGION,TIME

14.How will u display the scale on the screen?

CSR ON
PAGE ON
SCALE ON
COLS

15.In sort utility which is used to reformat records,before they are proceeded by the sort program

INCLUDE
INREC
OMIT
OUTREC

16.A proc has 5 steps . Step3 has cond code . how it can be overrided/nullify this condition

a. //STEP1 EXEC PROCname,STEPname.COND=value
b. //STEP1 EXEC PROCname,COND.STEPname= value
c. //STEP1 EXEC PROCname,COND=value
None of the above

17.How a PROC can be restart from a particular step in a JOB?

Coding RESTART=STEPname.PROCSTEP in the JOB card
Coding RESTART=PROCSTEP.STEPname in the JOB card
Coding RESTART=PROCSTEP.STEPname in the procedure
Coding RESTART=STEPname.PROCSTEP in the procedure

18.What is the TSO command used to rename the sequential dataset with the disposition of SHR

ALTER
REName
CHANGE
MODIFY

19.What is the TSO command used to identify a dataset to which user or to which JOB it has been allocated?

FIND
WHOGOT
WHEN
PROFILE

20.What command is used to check the syntax of a JCL without running it?

TYPRUN=HOLD
TYPRUN=SCAN
TYPRUN=CHECK
TYPRUN=VALIDATE

VSAM

1.What is the defalut record size for a non spanned dataset

a. (80 80)
b. (4089 4089)
c. (4089 32600)
d. (80 4089)

2.The default print format is

a. Character
b. Hexadecimal
c. Dump
d. None of the above.

3.Buffer space cannot be specifed in which of the following

a. Cobol program
b. Assembler program
c. AMS define
d. DD statement

4.How many buffers are alloted to VSAM KSDS and ESDS

a. 2 data buffer for KSDS and 2 data buffer,1 index buffer for ESDS
b. 1 data buffer,1 index buffer for KSDS and 1 data buffer for ESDS
c. 2 data buffer, 1 index buffer for KSDS and 2 data buffer for ESDS
d. 2 data buffer, 1 index buffer for KSDS and 1 data buffer for ESDS

5.Which of the following entry names are valid for ALTER FREE SPACE?

a. Index component name
b. Data component name
c. a only
d. b only
e. Both a & b

6.Freespace(100 100) refers to

a. Both control interval and control area will be left empty and no records in control interval and no control interval in control area..
b. No freespace in control interval and in control area.
c. 1 record in each control interval and 1 control interval in each control area.
d. 100 records in control interval and 100 control intervals in control area.

7.Default cluster type is

a. NUMBERED
b. NON-INDEXED
c. INDEXED
d. None of the above

8.VSAM error code 05 refers to

a. Close option incompat file device''open implies tape; tape not used
b. Read, wrong length record
c. Invalid key vsam ksds or rrds
d. Open, file not present
e. None of the above

9.An alternate index can be defined for

a. RRDS,KSDS
b. KSDS,ESDS
c. ESDS,RRDS,KSDS
d. KSDS,ESDS,LDS

10.Using REPRO to reorganize a KSDS , which of the following is true?

a. Input must be ascending key sequence.
b. No dupilicates keys are allowed.
c. Non-unique keys are allowed.
d. Both a and c
e. Both a and b

11.Which of the following create a GDG in the name of USERID.SYSTEST.GDGDATA with 10 Generations

a. //STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG ( NAME ( USERID.SYSTEST.GDGDATA) -
ENTRIES(10)
/*

b. //STEP1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG ( NAME ( USERID.SYSTEST.GDGDATA) -
LIMIT(10) -
/*

c. //STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
BLDG INDEX = USERID.SYSTEST.GDGDATA
ENTRIES = 10
/*

d. //STEP1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
BLDG INDEX = USERID.SYSTEST.GDGDATA
ENTRIES = 10
/*

e. None of the above creates GDG

12.Which of the following statement is true?

ESDS can be converted to LDS , LDS can be converted into ESDS
KSDS can be converted to LDS, LDS can be converted into KSDS
RRDS can be converted into LDS, LDS can be converted into RRDS
None of the above

13.Minimum and maximum size of control interval and control area is

512 bytes,32 KB and 1 track and 1 cylinder respectively
512 bytes,4096 bytes and 1 BLK, 1 track respectively
4096 bytes,32 KB, 15 tracks,1 cylinder respectively
None of the above

14.Spanned records are accessed in

EXPORT
MOVE
LOCATE
None of the above

15. VERIFY command cannot be used for

a. KSDS & RRDS
b. LDS & Empty dataset
c. LDS & ESDS
d. LDS & RRDS
e. ESDS & RRDS

16. Total number of RDF & CIDF for variable and fixed length VSAM control interval is

a. 2 RDF ,1 CIDF and 1 RDF, 1 CIDF respectively
b. 1 RDF ,1 CIDF and 1 RDF, 1 CIDF respectively
c. 1 RDF ,1 CIDF and 2 RDF, 1 CIDF respectively
d. 2 RDF ,1 CIDF and 2 RDF, 1 CIDF respectively

17. When a GDG is created for a first time what is the current version of the GDG

+1
-1
0
None of the above
18. A GDG is created In a particular step of a proc , how to refer the current generation in the third step of the proc? and what is the disposition?

(+1) ,DISP=(NEW,CATLG,DEL)
(+1) ,DISP=(OLD,KEEP,KEEP)
(+3) ,DISP=(NEW,KEEP,KEEP)
(+3) ,DISP=(OLD,KEEP,KEEP)

19. What is the sort card for the following condition
Compare the 8 ,9 th character with 11 and 12 th character in vsam file variable length records, If it matches copy those records in outfile

SORT FIELDS= COPY,OUTFIL=01,INCLUDE COND=(8,2,CH,EQ,11,2,CH)
SORT FIELDS= COPY,OUTFIL=01,INCLUDE COND=(12,2,CH,EQ,15,2,CH)
SORT FIELDS= COPY,OUTFIL=01,INCLUDE COND=(2,8,CH,EQ,2,11,CH)
SORT FIELDS= COPY,OUTFIL=01,INCLUDE COND=(2,12,CH,EQ,2,15,CH)

20. Consider three generations of a GDG exist. How to refer the first generation?

GDGname (+1)
GDGname (+3)
GDGname (-3)
GDGname (-2)

CICS

1. CICS Error code AEIR refers to

NO SPACE ERROR
INVREQ ERROR
QIDERR ERROR
QZERO ERROR

2. The maximum number of Handle conditions can be used in a handle condition paras is

16
12
15
10

3. Which of the following CICS program governs the flow of control among CICS application program

Program control program
Interval control program
Task control program
Storage control program

4. A Mapset consists of three maps and 10 fields on each map. How many of the following macros will be needed

DFHMSD statements 1
DFHMDI statements 3
DFHMDF statements 10
DFHMSD statements 3
DFHMDI statements 3
DFHMDF statements 30
DFHMSD statements 1
DFHMDI statements 3
DFHMDF statements 30
DFHMSD statements 1
DFHMDI statements 4
DFHMDF statements 10

5. The commands used for CICS file browsing

a. START,READ,WRITE,REWRITE,DELETE
b. OPEN,CLOSE,FETCH
c. STARTBR,ENDBR,RESETBR,READNEXT,READPREV
d. INSERT,UPDATE,DELETE,CREATE

6. Moving 1 to FLD + A results in

a. Points the cursor to the initial position
b. Makes MDT value to ON
c. Reset the flag byte
d. Both a & b
e. Both a & c

7. which of the following statements is true

a. LINK creates the lower logical level , XCTL does not creates the lower logical level
b. XCTL creates the lower logical level , LINK does not creates the lower logical level
c. Both LINK and XCTL creates the lower logical level
d. Both LINK and XCTL does not creates the lower logical level

8. which of the following statements is true

a. TSQ can be Random read, Rewrite is not possible in TSQ
b. TSQ can be Random read, Rewrite is possible in TSQ
c. TSQ can be read only sequential manner,Rewrite is not possible in TSQ
d. TSQ can be read only sequential manner,Rewrite is possible in TSQ

9.What is the most common way to name the TSQ

a. TASKID + TERMID
b. TRANSID + TERMID
c. TERMID + TRANSID
d. TERMID + TASKID

10. Name the communication method which is used to communicate with remote terminal

TCAM
BTAM
VTAM
ISC

11. In which control table plan are stored

DCT
PCT
RCT
TCT

12. What is the command which is used to activate and deavtivate the Handle Conditions in CICS in the middle of the program

ENQ & DEQ
PUSH & PUSH
GETMAIN & FREEMAIN
ACQUIRE & RELEASE

13. What command is used to clear all the un protected filed in the screen

ERASE
CLEAR
ERASEAUP
ERASEUP

14. What is the name of the facility provided by CICS to free the application program from the problems caused by NMDS

Terminal paging
Logical message
Journal recovery
Transaction Routing

15. How to use the extended attribute?

REUSE=YES
GETMAIN=YES
EXTAT=YES
EXTATT=YES

16. State which of the following statement is true

TWA store the information of the communication area.
TCTUA Store the length of communication area
CWA stores the data of the communication area
All the above statements are false
All the above statements are true

17. State which of the following is true

ESDS can be accesed from CICS
QSAM files cannnot be accesed from CICS
DB2 Tables can be accesed from CICS
All the above are true
All the above are false

18. CICS error code AEIP refers to

INVREQ
MAPFAIL
QZERO
QIDERR

19. Using CURSOR(m n) in the send map command is a type of what cursor positioning

STATIC
REALATIVE
SYMBOLIC
DYNAMIC

20. What is the picture clause definition for RESP code in CICS

S9(9) COMP
S9(8) COMP
S9(4) COMP
S9(7) COMP-3

DB2 & SQL

1. Sqlerror code –923 refers to

a. Authorisation failure.
b. Connection not established
c. Unsuccessful execution due to unavailable resources
d. Unsuccessful execution due to deadlock time out.

2. IDMS belongs to

File management system
Hierarchial database management system
Network database management system
Relational database management system

3. The key word which is used to get the unique records from the table is

DISTINCT
LIKE
UNIQUE
EXACT

4. What is the picture clause definition of SQLERRP

S9(9) COMP
X(8).
S9(4) COMP
S9(7) COMP-3

5. The Utillity required for compiling and executing a COBOL,DB2 program is

IKJEFT01,IEBGENER,IEWL
IKJEFT01,IEBEDIT,IEWL
IKJEFT01,IGCRCTL
IKJEFT01,IGYWCLG

6. What is collection

Named collection of packages
Named collection of plans
Named collection of DBRMs
Named collection of CATALOGs

7. what is index cardiniality

No of distinict values a column contains
One divided by number of distinct values of a column
Total number or rows a table contains
Tota number columns a table contains
e. None of the above

8. Synonyms are nothing but the

a. Virtual table for a base table
b. Alternate name for a base table
c. Copy of a base table
d. Child table for the base table

9. The catalog which contains all the sql atatements of a DBRM which are bound into a plan is

a. SYSIBM.SYSPACKSTMT
b. SYSIBM.SYSSTMT
c. SYSIBM.SYSDBRM
d. SYSIBM.SYSPLAN

10. The maximum number of table used in FROM clause in a SQL query is

12
15
16
8

11. Sqlerrorcode –602 refers to

The operands of an arithmetic or comparison operation are not comparable
The name of the object to be created is identical to the existing name of the object type
Too many columns specified in a create index
A clustering index already exists on table

12. outer join results in

Includes rows from tables when there are no matching values in the tables
Includes rows from tables when there are matching values in the tables
Does not Includes rows from tables when there are no matching values in the tables
Does not Includes rows from tables when there are matching values in the tables

13. SPUFI stands for

Sql Program Using File Input
Sql Program Using Flag Input
Sql Processing Using File Input
Sql Processing Using Flag Input

14. WHENEVER can be used for

NOTFOUND
SQLWARNING
SQLERROR
SQLCODE

Both a & b
Both a & c
Both b & c
a,b and c

15. The command which is used to delete the plans in the catalog

EXPORT
REUSE
DELETE
FREE

16. Read the following code

EXEC SQL
DECLARE PTR-CURSOR CURSOR FOR
SELECT FT-EMP-SALARY FROM EMP-TABLE
WHERE FT-EMP-ID = FT-EMP-ID
END-EXEC. What is the content of the resultant table when open statement is executed.

Resultant table will contain FT-EMP-SALARY
Resultant table will contain FT-EMP-ID
Resultant table will contain all columns of the table
d. Error occurs

17. What is the picture clause of the null indicator variable?

S9(8) COMP
S9(4) COMP
S9(7) COMP-3
S9(9) COMP


18. What does it means , if the null indicator has –1

The field is truncated
The filed is null
The filed is not null
None of the above

19. Sqlerror code –504 refers to

The cursor identified in a fetch or close statement is not open
The cursor name is not defined
The cursor identified in an open statement is already open
The cursor identified in the update or delete statement is not

20. The dataset which contains information about the active log and archive log is

SMF
GTF
DB2PM
BSDS
None of the above

COBOL

1. What is the maximum no of AFTER clause used in a PERFORM statement ?

3
8
4
7

2. Read the following code .

01 WS-N PIC 9(2) VALUE ZERO

A-PARA.
MOVE 5 TO WS-N.
PERFORM B-PARA WS-N TIMES
B-PARA.
MOVE 10 TO WS-N. How many times will B-PARA be executed.

5 times only
10 times only
15 times only
Closed loop no end
None of the above

3. 01 EMP.
05 EMP-TAB OCCURS 10 TIMES INDEXED BY WS-INDEX.
How the index value is increased in COBOL search

a. ADD 1 TO WS-INDEX.
b. COMPUTE WS-INDEX=WS-INDEX + 1
c. SET WS-INDEX UP BY 1
d. None of the above.

4. How many bytes does a s9(9)v9(9) comp-3 occupies.

a. 9
b. 18 bytes
c. 19 bytes
d. 10 bytes
e. None of the above.

5. Variables declared in Main program and Sub program is called

a. Positional parameters,Keyword parameters respectively
b. Keyword parameters,Positional parameters respectively
c. Actual parameters,Formal parameters respectively
d. Formal parameters,Actual parameters respectively
e. None of the above.

6. To use START function for reading a file , the file file should be accessed in

a. Sequential mode
b. Skip-sequential mode
c. Random mode
d. Dynamic mode

7. The syntax for using reference modification is

a. VARIABLE(starting position, length)
b. VARIABLE{starting position, length}
c. VARIABLE(lenght : starting position)
d. VARIABLE{length : starting position}
e. VARIABLE(starting position : length)

8. The default test condition for PERFORM statement is

a. TEST AFTER
b. TEST BEFORE
c. WITH TEST
d. WITHOUT TEST

9. 77 A PIC Z(5)V9(3).
MOVE 345.45 TO A.
DISPLAY A.

a. 34545
b. 0034.5450
c. 00345450
d. BB345.450
e. BB345450

10. PSW stands for

a. PROGRAM STORAGE – WORK AREA
b. PROGRAM STATUS – WORK AREA
c. PROGRAM STATUS WORD
d. PROGRAM STORAGE WORD
e. None of the above

11. 77 MYSTRING PIC X(20) VALUE ‘ABCDEFGHIJKLMNOPQRST’
77 TALLY-COUNT PIC 99 VALUE 5.
.
PROCEDURE DIVISION.
100-PARA.
INSPECT MYSTRING TALLYING TALLY-COUNT FOR CHARACTERS.
DISPLAY TALLY-COUNT.

a. 2
b. 5
c. 20
d. 25

12.The Key word which is used to use the same COPY BOOK more than once in a COBOL program is

a. COPY
b. INCLUDE
c. REPLACING
d. LIKE

13.What are all the different ways to pass inputs from JCL to COBOL program

a. Parm parameter, sysin dd * , sysin dd data
b. TSQ,TDQ,DFHCOMMAREA
c. Through BP0,BP1,BP2,BP3
d. It is not possible to pass data from JCL to COBOl programs

14. What is the length of a page ?

2K
4K
8K
16K

15. State which of the following statements is true?

VALUE clause is allowed in WORING-STORAGE SECTION.
VALUE clause is not allowed in LINKAGE SECTION
VALUE clause is allowed in LINKAGE SECTION
VALUE clause is not allowed in WORKING-STORAGE SECTION

a. a alone is true
b. b alone is true
c. Both a & b is true
d. Both a & c is true

16. What key word is used to trap the error , when the sub program called is not found

ONSIZE
ONOVERFLOW
INVALIDKEY
d. AT END

17.What is the size of the COMP-1 variables

a. 2 bytes
b. 4 bytes
c. 8 bytes
d. 16 bytes

18. Name the function which is used to get current date from the system

DATE
CURRENT DATE
CURRENT_DATE
CURRENT-DATE
19. How many bytes will s9(18) comp3 occupies?

10 bytes
18 bytes
9 bytes
4 bytes

20. Read the following code

01 WS-A PIC X(1).
01 WS-B REDEFINES A PIC X(2) .
.
.
PROCEDURE DIVISION.
100-PARA.
MOVE ‘12’ TO WS-B.
DISPLAY A.
DISPLAY B.
What is the output?