Monday, February 7, 2011

JCL FAQs/Interview questions (part-2)


1. What is primary allocation for a Data Set?
    The space allocated when the Data Set is first created

2. What is the difference between primary and secondary allocations for a Data Set?
 Secondary allocation is done when more space is required than what has already been allocated

3. How many extents are possible for a Sequential File? For a VSAM File ?
  16 extents on a volume for a Sequential File and 123 for a VSAM File

4. What does a disposition of (NEW, CATLG, DELETE) mean? -
That this is a new Data Set and needs to be allocated, to CATLG the Data Set if the step is successful and to delete the Data Set if the step abends.

5. What does a disposition of (NEW, CATLG, KEEP) mean? -
That this is a new Data Set and needs to be allocated, to CATLG the Data Set if the step is successful and to KEEP but not CATLG the Data Set if the step abends Thus if the step abends, the Data Set would not be catalogued and we would need to supply the Vol ser the next time we refer to it

6.  How do you access a File that had a disposition of KEEP? -
     Need to supply volume serial no VOL=SER=xxxx MOD, DELETE

7.  What does a disposition of (, DELETE) mean?
The MOD will cause the Data Set to be created (if it does not exist), and then the two DELETE will cause the Data Set to be deleted whether the step abends or not this disposition is used to clear out a Data Set at the beginning of a job

8.  What is the DD statement for an output File?
Unless allocated earlier, will have the following parameters:
      DISP=(NEW, CATLG, DELETE), UNIT, SPACE & DCB

9.  What do you do if you do not want to keep all the space allocated to a Data Set?
      Specify the parameter RLSE (release) in the SPACE.
      E.g.:     SPACE=(CYL, (50,50), RLSE)

10. What is DISP=(NEW, PASS, DELETE)?
This is a new File and create it, if the step terminates normally, pass it to the subsequent steps and if step abends, delete it This Data Set will not exist beyond the JCL

11. How do you create a temporary Data Set?  Where will you use them?
Temporary Data Sets can be created either by not specifying any DSNAME or by specifying the temporary File indicator as in DSN=&&TEMP

We use them to carry the output of one step to another step in the same job The Data Set will not be retained once the job completes

12. How do you restart a proc from a particular step?
In job card, specify RESTART=proc step step name where procstep = name of the JCL step that invoked the proc and step name = name of the proc step where you want execution to start

13. How do you skip a particular step in a proc/JOB?
      Can use either condition codes or use the jcl control statement IF (only in ESA JCL)

14. A PROC has five steps Step 3 has a condition code how can you override/nullify this condition code?
Provide the override on the EXEC stmt in the JCL as follows:
//STEP001 EXEC procname, CONDstepname=value
All parameters on an EXEC stmt in the proc such as COND, PARM have to be overridden like this

15. How do you override a specific DDNAME/SYSIN in PROC from a JCL?
      //<Stepnamedd> DSN=

16. What is NOTCAT 2?
This is an MVS message indicating that a duplicate catalog entry exists E.g., if you already have a Data Set with dsn = 'xxxxyyyy' and u try to create one with disp new, catlg, you would get this error the program open and write would go through and at the end of the step the system would try to put it in the system catalog at this point since an entry already exists the catlg would fail and give this message you can fix the problem by deleting/uncataloging the first data set and going to the volume where the new Data Set exists(this info is in the msglog of the job) and cataloging it

17. What is 'S0C7' ABEND?
Caused by invalid data in a numeric field

18.  What is a S0C4 error?
Storage violation error - can be due to various reasons e.g.: READING a File that is not open, invalid address referenced due to subscript error

19. What are SD37, SB37, and SE37 abends?
All indicate Data Set out of space. SD37 - no secondary allocation was specified. SB37 - end of vol and no further volumes specified. SE37 - Max of 16 extents already allocated

20. What is S322 ABEND?
Indicates a time out ABEND Your program has taken more CPU time than the default limit for the job class could indicate an infinite loop

