Friday, September 21, 2007

JCL FAQ's

JCL

Q1. What are the kinds of job control statements?
A1. The JOB, EXEC and DD statement.


Q2. What is the meaning of keyword in JCL? What is its opposite?
A2. A keyword in a JCL statement may appear in different places and is recognized by its name, eg. MSGCLASS in the JOB statement. The opposite is positional words, where their meaning is based on their position in the statement, eg. in the DISP keyword the =(NEW,CATLG,DELETE) meanings are based on first, second and third position.


Q3. Describe the JOB statement, its meaning, syntax and significant keywords.
A3. The JOB statement is the first in a JCL stream. Its format is // jobname, keyword JOB, accounting information in brackets and keywords, MSGCLASS, MSGLEVEL, NOTIFIY, CLASS, etc.


Q4. Describe the EXEC statement, its meaning, syntax and keywords.
A4. The EXEC statement identifies the program to be executed via a PGM=program name keyword. Its format is //jobname EXEC PGM=program name. The PARM= keyword can be used to pass external values to the executing program.


Q5. Describe the DD statement, its meaning, syntax and keywords.
A5. The DD statement links the external dataset name (DSN) to the DDNAME coded within the executing program. It links the file names within the program code to the file names know to the MVS operating system. The syntax is // ddname DD DSN=dataset name. Other keywords after DSN are DISP, DCB, SPACE, etc.


Q6. What is a PROC? What is the difference between an instream and a catalogued PROC?
A6. PROC stands for procedure. It is 'canned' JCL invoked by a PROC statement. An instream PROC is presented within the JCL; a catalogued PROC is referenced from a proclib partitioned dataset.


Q7. What is the difference between a symbolic and an override in executing a PROC?
A7. A symbolic is a PROC placeholder; the value for the symbolic is supplied when the PROC is invoked, eg. &symbol=value. An override replaces the PROC's statement with another one; it substitutes for the entire statement.


Q8. What is RESTART? How is it invoked?
A8. RESTART is a JOB statement keyword. It is used to restart the job at a specified step rather than at the beginning.


Q9. What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB?
A9. GDG stands for generation data group. It is a dataset with versions that can be referenced absolutely or relatively. It is defined by an IDCAMS define generation datagroup execution.


Q10. Explain concatenating datasets.
A10. Datasets can be grouped in a DD statement one after another, eg. in a JOBLIB statement where the load module can exist in one of many datasets.


Q11. What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
A11. DISP=OLD denotes exclusive control of the dataset; DISP=SHR means there is no exclusivity.


Q12. What is MOD and when would you use it?
A12. DISP=MOD is used when the dataset can be extended, ie, you can add records at the end of an existing dataset.


Q13. What are the keywords associated with DCB? How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?
A13. The keywords associated with the DCB parameter are LRECL, RECFM, BLKSIZE and DSORG. The DCB information can be supplied in the DD statement. The sysem looks for DCB information in the program code first.


Q14. How do you designate a comment in JCL?
A14. The comment statement is //* followed by the comments.

Q15. What is the meaning of the EXEC statement keyword, COND? What is its syntax?
A15. COND specifies the conditions for executing the subsequent job step. The value after the COND= is compared to the return codes of the preceding steps and if the comparison is true, the step is bypassed. (If this answer confuses you, welcome to the club - memorize it and don't ask questions!)


Q16. What is the improvement to COND= in the latest version of MVS?
A16. MVS now allows for an IF bracketed by an END IF around any job step to replace the COND= syntax. Again, if the IF statement is true, the step is bypassed.


Q17. What is the purpose of the PARM keyword in the EXEC statement?
A17. The value after the PARM= specifies control information to be passed to the executing program of the job step.


Q18. What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?
A18. REGION specifies the maximum CPU memory allocated for a particular job or job step. If REGION is in the JOB card, it relates to the entire job; if in the EXEC statement, it relates to the job step.


Q19. What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?
A19. TIME specifies the maximum CPU time allocated for a particular job or job step. If TIME is in the JOB card, it relates to the entire job; if in the EXEC statement, it relates to the job step.


Q20. What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?
A20. Data definition name is the eight character designation after the // of the DD statement. It matches the internal name specified in the steps executing program. In COBOL that's the name specified after the ASSIGN in the SELECT ASSIGN statement. Dataset name is the operating system (MVS) name for the file.


Q21. How is the keyword DUMMY used in JCL?
A21. For an output file DUMMY specifies that the output is to be discarded. For input it specifies that the file is empty.


Q22. What does the keyword DCB mean and what are some of the keywords associated with it?
A22. DCB stands for data control block; it is a keyword for the DD statement used to describe datasets. Keywords associated with it are BLKSIZE, DEN, LRECL and RECFM.


Q23. What is the difference between BLKSIZE and LRECL?
A23. BLKSIZE specifies the number of bytes


JCL Technical FAQ's


Q What is JCL ?
A JCL stands for Job Control Language

Q What is the difference between keyword and positional parameters ?
A Positional parameters are characterized by their position in the operand field in relation to other parameters.Keyword parameters are positionally independent with respect to others of their type and consisting of a keyword followed by an equal sign and variable information.

Q What is a DISP ?
A DISP is a keyword parameter which is defined on the DD statement and which consist of the following positional subparameters: DISP=(Status, Normal Disp, Abnormal Disp). The DISP parameter describes the current status of the dataset (old, new, or modified) and directs the system on the disposition of the data set (pass, keep, catalog, uncatalog, or delete) either at the end of the step or if the step abnormally terminates. DISP is always required unless the data set is created and deleted in the same step.

Q What is DISP=SHR ?
A DISP=SHR permits old data sets to be shared. SHR is identical to OLD except that several jobs may read the dataset concurrently in multiprogramming environments. SHR must be used only for input data sets; use OLD or MOD if data set is modified. Sharing data set is necessary because public libraries like SYS1.LINKLIB or the subroutine libraries should be available to every job in the system.

Q What is DISP=MOD ?
A DISP=MOD modifies a sequential data set. It is a convenient way to add data to the end of sequential dataset. If the data set doesn't exist, the system changes MOD to NEW unless the VOL parameter request specific volume. When VOL is coded, the stem expects to find data set on the specified volume and terminates the step if it cannot find it. MOD is the usual way of extended data sets in to several direct-access volumes.

Q What is DISP=PASS ?
A PASS passes the data set on to subsequent job steps, and each step can use the data set once. It is a positional subparameter of the DISP which could only be specified under normal termination action. Pass saves time because the system retains the data set location and volume information.

Q What are the parameters that have to be coded on a DD statement in order to retrieve a cataloged data set ?
A The minimum parameters needed are DSN and DISP.

Q How does the system get information about the block size ?
A DCB info comes from :- 1) Program - FD: BLOCK CONTAINS 3 RECORDS RECORD CONTAINS 100 CHARACTERS2) The label - like a tape3) From the VTOC - for Dasd4) From the JCL - DCB=BLKSIZE=nnn.

