Professional Documents
Culture Documents
Mainframe JCL Interview Questions Part 6
Mainframe JCL Interview Questions Part 6
Q.What do you mean by INCLUDE statement in JCL? A.An INCLUDE statement identifies a member of a PDS that contains this set of JCL statements is called an INCLUDE group. The system replaces the INCLUDE statement with the statements in the INCLUDE group. Q.What are S0C1, S0C4, S0C5, S0C7 ABENDs?? A. 1.S0C1 (Operation Exception Error) - May be due to Missing or misspelled DD name ,Read/Write to unopened dataset ,Reading a dataset opened output mode ,Writing into a dataset opened input mode ,Called subprogram not found 2.S0C4 may be due to Missing Select statement (during compile) ,Bad Subscript/index ,Protection Exception,Missing parameters on called subprogram ,Read/Write to unopened file ,Move data from/to unopened file; 3.S0C5 May be due to Bad Subscript/index ,Close an unopened dataset ,Bad exit from a perform ,Access to I/O area (FD) before read; 4.S0C7 may be due to Numeric operation on non-numeric data ,Un-initialized working storage ,Coding past the maximum allowed subscript 5.S0CB might be due to 1.Division by Zero Q.Why do you use a CONTROL CARD? A.A CONTROL CARD can be a member of a PDS or a sequential dataset and is used for storing the date fields, definitions of VSAM files etc., We use CONTROL CARD because we cannot use an in-stream procedure in a procedure. Generally you will be calling a PROC from your JCL and you cannot code instream procedure in the PROC and so you will point to the dataset, which is called controlcard. Q.How do you submit JCL via a Cobol program? A.In your JCL define as: //JOBA JOB 1111,JOB1 //STEP01 EXEC PGM=PROG1 //ddname DD SYSOUT=(*,INTRDR)....and your COBOL (PROG1) should look like this: SELECT JCL-FILE ASSIGN TO ddname. Open this file and write the JCL statements into this file. Example: MOVE '//TESTJOB JOB 1111,VISVEISH' TO JCL-REC.MOVE '//STEP01 EXEC PGM=IEFBR14' TO JCL-REC.and close this file. Then TESTJOB will be submitted. Q.How do you submit a JCL under CICS environment? A.Pass all the JCL codes to a COBOL variable (should be declared using OCCURS clause) and then write the line one by one to the spool using CICS commands like SPOOLClose, SPOOLOpen and SPOOLWrite. For more help refer CECI of CICS or CICS manual. Q.What is the parameter to be passed in the job card for the unlimited time, irrespective of the job class A.TIME=1440 Q.Define COND parameter in JCL? A.COND is a condition parameter, consists of 2 subparameters, 1st - return code from the previous step, 2nd - condition. If COND is true, the step on which COND is coded will be BYPASSED. It is compared with system return code of previous step //STEP1 EXEC
1/5
PGM=ABCD //STEP2 EXEC PGM=XYZ, cond=(4,lt) STEP 2 will be executed when system return code of step1 is less than 4. Q.What is meant by S0C-07 system ABEND codes A.S0C7 - Data exception error - you will get it whenever you are trying to move the low values or spaces into the numeric field, or compare the numeric fields with low values, or try to do some arithmetic operations on the low values. To avoid this you have to always initialize the numeric fields otherwise they will contain the low values. Q.How to pass the temp dataset form one JOB step to another? A.By specifying the DISP as PASS for the temp dataset Q.Write a JCL to execute a Job by 7:00 AM on Jan 20,1986? A.The code is: //*MAIN DEADLINE=(0700,B,012086) Q.How many types of libraries are there in JCL? A.Libraries are of three types: System Libraries:- such as SYS1.LINKLIB Private Libraries:Specified in a JOBLIB or STEPLIB DD STATEMENTS. Temporary Libraries:- Created in a previous step of the Job. Mainframe JCL Interview Questions and Answers Collection that would help the job seeker to clear upcoming Mainframe Interview. Q.What are the Maximum number of In-stream procedures you can code in any JCL? A.15. Q.What you mean by skeleton JCL? A.JCL, which changes during run time,that is the values for the JCL such as program name, dd name will change. The same JCL can be used for various jobs, equivalent to dynamic SQL; Q.What is JCL A.It is an interface between operating system (MVS) & the application program. When two related programs are combined together on control statements, it is called job control language Q.What is the maximum blocksize for a Tape file? A.It is 32,760. Based on that we can calculate efficient number of Records in a Block Q.What are the basic JCL Statements for a Job? A.The basic JCL statements for any job are: JOB : Identifies a job and supplies accounting info EXEC : Identifies a job step by indicating the name of the program to be executed. DD : Identifies a data set to be allocated for the job step Delimiter (/*) : Marks the end of an in-stream dataset Null (//) : Marks the end of a job Comments (//*) : Provides Comments PROC : Marks the beginning of a procedure PEND : Marks the end of a procedure OUTPUT : Supplies options for SYSOUT processing. Q.What does the statements: TYPRUN=SCAN and TYPRUN=HOLD do in a JCL statement?
2/5
A TYPRUN= SCAN checks the JCL for errors, TYPRUN= HOLD holds the job until further notice. Q.What is QSAM error usually when it occurs? A.Usually it occurs at the time of job submission. Q.What is the purpose of INCLUDE statement in a JCL? A.It is used as an alternative for STEPLIB. When we specify the dataset name in INCLUDE , it will search in all the datasets specified in the INCLUDE dataset. Q.Is it possible to know the remaining free space in a Control Interval/Control Area once an insertion has been made A.No. It is not possible. Q.What is a GDG? A.GDG - group of dataset that are logically or chronologically related, referred by name and a relative generation number - an integer which identifies the generation of a dataset and is coded in parentheses after dataset name. Absolute GDG name - GxxxxVyy, where xxxx-absolute generation number, yy-version number. GDGs can be sequential, direct, partitioned. (VSAM no). They must always be cataloged. Advantages - all datasets have the same name and system keeps track of adding new and retaining previous generations and deleting oldest successive generation. To create a GDG we create a GDG index in the system catalog with IDCAMS utility and then a model (prototype, DSCB) on the same volume to supply DCB information. Empty - when limit is reached all members are removed from the index, otherwise only oldest. Scratch-removed members are uncataloged & deleted, otherwise - removed & uncataloged, but remain in the system (not members of GDG any more). GDG number is updated at the end of the job. If number is not specified all generations will be processed from the beginning Q.What do you mean by spooling? A.This is managed by JES. This is used for Queuing the Outputs that are intended for Printing and are first stored in SPOOLDASD. Q.How many Instream-Procedures (PROCs) can be coded in a single Job? A.15 Q.What does SOC-04 error mean? A.This error is faced when we execute the Cobol program. The main reason for this error is that a variable is defined with fewer characters and we are trying to move data, which is larger than the actual storage space. Q.In which table PLAN is registered in? A.RCT Q.For how long a Job can be executed continuously on a Mainframe? A.248 DAYS
3/5
Q.How may divisions are there in JCL-COBOL? A.SIX Q.What is the Maximum number of DD Statements to be coded in a single JCL A.3273 Q.How much space OS allocates when you create a PS or PDS? A.56 KB Q.What is the minimum number of Dataset names (PDS) in one Directory Block? A.SIX Q.What is the maximum number of steps in a Job? A.255 Q.How much is memory space involved, when we code BLOCKSIZE, TRK & CYL A.One block constitutes 32KB of formatted memory/ 42KB of Unformatted memory; 6 blocks makes one Track & 15 Tracks makes one cylinder. Q.What is DSNDB06? A.This is the Place where DB2 Catalog resides; Q.How are in-stream procedures (procs) built? A.In-stream procedures are built by coding a set of statements and placing them after the JOB statement and before the EXEC statement. In-stream procedures begin with a PROC statement and end with a PEND statement. Up to 15 in-stream procedures can be included in a single job.Each in-stream procedures may be invoked several times within the job. In-stream procedures can use symbolic parameters in the same way as catalogued procedures. Q.What is the difference between an in-stream procedure and a catalogued procedure? A.An In-stream procedure is basically same as a catalogued procedure. The difference is that to execute an in-stream procedure one places it after the JOB statement and before the EXEC statement and must end it with a PEND statement. A catalogued procedure is catalogued on a procedure library and is called by specifying the procedure name on the EXEC statement. An in-stream procedure is useful to test the procedure before making it a catalogued procedure. Q.Name some of the JCL statements that are not allowed in the procs. A.Some of the JCL statements that are not allowed in the procs are: 1. JOB Delimiter (/*) or Null (//) statements 2. JOBLIB or JOBCAT DD statements 3. DD * or DATA statements 4. Any JES2 or JES3 control statements Q.What parameters are good candidates to make symbolic parameters? A.Any parameter, sub parameter, or value in a procedure that may vary each time the procedure is called is a good candidate to be coded as a symbolic parameter.
4/5
Q.Which type of override parameter requires that one know the parameters that can be overridden? A.Regular parameters require that one know the parameters that can be overridden, such as step names within the procedure, the DDnames of the statements overridden, and the order of the DD statements. Q.How is a symbolic parameter coded? A.A symbolic parameter is preceded by an ampersand (&) and followed by a name (&FIRST). The first character must be alphabetic. Symbolic parameters can be coded only in the operand field of the JCL statements; they cannot appear in the name or operation field of the JCL statements. If more than one value is assigned to the symbolic parameters on a PROC or EXEC statement, only the first one is used. Symbolic parameters may be coded in any order on the PROC or EXEC statement.
5/5