Monday, 2 February 2015

Basic JCL Interview Questions and Answers (Part4)

31. How do you overcome this limitation ?
    One way is to code SYSIN DD DUMMY in the PROC, and then override this from the JCL with instream data.

32.How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
            To run a non DB2 program,
                //STEP001 EXEC PGM=MYPROG
            To run a DB2 program,
            //STEP001 EXEC PGM=IKJEFT01
            //SYSTSIN DD *
            DSN SYSTEM(....)
            PLAN(.....) LIB(....) PARMS(...)

33.What is STEPLIB, JOBLIB? What is it used for?
    Specifies that the private library (or libraries) specified should be searched before the default system libraries in order to locate a program to be executed.
    STEPLIB applies only to the particular step, JOBLIB to all steps in the job.

34.What is order of searching of the libraries in a JCL?
    First any private libraries as specified in the STEPLIB or JOBLIB, then the system libraries such as SYS1.LINKLIB. The system libraries are specified in the linklist.

35.What happens if both JOBLIB & STEPLIB is specified ?
    JOBLIB is ignored.

36.When you specify mutiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
    The library with the largest block size should be the first one.

37.How to change default proclib ?

38.The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
    Records will be written to end of file (append) when a WRITE is done in both cases.

39.What are the valid DSORG values ?
    PS - QSAM, PO - Partitioned, IS - ISAM

40.What are the differences between JES2 & JES3 ?
    JES3 allocates datasets for all the steps before the job is scheduled. In JES2, allocation of datasets required by a step are done only just before the step executes.
More Questions & Answers :-
Part1  Part2  Part3  Part4  Part5

No comments:

Post a Comment