Mainframe COBOL, JCL and VSAM Programming Quiz

Test your knowledge of mainframe computing including COBOL programming, JCL statements, and VSAM file management.

20 Questions Published

Questions

Question 1 True/False

Can I specify dummy VSAM dataset with AMP = 'AMORG' in a JCL?

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

DEFINE PATH command creates an alias for

  1. Bldindex
  2. non-VSAM datasets
  3. VSAM base cluster
  4. Define path
Question 3 Multiple Choice (Single Answer)

DEFINE ALIAS command creates an alias for

  1. Bldindex
  2. non-VSAM datasets
  3. VSAM base cluster
  4. Define path
Question 4 Multiple Choice (Single Answer)

How should be VSAM file defined in order that it can be accessed both in CICS and in BATCH environment?

  1. SHAREOPTION (1,3)
  2. SHAREOPTION (2,3)
  3. SHAREOPTION (3,1)
  4. SHAREOPTION (3,2)
Question 5 Multiple Choice (Single Answer)

How can submitting user's RACF authority be overridden in a job stream?

  1. Through the USER parameter
  2. Through the USER and PASSWORD parameter
  3. Through the RACF parameter
  4. By notifying the console operation to override authority
Question 6 Multiple Choice (Single Answer)

Many JCL statements contain specific values designed to direct and control the execution of the statement. What are these fields called?

  1. Linkage variables
  2. Parameters
  3. Control libraries
  4. Includes
Question 7 Multiple Choice (Single Answer)

Can an individual step be restricted from using all the job's allowed CPU time?

  1. Yes
  2. No
  3. Only in catalogued procedures
  4. Through the STEPTIME parameter
Question 8 Multiple Choice (Single Answer)

What is the maximum length of a single line of JCL?

  1. 72
  2. 74
  3. 73
  4. 71
Question 9 Multiple Choice (Single Answer)

What is the purpose of DD DUMMY statement?

  1. Marks a deleted DD statement
  2. Begins an interpreted command stream
  3. Specifies no space allocation & no disposition processing
  4. Suppress command processing
Question 10 Multiple Choice (Single Answer)

I am using internal sort in my cobol program . Is there any way to test the return code of operation???

  1. No , we can't check the return code for internal sort however for external sort it can be done
  2. YES,by using SORT-RETURN special register
  3. YES, we can test via Run jcl.
  4. YES,by checking in listing of the proram
Question 11 Multiple Choice (Single Answer)

What will happen if I change the below code MOVE ZERO TO TOTAL . PERFORM VARYING I FROM 1 BY 1 UNTIL I > 100 COMPUTE TOTAL = TOTAL + ITEM(i) * DISCOUNT END-PERFORM to the follwing code MOVE ZERO TO TOTAL PERFORM VARYING I FROM 1 BY 1 UNTIL I > 100 COMPUTE TOTAL = TOTAL + ITEM(i) END-PERFORM COMPUTE TOTAL = TOTAL * DISCOUNT

  1. NO ERROR but offcourse the result will differ.
  2. syntax error will occur
  3. Run time error
  4. NO ERROR with same result
Question 12 Multiple Choice (Single Answer)

If you are accessing ESDS VSAM file , then in cobol if you don't prefix the ddname with 'AS-' Then which abend might occur when attempting to open a dataset??

  1. S213
  2. S806
  3. S000 U4038
  4. S001-5
Question 13 Multiple Choice (Single Answer)

MERGE statement can have

  1. O/P PROCEDUE and INPUT PROCEDURE both
  2. O/P PROCEDUE but not INPUT PROCEDURE
  3. INPUT PROCEDURE but not O/P PROCEDUE
  4. can't use both of them
Question 14 Multiple Choice (Single Answer)

For KSDS or RRDS ,when DELETE statement is used the file must be opened in

  1. Input mode
  2. outout mode
  3. I/O mode
  4. extend
Question 15 True/False

When we use INTIALIZE verb to intialize group verbs,group elements which are FILLERs will not be intialized

  1. True
  2. False
Question 16 Multiple Choice (Single Answer)

which command cerates an alias for the VSAM base cluster

  1. DEFINE CLUSTER
  2. DEFINE ALIAS
  3. DEFINE PATH
  4. DEFINE BASE
Question 17 Multiple Choice (Single Answer)

IDCAMS utility can't be executed without 2 dd statement which are they??

  1. SYSPRINT and SYSOUT
  2. SYSIN and SYSOUT
  3. SYSPRINT and SYSIN
  4. The question is wrong
Question 18 Multiple Choice (Single Answer)

SEARCH ALL statement only test an equal condition

  1. YES
  2. NO, any condition along with equal can be checked
  3. Except Equal condition any condition can be chencked
  4. It Depends on the use of Search statement on perticular scenario
Question 19 Multiple Choice (Single Answer)

MOVE ZEROS TO TOTAL-OUT, TOTAL-OUT may have an __________ picture clause.

  1. alphanumeric
  2. numeric
  3. alphanumeric and numeric
  4. none of the above
Question 20 Multiple Choice (Single Answer)

WS-TAX-IN PIC 9(4) VALUE '1234'. WS-TAX-OUT PIC 9(3). MOVE WS-TAX-IN TO WS-TAX-OUT. What is the value WS-TAX-OUT contain?

  1. 234
  2. 123
  3. 1234
  4. 0