21. Why do you want to specify the REGION parameter in a JCL step?
To override the REGION defined at the JOB card level
REGION specifies the max region size REGION=0K or 0M or omitting REGION means no limit will be applied

22. What does the TIME parameter signify? What does TIME=1440 mean?
TIME parameter can be used to overcome S322 abends for programs that genuinely need more CPU time TIME=1440 means no CPU time limit is to be applied to this step

23. What is COND=EVEN?
      Means execute this step even if any of the previous steps, terminated abnormally

24. What is COND=ONLY?
      Means execute this step only if any of the previous steps, terminated abnormally

25. How do you check the syntax of a JCL without running it?
TYPERUN=SCAN on the JOB card or use JSCAN

26. What does IEBGENER do?
Used to copy one SAM File to another Source Data Set should be described using SYSUT1 ddname Destination Data Set should be described using SYSUT2 IEBGENR can also do some reformatting of data by supplying control cards via SYSIN

27. How do you send the output of a COBOL program to a member of a PDS?
Code the DSN as pds (member) with a DISP of SHR The DISP applies to the pds and not to a specific member

28. I have multiple jobs (JCLs with several JOB cards) in a member what
      Happens if I submit it?
      Multiple jobs are submitted (as many jobs as the number of JOB cards)

29. I have a COBOL program that ACCEPT some input data how do you code the JCL statement for this? (How do you code in stream data in a JCL?)
      //SYSIN DD*
         Input data
         Input data
       /*

30. Can you code instream data in a PROC ?
      No

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 ()
RUN PROGRAM (MYPROG)
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 SYS1LINKLIB the system libraries are specified in the link list

35.  What happens if both JOBLIB & STEPLIB is specified?
       JOBLIB is ignored
36. When you specify multiple Data Sets 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?
      //ABCD JCLLIB ORDER=(MEMYPROCLIB, SYS1PROCLIB)

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 - SAM, PO - Partitioned, IS - ISAM

40. What are the differences between JES2 & JES3?
JES3 allocates Data Sets for all the steps before the job is scheduled. In JES2, allocation of Data Sets required by a step is done only just before the step executes.
JOB /EXEC/DD ALL PARAMETERS
JOBLIB/STEPLIB
PROCEDURES, PARAMETERS PASSING
CONDITION VARIABLES
ABEND CODES.
41. What are the kinds of job control statements?
      The JOB, EXEC and DD statement

42. What is the meaning of keyword in JCL? What is its opposite?
      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) meaning are based on first, second and third position.

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

44. Describe the EXEC statement, its meaning, syntax and keywords.
      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.
 45. Describe the DD statement, its meaning, syntax and keywords.
      The DD statement links the external Data Set 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=Data Set name other keywords after DSN are DISP, DCB, SPACE, etc.

46. What is a PROC? What is the difference between an instream and a
      Catalogued PROC?
      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 Data Set.

47. What is the difference between a symbolic and an override in executing a
       PROC?
       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

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

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

49. Explain concatenating Data Sets
      Data Sets 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 Data Sets.

49. What is the difference between specifying DISP=OLD and DISP=SHR for a Data
       Set?
       A DISP=OLD denotes exclusive control of the Data Set; DISP=SHR means there is  
       no exclusivity.

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

51. 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?
      The keywords associated with the DCB parameter are LRECL, RECFM,
      BLKSIZE and DSORG The DCB information can be supplied in the DD statement
      The system looks for DCB information in the program code first

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

53. What is the meaning of the EXEC statement keyword, COND? What is its
      Syntax?
      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 - memorizes it and don't ask questions!).

54. What is the improvement to COND= in the latest version of MVS?
      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.

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

56. What is the purpose and meaning of the REGION keyword and what JCL
      statement is it associated with?
     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.

57. What is the purpose and meaning of the TIME keyword and what JCL
      statement is it associated with?
     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.

58. What is the meaning of data definition name (DD name) and Data Set name
      (DSN name) in the DD statement?
     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 Data Set name is the operating system (MVS) name for the File

59. How is the keyword DUMMY used in JCL?
      For an output File DUMMY specifies that the output is to be discarded for input it
     specifies that the File is empty.

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

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

62. What are all the JCL statements used in JCL? & What are the JCL statements you have coded so far?
     //JOB marks the beginning of a job, contains job information
     //EXEC marks the beginning of a job step, identifies program, cataloged procedure to
       be executed
     //DD (data definition), identifies a data set and its attributes
     //OUTPUT (specifies processing options for system output(sysout) data sets)
     //(null) (end of job)
     /* (end of data placed in input stream)
     //PROC (procedure)
     //PEND (procedure end)
     //* (comment)

63. What is the difference between the positional parameters & keyword parameters, give examples where they are used?
     Positional Parameters are:-
     a). Sequence predetermined
     b) Parameters separated by commas
     c) Omitted parameters must be indicated by two consecutive commas.
     d) Installation dependent

      EX:
      //JOBNAME JOB (DIS, TRG.TRGGLO.NL.BATCH), ‘PGM1)
      //SETP01 EXEC PGM=MYPROG


      Keyword parameters are Predetermined words are referred to as key word
      Parameters. Any sequence is permitted, separated by commas.
      Follow positional parameters.
      Format is <Keyword parameter> = <value>
      EX:
      //JOBNAME JOB (DIS, TRG, N1, BATCH), MSGLEVEL=(1,1),
      // MSGCLASS=X, NOTIFY=QZ6P03T, TYPRUN=SCAN

64. What are the operands coded in a JOB statement?
      All the Positional and Key word parameters in the JOB statement.
      Accounting Information, MSGCLASS, CLASS, MSGLEVEL, NOTIFY, USERID,
      PASSWD, COND, REGION, RESTART.

65. How many characters can be coded for a job name? What were you coding as a job name?
     8 Characters, Usually JOBNAME will be like User-id + 1 Char

66. What is the difference between the Comment statement and the Comments? How they were coded in a JCL?
      //* is the comment statement and it starts from column number 1
     Anything that is written after 71st column is taken as a comment.

67. How will you check the syntax of the JOB without executing it?
Can use JSCAN.Code TYPRUN=SCAN and submit the JCL for syntactical errors.

68. What are all the parameters needed in a DD statement to create a data set thru JCL? How a Partitioned data set is created thru JCL?
a. DISP (Disposition): The DISP parameter describes the status of a data set to the system, what is to be done with the data set at the end of the job step, and what to do with the data set if the step terminates abnormally
b. DCB (Data control black) :
DCB=(LRECL=NN, BLKZIZE=YY, RECFM=Z, DSORG=MM)
Z can be F, FB, V, VB
MM Can be PS (physical sequence) PO (partitioned)
c. DSN (Data set name):
d. UNIT: Identifies device of data set
e. Space:

69. How is the Catalog procedure called from a JCL, if it is lying in your own data sets?
     STEP1 EXEC PROC=PROC1
     The library in which PROC1 is present should be mentioned in PROCLIB.

70. What is the difference between the In-stream Procedure & Catalog Procedure?
     In-stream Procedures begin with a PROC stmt and must be terminated by a PEND    
     Stmt. (PEND can also be coded for a cataloged Procedure, but it isn’t required) The
     PENC stmt coded as:
     //Option-name PEND   comments
    The In-stream Procedure is placed following the JOB statement of the JOB. Up to 15
     In-stream Procedures can be included in a single job. Each In-stream Procedure may
     be invoked several times with in the job.

     //QZ5P13TD JOB (18636), ‘HARISH’, CLASS=A
     //RUN PROC In-stream procedure starts from here
     //GO EXEC PGM=ONE
     //SYSOUT DD SYSOUT=A
     //PEND

     //STEP1 EXEC RUN procedure is used like
     ..

     A set of JCL stmt’s consisting of a PROC stmt and one or more EXEC and DD stmt  
     (steps), which is placed in a procedure library. It executed by an EXEC (procedure)
     stmt in another data set (called the execution JCL).
     Advantages : Saves time,  prevents errors.

71. What is the Symbolic parameter? What for it is needed? Where it is most commonly used?
     Any parameter that can vary with each execution is a good candidate for definition of
     a symbolic parameter. Use of symbolic parameter make the procedure more flexible.
     This prevents the procedure to be modified each and every time a small and
      recurring change is needed at a place.
      //DD1   DD  DSNAME=&SYSUID..PROFILE,DISP=(NEW,KEEP),

72. Can you explain the DISP Parameter in detail? What are the default DISP Parameters?
     a. Current Status
         NEW – Default
         OLD – exclusive
         SHR – Simultaneously
           MOD –
       b. Normal Disposition
           KEEP – Default if DISP = SHR, OLD, MOD
           DELETE – Default if DISP = NEW
           CATLG
       c. Abnormal Termination – same as Normal Disposition

73. What is the difference between the Refer-back & Overriding parameters? How
      are they coded in a JCL?
      Refer back option is a reference to an earlier DD statement in the job or in cataloged
      or in in-stream procedure called by a job step.
      KEYWORD = reference.
//JOB1 JOB ..
//STEPA EXEC ..
//DD1 DD DSN=REPORT
...
// DD4 DD DSN=*.DD1

//JOB2 JOB  ..
//SETP1 EXEC ..
//DDA DD DSN=D578.POL.PUBS01
..
//STEP2 EXEC ..
//DDB DD DSN=*.STEP1.DDA

     Over riding parameters.

      In an In-stream or Cataloged procedures, the DD names mentioned in the JCL will    
      override the ones in the procedures.
//JOB1   JOB ..
//STEPA   EXEC  PROC1
//PS1.DD1 DD  DSN=SAMPLE.PUB,DISP=SHR
//PS2.DD2 DD  DSN=SAMPLE.PUB1,DISP=SHR

Proc PROC1 contains...

//PS1 EXEC   PGM=ABC
//*
//DD1     DD  DSN=DUMMY
//SYSOUT      DD   SYSOUT=*
//
//PS2 EXEC PGM=DEF
//*
//DD1 DD DSN=SAMP.PROG.DATA,DISP=SHR
//DD2 DD DSN=SAMP.PROG.DATA1,DISP=SHR
// SYSOUT      DD   SYSOUT=*

74. How do you pass parameters to a program coded in an EXEC statement?
      Through PARM Clause coded on the EXEC statement. The parameters have to be
      defined in the Linkage Section of COBOL program.

75. What is a GDG? How will you create a GDG? Can a GDG be used for Partitioned Data sets ?
      A GDG is Generation Data Group. GDG’S allow users to create multiple data sets
      with the same base name distinguished by a logical number. History files can be
      referenced by using a negative generation number.

      GDG base can be created using a utility (IEBPROGM or IDCAMS)
      With (+1) we will be creating.
      EX:  //OUTDD DD DSN=QZ6P03T.ARUN.MASTER(+1) (Create new data set)
            //INDD  DD DSN=QZ6P03T.ARUN.MASTER(+0) (Reference most current data  
      set).
      Yes - GDG can be sequential, direct, or partitioned Organization and can be reside
      on  tape or direct-access volumes
      GDG must always be cataloged

76. What are the parameters used in creating a GDG? Explain in detail? Can you
      alter  the parameters for the existing GDG? If yes, How?
      Creating a Model Data Set Label (or control block, DSCB) This label is a data set
      which contains DCB attributes and is usually referred to in the DCB parameter when
      creating new GDG data sets. Most shops create the model DSCB with no DCB
      attributes.

77. What for the Model data set used for a GDG? How much space will you give to the Model Data set ?
     The system needs an existing data set to serve as a model supplying the DCB
     parameters for the GDG to you want to create. The system uses the data set label to  
     obtain the DCB sub-parameters, and the model is called the DSCB for reasons lost to
     history.
     Need not specify any space while creating a model data set.

78. How many Maximum generations can be created for a GDG? How will you
       create a Generation data set ?
      The maximum number of GDG versions that can be created is 255.
      A GDG data set is created with “(+1)” appended to the name of the GDG base.

79. 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 data set after editing it)
      Insufficient Space.

80. What is SOC7 abend ? How do you resolve it?
      Data Exception. Eliminate the bad data by debugging the program.

Saturday, January 29, 2011

JCL FAQs/Interview questions (part-1)

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





IDMS Errorstatus or Errorcodes

IDMS error status codes are 4 characters. The first two are called major, the second two
are called minor.

MAJOR CODES

Code  Database Function

00    Any DML statement
01    FINISH
02    ERASE
03    FIND/OBTAIN
05    GET
06    KEEP
07    CONNECT
08    MODIFY
09    READY
11    DISCONNECT
12    STORE
14    BIND
15    ACCEPT
16    IF
17    RETURN
18    COMMIT
19    ROLLBACK
20    LRF Request

MINOR CODES

Code  Database Function Status

00    Combined with a major code of 00, this code indicates successful completion
      of the DML operation. Combined with a non-zero major code, this code
      indicates that the DML operation was not completed successfully, due to central
      version causes, such as time-outs and program checks.

01    An area has not been readied. When this code is combined with a major code
      of 16, an IF operation has resulted in a valid false condition.

02    Either the db-key used with a FIND/OBTAIN DB-KEY statement or the direct
      db-key suggested for a STORE is not within the page range for the specified
      record name.

04    The occurrence count of a variably occurring element has been specified as
      either less than zero or greater than the maximum number of occurrences
      defined in the control element.

05    The specified DML function would have violated a duplicates-not-allowed
      option for a CALC, sorted or index set.

06    No currency has been established for the named record, set or area.

07    Either the end of a set, area, or index has been reached or the set is empty.

08    Either the specified record, set, procedure, or LR verb is not in the
      subschema or the specified record is not a member of the set.

09    The area has been readied with an incorrect usage mode.

10    An existing access restriction or subschema usage prohibits execution of
      the specified DML specification. For the LRF users, the subschema in use
      allows access to database records only. For SPF users, this code may also
      indicate improper use of the ERASE statement. Commbined with a major code
      of 00, this code means the program has attempted to access a database
      record, but the subschema in use allows access to logical records only.

11    The record cannot be stored in the specified area due to insufficient space.

12    There is no db-key for the record to be stored. This is a system internal
      error and should be reported.

13    A current record of run unit has not been established or has been
      nullified by a previous ERASE statement.

14    The CONNECT statement cannot be executed because the requested record
      has been defined as a mandatory automatic member of the set.

15    The DISCONNECT statement cannot be executed because the requested record
      has been defined as a mandatory automatic member of the set.

16    The record cannot be connected to a set of which it is already a member.

18    The record has not been bound.

20    The current record is not the same type as the specified record name.

21    Not all areas being used have been readied in the correct usage mode.

22    The record name specified is not currently a member of the set name
      specified.

23    The area name specified is either not in the subschema or not an extent
      area; or the record name specified has not been defined within the area
      name specified.

25    No currency has been established for the named set.

26    Either no duplicates exist for the named record or the record name or
      SPF index entry cannot be found.

28    The run unit has attempted to ready an area that has been readied
      previously.

29    The run unit has attempted to place a lock on a record that is locked
      already by another run unit. A deadlock results and the run unit is
      aborted.

30    An attempt has been made to erase the owner record of a non-empty set.

31    The retrieval statement format conflicts with the record's location
      mode.

32    An attempt to retrieve a CALC/DUPLICATE record was unsuccessful; the
      value of the CALC field in variable storage is not equal to the value
      of the CALC control element in the current record of run unit.

33    At least on set in which the record participates has not been included
      in the subschema.

40    The WHERE clause in an OBTAIN NEXT logical-record request is inconsistent
      with a previous OBTAIN FIRST or OBTAIN NEXT command for the same record.
      Previously specified criteria, such as reference to a key field, has
      been changed. A path status of LR-ERROR is returned to the LRC block.

41    The subschema contains no path that matches the WHERE clause in a
      logical-record request. A path status of LR-ERROR is returned to the
      LRC block.

42    An ON clause included in the path by the DBA specified return of the
      LR-ERROR path status to the LRC block; an error has occurred while
      processing the LRF request.

43    A program check has been recognized during evaluation of a WHERE clause;
      the program check indicates that either a WHERE clause has specified
      comparison of a packed decimal field to an unpacked non-numeric data
      field, or data in variable storage or a database record does not conform
      to its description. A path status of LR-ERROR is returned to the
      LRC block unless the DBA has included an ON clause to override this action
      in the path.

44    The WHERE clause in a logical-record request does not supply a key
      element (sort key, CALC key or db-key) expected by the path. A path
      status of LR-ERROR is returned to the LRC block.

45    During evaluation of a WHERE clause, a program check has been recognized
      because a subscript value is neither greater than zero nor less than
      its maximum allowed value plus one. A path status of LR-ERROR is returned
      to the LRC block unless the DBA has included an ON clause to override this
      action in the path.

46    A program check has revealed an arithmetic exception (for example:
      overflow, underflow, significance, divide) during evaluation of a
      WHERE clause. A path status of LR-ERROR is returned to the LRC block
      unless the DBA has included an ON clause to override this action
      in the path.

53    The subschema definition of an indexed set does not match the indexed
      set's physical structure in the database.

54    Either the prefix length of an SR51 record is less than zero or the
      data length is less than or equal to zero.

55    An invalid length has been defined for a variable length record.

56    An insufficient amount of memory to accomodate the IDMS/R compression/
      decompression routines is available.

60    A record occurrence type is inconsistent with the set named in the
      ERROR-SET field in the IDMS communication block. This code usually
      indicates a broken chain.

61    No record can be found for an internal db-key. This code usually
      indicates a broken chain.

62    A system-generated db-key points to a record occurrence, but no
      record with that db-key can be found. This code usually indicates
      a broken chain.

63    The DBMS cannot interpret the DML function to be performed. When
      combined with a major code of 00, this means invalid function
      parameters have been passed on the call to the DBMS. For LRF users,
      a WHERE clause includes a keyword that is longer than the 32
      characters allowed.

64    The record cannot be found; the CALC control element has not been
      defined properly in the subschema.

65    The database page read was not the page requested.

66    The area specified is not avaiilable for update.

67    The subschema invoked does not match the subschema object tables.

68    The CICS interface was not started.

69    a BIND RUN-UNIT may not have been issued; the CV may be inactive
      or not accepting new run-units; or the connection with the CV may
      have been broken due to time-out or other factors. When combined
      with a major code of 00, this code means the program has been
      disconnected from the DBMS.

70    The database or journal file will not ready properly.

71    The page range for the area being readied or the page range
      requested cannot found in the DMCL.

72    There is insufficient memory to dynamically load a subschema or
      database procedure.

73    A CV run-unit will exceed the max. users value specified at system
      generation.

74    The dynamic load of a module has failed. If operating on the CV, a
      subschema or database procedure either was not found in the data
      dictionary or the load (core image) library or, if loaded, will
      exceed the number of subschema and the database procedures provided
      for at system generation.

75    A read error has occurred.

76    A write error has occurred.

77    The run-unit has not been bound or has been bound twice. When
      combined with a major code of 00, this code means either the program
      is no longer signed on to the subschema or the variable subschema
      tables have been overwritten.

78    An area wait deadlock has occurred.

79    The run-unit has requested more db-key locks than are available to
      the system.

80    The target node is either not active or has been disabled from the
      DDS configuration.

81    The database name specified is not known to the CV.

82    The subschema is not valid under the specified database.

83    An error has occurred in accessing native VSAM data sets.