Q What is a Label ?
A LABEL is a keyword parameter which can be specified on DD statement and consists of the following subparameters:LABEL=(Relative File #, Type of Label Processing)The LABEL parameter tells the type of label, the relative file number,and whether the data set is to be protected for input or output.

Q When should be NL be specified as a type of label processing ?
A NL should be specified when a program needs to process unlabeled tapes NL can also be specified when the pgm wants to create unlabeled tape because the system's default action, in cases when parameter is not specified, will create IBM standard label. Nonlabeled tapes are often used for sending tapes to another installation. That way you don't have to worry about the tape label corresponding to the standards at the other installation or about accidentally matching the volume serial number of an existing tape at the installation.

Q How do you describe the input data which is a part of the input job stream ?
A You should use either DD * or DD Data.

Q What is the difference between * and Data ?
A DD * and DD DATA describe the input data which follows the above mention cards. If the input data contains record switch // in col 1 and 2 then DD Data should be used.

Q What is the purpose of SPACE parameter ?
A It is a keyword parameter which should allocated on the DD statement for the output data sets stored on the disk.It consists of the following subparameters:SPACE=(BLKS/CYL/TRK,(primary,secondary,index),RLSE,CONTIG)

Q What is a RLSE ?
A RLSE releases all unused space when the data set is closed. It permits you to allocate more space than perhaps, it needed without wasting space. Space is released only if the data set is not empty and if the data set is closed after being opened.

Q What is a CONTIG ?
A CONTIG requests the primary space be allocated only on contiguous tracks and cylinders, that is all tracks on a cylinder are contiguous, and if more than one cylinder is needed, the cylinders are also contiguous. Always code CONTIG if track overflow is used.

Q What is a PDS ?
A PDS is a library type of data set organization consisting of Directory and Members. The directory consists of blocks, and each block is 256 bytes in length and can hold up to 5 members. Each member of the PDS is a sequential data set.

Q What is a Temporary Data Set ?
A Temporary data sets are used for storage needed only for the duration of the job. If the DISP parameter doesn't delete the data set by the end of the job, the system will delete it. Deleting a tape data set dismounts the tape, whereas deleting a dataset on a direct-access volume release the storage. A data set is marked temporary by omitting the DSN parameter or by coding DSN=&&dsname. The system assign a unique name to the data set when the DSN parameter is omitted, and any subsequent steps using the dataset refer back to the DD statement.

Q What is COND parameter ?
A It is a keyword parameter which can be specified on the JOB or EXEC statements. COND consists of 3 subparameters:code(0 thru 4095),logical operator, and stepname of the step that is going to be compared.The purpose of the COND is to determine whether the step should be executed or bypassed. If condition specified in the COND parameter is true,the step is bypassed.

Q How do you specify a COND parameter for a job step so that the step will never be executed ?
A COND=(0,LE) or COND=(4095,GE).

Q What does COND=ONLY mean ?
A It means that this job step will be executed only if a previous step had abnormally terminated.

Q What does COND=EVEN mean ?
A It means that this jobs step will be executed even if a previous step abnormally terminated.

Q What is a NAME ?
A Name is a positional parameter which identifies the person or group responsible for a job.

Q What is a PRIORITY ?
A It is a keyword parameter which specifies a job initiation priority within its job class. When the job is initiated, the system will convert the job's priority into a dispatching priority so that job's task can complete with other tasks for use of main storage and CPU resources.

Q How does the system determine the priority of a job for execution ?
A First the system determines which job has the highest class. Each class has a job queue with jobs of different priorities. The system will select the job for execution that has the highest PRTY (0 thru 15) 15 is the highest priority.

Q What is a MSGCLASS parameter ?
A It is a keyword parameter which specifies the output class to which system messages for your job are to be routed. Output class is an alphabetic (A thru Z) or numeric (0 thru 9) character. The default for MSGCLASS parameter will be A. System messages and output data sets can be routed to the same output class. You can code the MSGCLASS parameter in the Job statement and the SYSOUT parameter on the DD statement.

Q What is MSGLEVEL parameter ?
A It is a keyword parameter which indicates what job output is to be written as a part of output listing. The following outputs can be requested: the Job statement;all input job control statements;allocation, disposition and allocation recovery messages(allocation/termination message)MSGLEVEL=(statements, messages)Statements:- 0 - only the job statement is to be written;- 1 - all input control statements, cataloged procedure statements and the internal representation of procedure statement parameters after symbolic parameters substitution are to be written;- 2 - only input job control statements are to be written;Messages:- 0 - No allocation/termination messages are to be printed unless the job terminates abnormally;- 1 - All allocation/termination messages are to be printed.

Q How can you check for syntax or JCL errors without actual execution of a job ?
A TYPRUN=SCAN should be specified on a job card

Q What is the difference between the COND parameter specified on the EXEC statement and the one specified on the JOB statement ?
A COND parameter specified on EXEC statement determines whether step should be bypassed or executed.COND parameter defined on the JOB statement will determine whether Job should be terminated at a certain point or continued. When COND parameter is defined on the JOB statement, the system evaluates condition specified in the COND parameter before beginning of any job step and compares the code specified in the COND parameter with the return code of all previous jobsteps. If that condition is true, the rest of the job steps are bypassed.



JCL Questions.

1. What are all the Jcl statements used in Jcl? & What are the jcl statements you have coded so far?
A: JOB, DD , EXEC, INCLUDE.

2. What is the difference between the Positional parameters & keyword parameters, give examples where they are used?
A: Positional Parameters ----
Keyword Parameters ---- To specify in the JCL. Positioned wise specified.
Used along with DD, JOB statement.


3. What are the operands coded in a JOB statement?
A: Access, Room, Time , Msglevel, Msgclass, Notify, Typrun

4. How many characters can be coded for a jobname? What were you coding as a jobname?
A: Eight. Userid with two extra characters.

5. What is the difference between the Comment statement and the Comments? How they were coded in a jcl?
A:
They are coded in the JCL as “ //* Comments ”


6. How will you check the syntax of the JOB without executing it?
A: Typrun = Scan in the job card information will let us know the error in the JCL..

7. What are all the parameters needed in a DD statement to create a dataset thru Jcl? How a Partitioned dataset is created through JCL?
A: DD statement, Disp parameters , unit , volume , Space will be coded along with DD.
DD DSN= Dataset-name DISP= ( NEW, DELETE, KEEP )
DCB=( DSORG= PO, LRECL = 80 , BLKSIZE = 800 )

8. How is the Catalog procedure called from a JCL, if it is lying in your own datasets?
A: Through EXEC Proc-Name statement.


9. What is the difference between the Instream Procedure & Catalog Procedure?
A: Instream procedure is coded in the same JCL. Catalog procedure has to be called

10. What is the Symbolic parameter? What for it is needed? Where it is most commonly used?
A: Symbolic Parameter is used to pass the value to the Proc.

11. Can you explain the DISP Parameter in detail? What are the default DISP Parameters?
A: DISP = ( Status , normal_d , abnormal_d )
Status--- New , Old , Mod  To specify whether the dataset is existing or the new.
Normal Disposition --- Delete, Keep  Action to be taken when succesful
Abnormal Disposition --- Delete , keep  Action to be taken when not succesful
Default (New , delete, Delete ).
Default (Old, keep, keep)
Default (Mod, keep, keep)


12. What is the difference between the Referbacks & Overriding parameters? How are they coded in a JCL?
A:

13. How do you pass parameters to a program coded in an EXEC statement?
A: By specifying Parm =

14. In how many ways can you create a VSAM dataset? Thru JCL How will you create a VSAM dataset ? Can you write a JCL for this?
A: Using DD statement.


15. What is a GDG? How will you create a GDG? Can a GDG be used for Partitioned Datasets?
A: Generation Dataset Group , Chronological relation between physical datasets.
Define GDG( NAME )
Limit(nnnn)
Empty/Noempty
Scratch/ NoScratch



16. What are the parameters used in creating a GDG? Explain in detail? Can you alter
the parameters for the existing GDG? If yes, How?
A: Define GDG( NAME )
Limit(nnnn)  No. Of generations to be created
Empty/Noempty  When the limit reaches what action has to be taken.
Empty  Empties the datatset when the limit is reached.
NoEmpty  When the level is reached only the oldest generation will be
deleted.
Scratch/ NoScratch  When the dataset is deleted Scratch will delete the
Generation completely. NoScratch will uncatalog the dataset.
GDG parameters can be altered.

17. What for the Model dataset used for a GDG? How much space will you give to the Model Dataset?
A:

18. How many Maximum generations can be created for a GDG? How will you create a Generation dataset?
A: 255. Using DD statement
DD dsn= xxx.yyyyyy. zzzzzz. G000001.v000001(+1).

19. What is the E37 error? How will you resolve it with out losing a single byte of data? (Hint: This Error comes when you save the dataset after editing it)
A: Space Error.

20. What is SOC7 abend? How do you resolve it?
A: Data movement error . When an alpha numeric item is moved to numeric item field.

JCL

Describe the required JCL statements in a job.
JOB statement; EXEC statement; DD card

What are the functions of the JOB card ?
The JOB statement identifies characteristics about the job such as job name, accounting information, restart instructions, job class, holds a job for later execution and set time limits.

What are the functions of the EXEC statement ?
The EXEC statement identifies the beginning of each job step; states the program to be executed; the name of the job step; gives conditions for bypassing or executing a job step; sets cpu time limits and passes parameters to to the program

What are the functions of the DD statement ?
The DD statement assigns a DD name; identifies a dataset name; may specify the volume the dataset is stored on; the format of the records in the data set; whether a data set is old or new and the record length and block size of newly created data sets.

When would you use a catalogued PROC ?
A PROC is used when the same set of JCL statements are used repeatedly with little or no change.

Describe the three values of the DISP (disposition)parameter for an existing dataset.
SHR means the dataset is shared by multiple jobs.
OLD means only one job can access the dataset.
MOD means data written to the dataset is appended.

What does the second and third subparameter of the DISP parameter mean ?
The second would be what to do with the dataset after the step normally ends while
the third would be what to do with the dataset after the step abends.

If the DISP parameter is left out, what would be the default ?
The default DISP would be (NEW,CATLG,CATLG).

If the third subparameter of the DISP parameter is left out, what would be the default ?
It would default to the second subparameter.

How do you start a job at a specific job step rather then at the beginning ?
Indicate RESTART on the JOB statement and the name of the job step to begin execution.

What if the step you want to restart is inside a PROC ?
Code RESTART=Jobstepname.Procstepname, wherein the Jobstepname is found within the job and EXECs the procedure and the Procstepname is found within the PROC.

What are the 4 keywords used with DCB ?
DCB stands for data control block. The keywords associated with the DCB parameter are LRECL(record length), RECFM(record format), BLKSIZE(block size) and DSORG(sequential or partioned data set).

What is the purpose of the PARM keyword in the EXEC statement ?
The PARM keyword passes data to the executing program

What is the TIME keyword and where is it used?
Indicates the maximum CPU time allocated for a particular job or job step. If TIME is in the JOB card, it relates to the entire job; if in the EXEC statement, it relates to the job step.

Explain the SYSOUT parameter.
Specifies the output device you want your output written to.

How do you concatenate datasets ?
Specify more than one dataset on the same DD statement like so:
//ddname DD dsn=dataset1,disp=shr
// DD dsn=dataset2,disp=shr
// DD dsn=dataset3,disp=shr

Given the example shown below:
//ddname DD dsn=dataset1,disp=shr
// DD dummy
// DD dsn=dataset3,disp=shr
What happens here ?
dataset3 is skipped as a result of coding the DUMMY parameter in the middle.

How do you assign default and specific values to a symbolic parameter ?
Default values are specified by assigning values in the procedure on the PROC statement. Specific values are assigned on the EXEC statement of the calling procedure.

When should you use a symbolic parameter ?
When a parameter in a procedure varies each time the procedure is called.

If you want to include run instructions/documentation in your job, what do you do ?
Enter the instructions as comments by preferencing them with //*

What does RLSE mean on the following: SPACE=(TRK,(25,25),RLSE) ?
The system will release any unused tracks after allocating the requested space.

Explain what will happen to a dataset with this DISP parameter upon completion of the job: DISP=(NEW,CATLG,DELETE)?
If the job runs successfully, the dataset will be created and cataloged. If the job abends, the dataset will be deleted.

What are the DD names of the DD statements used to specify where the load modules are stored for a job step ?
//STEPLIB DD DSN=... right after the EXEC PGM= card
For the entire job ?
//JOBLIB DD DSN=... right after the JOB card
If both are coded, which one takes effect ?
The load module found in the load library coded on the STEPLIB statement.

How do you suppress reading or writing a dataset without making program changes ?
By coding the DUMMY parameter on the DD statement of the dataset.

What utility do you use to copy a sequential dataset?
IEBGENER or IDCAMS with the REPRO option. "SORT" will also do the job with the exception of a sorted output dataset.

What utility do you use to delete or catalog a dataset ?
IEFBR14
Please elaborate.
IEFBR14 does nothing so the subparameter values of the DISP parameter on the DD statement are used to delete or catalog the dataset.

Describe a GDG generation data group.
A group of datasets with the same base name that have chronological occurrences called generations. Each generation is referenced by it's base dataset name followed by the generation number. Example: SYS3.MASTER.G0101V00 and SYS3.MASTER.G0102V00 where SYS3.MASTER is the base name followed by a chronological generation number.

What is the difference between an absolute and a relative generation ?
GDG datasets can be referred to by using its absolute or relative generation number.
Absolute generation or G0000V00 number (by its naming format) would give you the complete GDG dataset name.
Relative generation is exactly what it says (0-current,-1-previous,+1-next one to be created). After a job completes or abends, the absolute generation numbers would be resolved.

How can you prevent repeatedly changing the generation numbers in a job that executes daily? It reads the current and previous generations and creates a new generation of SYS3.MASTER ?
By referencing them using their relative generation numbers:
Name the current generation: SYS3.MASTER(0)
Name the previous generation: SYS3.MASTER(-1)
Name the newly created generation: SYS3.MASTER(+1)

If a job abends and a (+1) generation that was created previously will be used in the next subsequent step(s), what do you do before you restart ?
Change your JCL to refer to this as a (0) generation because it is now the current generation.
This is assuming that the (+1) generation created was the most current and there was no (+2) created etc.

If you defined a GDG with a limit of 90, what happens when the 91st generation is created ?
Generation one rolls off and is automatically deleted.

Identify the 2 uses of the TYPRUN parameter on the JOB statement ?
TYPRUN=HOLD will submit the job in the queue but suspend it's execution until it is released.
TYPRUN=SCAN allows the JCL in the job to be checked for syntax errors without executing the job.

What is a procedure ?
A JCL stream called by the executing job by specifying it's name on the EXEC statement.

What is the difference between a catalogued and an instream procedure ?
A catalogued PROC name would be in the EXEC statement, but the actual procedure resides in a different dataset library. This gives added flexibility as far as being able to make changes to just the PROC without touching the job since this PROC can be used in more than one job.
An instream PROC would be found inside the job itself preceded by the word, PROC, and ends with the word, PEND (the EXEC statement should be after the PEND).

How do you specify where catalogued procedures reside ?
By using the PROCLIB statement which specifies what libraries to search before executing the PROC (the new way of doing this is by using the JCLLIB ORDER=(lib1,lib2,...) statement).

Can you have instream data inside a catalogued procedure ? How do you resolve this ?
No. You can read instream data by doing an override to the DDname inside the PROC. This override would be coded inside the job itself after the EXEC PROCname statement:
//DDname DD * followed by instream data in subsequent lines.

What utility would you use to print a sequential dataset ?
IEBGENER with the output directed to SYSOUT=*. This assumes that the MSGCLASS parameter on the JOB statement is pointing to a proper output class.

What is a S322 abend ?
The executing job has run out of time.

What is the difference between a S222 and S322 abend code ?
A S222 abend code means the job was cancelled by the operator. A S322 means that the job needs more time to run.

How do you fix a SB37 abend ?
Increase the primary and/or secondary space specified on the SPACE parameter of the DD statement for the dataset specified in the error message.

What is a S013 abend code ?
DCB conflict; often LRECL specified does not match the record length of the file in the COBOL program

What is a S806 abend code ? How do you resolve this ?
Program module specified in the EXEC PGM= statement could not be found. First, check if a STEPLIB is coded and all concatenated libraries for this program. Second, check the JOBLIB statement and all concatenated libraries for this program. Last, check the system linklist if the program is there.

How do you resolve a S80A or S804 abend ?
Increase the REGION specified on the JOB and/or EXEC statement(s).

What is a S913 abend code ? How do you resolve this ?
You lack the authority to read or update the dataset. Talk to the security administrator so your ID has the necessary authority.

What is the difference between a system and a user abend ?
A system abend is issued by the operating system while a user abend is issued by an application program and starts with the letter, U, followed by a number. Usually an application program displays a message before issuing a user abend to help the on-call programmer diagnose the problem.

How do you change the return code ? How is this different from a user abend ?
In the COBOL program, move a 4-digit number to RETURN-CODE before issuing the GOBACK statement. This is different from a user abend because it does not abend, but issues a non-zero return code which can be used to affect subsequent steps.

What parameter do you use to execute the next job step even though the preceding job step was unsuccessful ?
COND=EVEN coded in subsequent steps.

What parameter do you use to execute the next job step only if the preceding job step was unsuccessful ?
COND=ONLY coded in subsequent steps.

What parameter do you use to execute a job step only if the preceding job step has zero return codes ?
COND=(0,NE) coded in subsequent steps.

What if the highest permissible condition code is 4, how do you code this ?
COND=(4,LE) coded in subsequent steps.

Q1:How many levels of nesting is allowed in PROCs?
Ans-1. 15

Q2:If the "DISP=" keyword is not coded for an existing dataset, what default values will be used for "DISP="?
Ans-2. If the "DISP=" keyword is not coded ,then the DEFAULT Values are : DISP=(NEW,DELETE,DELETE)

Q3:If the "DISP=" keyword is not coded for a new dataset, what default values will be used for "DISP="?
Ans-3. If the "DISP=" keyword is not coded ,then the DEFAULT Values are : DISP=(NEW,DELETE,DELETE)

Q4:What does COND=ONLY mean?
Ans-4. - It means that job step will be executed only if previous steps abnormally terminate

Q5:What does COND=EVEN mean
Ans-5. It means that job step will be executed even if one of the previous steps abnormally terminates



JCL QUESTIONS


1. Question: HOW MANY POSITONAL PARAMETERS ARE THERE IN JOBSTATEMENT?
Answer: THER ARE TWO POSITION PARAMETERS IN JOB STATEMENT.

2. Question: What are three parameters you can specify on Job statement as well as on exec stmt ?
Answer: Time , Region and Cond parameters

3. Question: How can you trap abends in the JCL?
Answer: Use IF ABEND statement in the JCL.

4. Question: How do you restart a step in JCL?
Answer: Use RESTART=step name.

5. Question: how do you pass parameters to the program as the job is being executed ?
Answer: by using 'parm' parameter in exec statement. the value mentioned here should be declared in linkage section in the program and process thru procedure division. this technique is very useful when you do not know the parameters at the time of coding the programs.

6. Question: Why do you use a control card?
Answer: A control card can be a member of a pds or a sequential data set and is used for storing the date fields, Definitions of VSAM files....etc. You use control card because you cannot use a in-stream procedure in a procedure. Generally you will be calling a Proc from your JCL and you cannot code in-stream procedure in the Proc and so you will point to the data set which is called control card.

7. Question: How do you submit JCL via a COBOL program? For the above question the solution is as follows..
Answer: 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.

8. Question: How do you submit a JCL under CICS environment ?
Answer: pass all the JCL codes to a COBOL variable(should be declare using OCCURS class) and the write the line one by one to the spool using CICS commands like SPOOLClose SPOOLOpen SPOOLWrite . For more help refer CECI of CICS or CICS manual

9. Question: What is the parameter to be passed in the job card for the unlimited time , irrespective of the job class
Answer: TIME=1440



10. Question: Definition of COND p-r in JCL and a correction to a previously posted question
Answer: COND is a condition parameter, consists of 2 sub-parameters, 1st - return code from the previous step, 2nd - condition. If COND is true, the step on which COND is coded will be BYPASSED.

11. Question: Q) WHAT IS MEANT BY S07C AND S0C30 SYSTEM ABEND CODES
Answer: 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.S0C 30 - I have never heard of it, let you know if I come across it.

12. Question: How to pass the temp data set form one JOB step to another?
Answer: By specifying the DISP as PASS for the temp data set

13. Question: What is a COND parameter in JCL?
Answer: COND means condition parameter. It is compared with system return code of previous step.
//step1 exec pgm=abcd
//step2 exec pgm=xyz, cond=(4,lt)step2 will be executed when system return code of step1 is less than 4.

14. Question: WRITE A JCL TO EXECUTE A JOB BY 7 A.M ON JAN 20,1986 ?
Answer: THE code IS : //*MAIN DEADLINE=(0700,B,012086)

15. Question: HOW MANY TYPES OF LIBRARIES ARE THERE IN JCL ?
Answer: LIBRARIES ARE OF THREE TYPES.
1.SYTEM LIBRARIES: SUCH AS SYS1.LINKLIB
2.PRIVATE LIBRARIES: SPECIFIED IN A JOBLIB OR STEPLIB DD STATEMENTS.
3.TEMPORARY LIBRARIES:CREATED IN A PREVIOUS STEP OF THE JOB.

16. Question: WHAT U MEAN BY INCLUDE STATEMENT IN JCL ?
Answer: AN INCLUDE STATEMENT IDENTIFIES A MEMBER PF A PDS OR PDSE 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.

17. Question: THE MAXIMUM NUMBER OF IN-STREAM PROCEDURE YOU CAN CODE IN ANY JCL IS ?
Answer: 15.

18. Question: What you mean by skeleton JCL?
Answer: JCL which changes during run time i.e. the values for the JCL such as pg. name ,DD name will change .i.e. same JCL can be used for various job, equivalent to dynamic SQL...



19. Question: what is JCL
Answer: it is interface between operating system(mvs) & application program. when 2 related programs are combined together on control statements is called job control language


20. Question: What is the Max blocksize for a Tape file?
Answer: It is 32,760.Based on that we can calculate efficient number of Records in a Block



21. Question: What are the basic JCL Statements for a Job?
Answer: 1.JOB : Identifies a job and supplies accounting inf. 2.EXEC : Identifies a job step by indicating the name of the program to be executed. 3.DD : Identifies a data set to be allocated for the job step 4.Delimiter (/*): Marks the end of an in-stream data set 5.Null(//):Marks the end of a job 6.Comments(//*): Provides Comments 7.PROC : Marks the beginning of a procedure 8.PEND : Marks the end of a procedure 9.OUTPUT: Supplies options for SYSOUT processing.

22. Question: What does the statements: typrun=scan and typrun=hold do in a JCL statement
Answer: typrun=scan checks the JCL for errors, typrun=hold holds the job until further notice.

23. Question: What is QSAM error usually when it is occurs?
Answer: Usually it is occurs at the time of job submission.

24. Question: what is the purpose of include statement in a JCL?
Answer: It is used as an alternative for steplib. When we specify the data set name in include ,it will search in all the data sets specified in the include data set.

25. Question: IS IT POSSIBLE TO KNOW THE REMAINING FREE SPACE IN AN CONTROL INTERVAL/CONTROL AREA ONCE AN INSERTION HAS BEEN MADE.
Answer: NOT POSSIBLE

26. Question: what does soc04 error mean?
Answer: this error is faced when we execute the COBOL program, the main reason for this error is that a variable is defined with less characters and we are trying to move data which is larger than the actual storage space.

27. Question: In which table PLAN is registered in ?
Answer: RCT

28. Question: GDG?
Answer: GDG - group of data set that are logically or chronologically related, referred by name and a relative generation number - an integer which identifies the generation of a data set and is coded in parentheses after data set name. Absolute GDG name - GxxxxVyy, where xxxx-absolute gen.number, yy-version number. Can be sequential, direct, partitioned. (VSAM - no). Must always be cataloged. Advantage - all data sets 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

29. Question: what do you mean By spooling? Expand SPOOL?
Answer: This is managed by JES. This is used for Queuing the Outputs that are intended for Printing and are first stored in SPOOLDASD. This can be managed Using

30. Question: How many Instream-Procedures(procs) can be Coded in a single Job?
Answer: The Answer is: 15

31. Question: FOR HOW LONG A JOB CAN BE EXECUTED CONTINUEOUSLY IN A MAINFRAME
Answer: 248 DAYS

32. Question: MAX. NO OF DD STATEMENTS IN A JOB
Answer: 3273

33. Question: HOW MUCH SPACE OS ALLOCATES WHEN YOU CREATE A PS OR PDS?
Answer: 56 KB

34. Question: MIN NO OF DATASET NAMES(PDS) IN ONE DIRECTORY BLOCK?
Answer: SIX

35. Question: THE MAXIMUM NUMBER OF STEPS IN A JOB?
Answer: 255

36. Question: How much is memory space involved, when we code BLOCKSIZE,TRK & CYL
Answer: One block constitutes 32KB of formatted memory/ 42KB of Unformatted memory,6 blocks makes one Track & 15 Tracks makes one cylinder.

37. Question: What is a Dummy Utility and what it does ?
Answer: IEFBR14 is a Dummy utility and it is used for the sake of EXEC PGM= .... statement in JCL[when used it wouldn't perform any task]. e.g. While Allocating a data set you don't have to run any utility [this could be done by giving disp=new in DD statement]. But for a PGM name must be given in EXEC statement, it is used.

38. Question: What 3 guidelines do we have to follow when concatenating DD statements?
Answer: 1. Data sets must be of the same type (disk or tape)
2. All data sets must have the same logical record length
3 The data set with the largest blocksize must be listed first.



39. Question: On the DD statement, what is the main difference between creating a new sequential flat file and a partitioned data set?
Answer: SPACE=(n,m) for a sequential file, SPACE=(n,m,p) for a PDS where n, m, and p are numbers. The p designates how many directory blocks to allocate.



40. Question: What is the difference between IEBGENER, IEBCOPY and REPRO in IDCAMS utility?
Answer: IEBGENER -- This is a data set utility for copying sequential data sets which produces a PDS or a member from a sequential data set. IEBCOPY -- This is a data set utility for copying one PDS to another or to merge PDSs. REPRO -- This is for copying sequential data sets. More or less same as the IEBGENER.RAVI



41. Question: How do you submit JCL via a COBOL program?
Answer: Use a file //dd1 DD sysout=(*,intrdr)write your JCL to this file. Pl some on try this out.

42. Question: How to execute a set of JCL statements from a COBOL program
Answer: Using EXEC CICS SPOOL WRITE(VAR-name) END-EXEC command. var-name is a COBOL host structure containing JCL statements.

43. Question: What is the difference between static call & Dynamic call
Answer: In the case of Static call, the called program is a stand alone program, it is an executable program . During run time we can call it in our called program. As about Dynamic call , the called program is not an executable program it can executed thru the called program

44. Question: What is the difference between catalog procedure and In-Stream procedure?
Answer: In Stream procedures are set of JCL statements written between JOB and EXEC statements, start with PROC and end with PEND statement. Mainly used to test catalog procedures. Cataloged procedure is cataloged on the procedure library and is called by specifying the procedure name on the EXEC statement.

45. Question: How many parameters are there to a DISP statement and what are their uses.
Answer: There are three(3) parameters. Parameter 1: current data set disposition(new, shr, old, mod) Parameter 2: normal close action for data set (catlg, keep, delete) Parameter 3:abend action for data set (catlg, keep, delete).

46. Question: What is the error code SOC01 indicate ?
Answer: Operation exception error For eg a data set open error

47. Question: What is a procedure?
Answer: A set of pre-coded JCL that can be modified through the use of parameters or override cards. Note: Procedures can be catalogued or in-stream.

48. Question: What does SYSIN * indicate?
Answer: In-stream data follows this card and is terminated when followed by a card containing // or /* in columns 1 and 2.


49. Question: What are three major types of JCL statements? What are their functions?
Answer: JOB, EXEC, DD. JOB - indicates start of job-stream to the operating system and through parms coded on it, certain details about the job (time, region, message level, job accounting data). EXEC - indicates the start of execution of a particular job step, be that step a program or a proc. DD - is a data definition, which is used to describe the attributes of a data set (name, unit, type, space, disposition).

50. Question: What is the difference between specifying DISP=OLD and DISP=SHR for a data set?
Answer: OLD specifies exclusive use of a data set, SHR allows multiple jobs to concurrently access the data set Note: When updating a data set, you would normally use OLD.


 If JCL using RACF file, we need to give user id and password in JOB statement.

//JOB1 JOB (M060, CCCC),'XXXXXXXXXXX',
// MSGCLASS=E, REGION=3000K, NOTIFY=&SYSUID,
// USER=XX1111, PASSWORD=XXXXXXXXX
// JCLLIB ORDER=XXXX.OFFSHORE.JCL.FEB06
//STEP1 EXEC PRC
//STEP2.DDNAME DD DSN=XX1111.INSERTS.XXXXXXXX.FEB5
// DISP=SHR

21 comments:

  1. Fantastic information, need more expantion for jcl dummies.

    ReplyDelete
  2. Fantastic information, need more expantion for jcl dummies.

    ReplyDelete
  3. Those cladding medical emergencies and one that haunts every indorse physique in the destitute or no payments, are too losing high pecuniary resource that are provided easy without any hassles.

    Bad cite valuation humanities and how a lot
    you take), but recreation can growth well and you can easily talk over it.
    online loans Those protective covering
    Greco-Roman deity emergencies and one that haunts all merchandise
    build in the destitute or no payments, are likewise losing high finances that are provided easy without
    any hassles. Bad mention win past times and how often you
    accept), but raise can modify well and you can easily go through
    it.
    my site: online loans

    ReplyDelete
  4. Every weekend i used to pay a visit this website, for the
    reason that i wish for enjoyment, for the reason that this this web site
    conations really fastidious funny stuff too.

    Also visit my page :: http://eyfa.org/wiki/haarausfall_shampoo
    My page: Haarausfall

    ReplyDelete
  5. Wonderful goods from you, man. I have understand your
    stuff previous to and you are just extremely great.
    I really like what you've acquired here, really like what you are saying and the way in which you say it. You make it entertaining and you still care for to keep it wise. I cant wait to read much more from you. This is really a terrific web site.

    Look at my web page ... calories burnt walking

    ReplyDelete
  6. We're a group of volunteers and opening a new scheme in our community. Your website provided us with helpful information to work on. You've done an impressive activity and our
    whole community will likely be thankful to you.


    Here is my web blog exercises for vertical leap

    ReplyDelete
  7. Thanks for sharing your thoughts on hogtied. Regards

    Also visit my web site - criminal justice master degree

    ReplyDelete
  8. Superb, what a web site it is! This website presents helpful
    information to us, keep it up.

    Also visit my website ... Workouts To Improve Vertical Jump

    ReplyDelete
  9. Please let me know if you're looking for a article author for your site. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I'd
    love to write some articles for your blog in exchange for a link back to
    mine. Please send me an e-mail if interested.

    Kudos!

    Check out my weblog; workouts to Jump higher

    ReplyDelete
  10. Wonderful beat ! I would like to apprentice while you amend your website, how can i subscribe for
    a blog web site? The account helped me a acceptable deal.
    I had been a little bit acquainted of this your broadcast provided bright clear concept

    Feel free to surf to my blog: exercises to improve vertical leap

    ReplyDelete
  11. I feel that is one of the so much vital info for me. And i'm glad studying your article. However want to remark on some normal issues, The site style is wonderful, the articles is in point of fact nice : D. Just right activity, cheers

    Check out my site; workouts to increase vertical leap

    ReplyDelete
  12. This is my first time pay a quick visit at here and i am in fact
    impressed to read everthing at alone place.

    my site exercises for vertical jump

    ReplyDelete
  13. WOW just what I was searching for. Came here by searching for
    Chapter

    My web blog - bmi charts

    ReplyDelete
  14. This paragraph will assist the internet viewers for setting up new webpage
    or even a weblog from start to end.

    Here is my homepage :: bmi charts

    ReplyDelete
  15. I think the admin of this web page is actually working
    hard in support of his site, as here every information is quality based material.


    my web blog exercises to increase vertical jump

    ReplyDelete
  16. Pretty nice post. I just stumbled upon your blog and wished to say that I've really enjoyed surfing around your blog posts. After all I'll be subscribing to your rss feed and I hope you
    write again soon!

    Here is my homepage http://9jaconnected.com

    ReplyDelete
  17. Great post.

    Also visit my web blog: activity calorie calculator

    ReplyDelete
  18. Saved as a favorite, I love your website!

    Feel free to visit my web-site :: walking calorie calculator

    ReplyDelete
  19. check out the mainframe blog
    http://mframes.blogspot.in

    ReplyDelete
  20. Hi this is Kathiresan i am having 3 years of experience as a dot net developer and i am certified. i have knowledge on OOPS concepts in .NET but dont know indepth. After learning android will be enough to get a good career in IT with good package? and i crossed Android Training in Chennai website where someone please help me to identity the syllabus covers everything or not??

    Thanks,
    kathiresan

    ReplyDelete
  21. Hi this is Kathiresan i am having 3 years of experience as a dot net developer and i am certified. i have knowledge on OOPS concepts in .NET but dont know indepth. After learning android will be enough to get a good career in IT with good package? and i crossed Android Training in Chennai website where someone please help me to identity the syllabus covers everything or not??

    Thanks,
    kathiresan

    ReplyDelete