Tuesday, April 24, 2012

jcl-3

Q)      How do you pass parameters to the program as the job is being executed ?
A)        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.

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. You use control card because you cannot use a instream 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 control card.

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. E.g. 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 declare using OCCURS clause) and the write the line one by one to the spool using CICS commands like SPOOLClose SPOOLOpen SPOOLWrite . For more help reffer 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)      Definition of COND parameter in JCL
A)        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.

Q)      What is meant by S0C7 system abend code?
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)      What is a COND parameter in JCL?
A)        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.

Q)  Write a jcl to execute a job by 7 a.m 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.1.Sytem Libraries: SUCH AS SYS1.LINKLIB2.Private Libraries: SPECIFIED IN A JOBLIB OR STEPLIB DD STATEMENTS.3.Temporary Libraries: CREATED IN A PREVIOUS STEP OF THE JOB.

Q)  What u mean by include statement in JCL ?
A)        An include statement identifies a member of 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.

Q)  The maximum number of in-stream procedure you can code in any JCL is ?
A)        Fifteen(15).

Q)  What you mean by skeleton JCl?
A)        Jcl which changes during run time i.e. the values for the jcl such as pgm name , dd name will change .ie same jcl can be used for various job, equivalent to dynamic sql...

Q)  How do you submit a JCL under CICS environment ?
A)        Edit the JCL in Extra partition TDQ and submit the same using some system command (not sure) under CICS subsystem. This is what i think, please clarify....

Q)  What is JCL ?
A)        JCL is Job Control Language and is used for Batch processing. The startup procedures of OS and standard products like CICS etc are written in JCL. It is interface between operating system(MVS) & application program. when 2 related programs are combined together on control statements is called job control language

Q)  What is the max 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)        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
A)        typrun=scan checks the JCL for errors, typrun=hold holds the job until further notice.

Q)        Which is the most widely used batch performance monitor for DB2?
A)        DB2PM

Q)        What is QSAM error usually when it is occurs?
A)        Usually it is 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)        What does S0C4 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 less 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)        What is 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 gen. number, yy-version number. Can be sequential, direct, partitioned. (VSAM - no). Must always be cataloged. Advantage - 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? Expand SPOOL?
A)        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

Q)        For how long a job can be executed continuously in a mainframe ?
A)        248 DAYS

Wednesday, April 18, 2012

JCL-2



Q)              Max. No of DD statements in a job ?
A)             3273


Q)              How much space OS allocates when you create a PS or PDS?
A)             56 KB


Q)              Min no of member’s (PDS) in one directory block?
A)           SIX(6)


Q)              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)              What is the use of DSNDB07 ?
A)           This is the area where sorting takes place in DB2


Q)              What is DATACOM db?
A)           It is a database used with VSE.


Q)              What is a Dummy Utility and what it does ?
A)           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 dataset you don't have to run any utility [this could be done by giving disp=new inDD statement]. But for a PGM name must be given in EXEC statement, it is used.


Q)          What 3 guidelines do we have to follow when concatenating DD statements?
A)           Datasets must be of the same type (disk or tape), All datasets must have the same logical record length, The dataset with the largest blocksize must be listed first.


Q)          On the DD statement, what is the main difference between creating a new sequential flat file and a partitioned dataset?
A)           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.


Q)          What is the difference between IEBGENER, IEBCOPY and REPRO in IDCAMS utility?
A)           IEBGENER -- This is a dataset utility for copying sequential datasets which produces a PDS or a member from a

sequential dataset.

IEBCOPY -- This is a dataset utility for copying one PDS to another or to merge PDSs.

REPRO -- This is for copying sequential datasets. More or less same as the IEBGENER.


Q)          How do you submit JCL via a Cobol program?
A)           Use a file //dd1 DD sysout=(*,intrdr)write your JCL to this file. Pl some one try this out.


Q)          How to execute a set of JCL statements from a COBOL program ?
A)           Using EXEC CICS SPOOL WRITE(var-name) END-EXEC command. var-name is a COBOL host structure containing JCL statements.


Q)          What is the difference between static call & Dynamic call ?
A)           In the case of Static call, the called program is a stand along 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


Q)          What is the difference between catalogue procedure and In-Stream procedure?
A)           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 cataloged procedures. Cataloged procedure is cataloged on the procedure library and is called by specifying the procedure name on the EXEC statement.


Q)          What do you feel makes a good program?
A)           A program that follows a top down approach. It is also one that other programmers or users can follow logically and is easy to read and understand.


Q)          Can we browse or edit the GDG dataset if it is a tape entry?
A)           No, You can’t edit or browse the GDG if it resides on tape.


Q)          What are the maximum and minimum sizes of any CONTROL AREA (VSAM datasets) ?
A)           Minimum Size : 1 track Maximum size : 1 cylinder


Q)          How to get cursor position from system in CICS environment ?
A)           Get it from EIBCURPOS !


Q)          How many parameters are there to a DISP statement and what are their uses ?
A)           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).


Q)          What is the error code SOC01 indicate ?
A)           Operation exception error For e.g. a dataset open error


Q)          What is a procedure?
A)           A set of precoded JCL that can be modified through the use of parameters or override cards. Note: Procedures can be catalogued or instream.


Q)          What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
A)           OLD specifies exclusive use of a dataset, SHR allows multiple jobs to concurrently access the dataset Note: When updating a dataset, you would normally use OLD.


Q)          What are the three basic types of statements in a jobstream?
A)           JOB(one per jobstream)EXEC(one or more per job)DD(one or more per jobstep)


Q)          What does SYSIN * indicate?
A)           Instream data follows this card and is terminated when followed by a card containing // or /* in columns 1 and 2.


Q)          What are three major types of JCL statements? What are their functions?
A)           JOB -      indicates start of jobstream 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).

Friday, April 13, 2012

JCL-1

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

Q. What is the meaning of keyword in JCL? What is its opposite?
A. 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.

Q. Describe the JOB statement, its meaning, syntax and significant keywords?
A. 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.

Q. Describe the EXEC statement, its meaning, syntax and keywords.
A. 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.

Q. Describe the DD statement, its meaning, syntax and keywords.
A. 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.

Q. What is a PROC? What is the difference between an instream and a catalogued PROC?
A. 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.

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

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

Q. What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB?
A. 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.

Q. Explain concatenating datasets.
A. 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.

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

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

Q. 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?
A. 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.

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

Q. What is the meaning of the EXEC statement keyword, COND? What is its syntax?
A. 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!)

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

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

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

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

Q. What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?
A. 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.

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

Q. What does the keyword DCB mean and what are some of the keywords associated with it?
A. 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.

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

Friday, April 6, 2012

PROGRAM FUNCTION KEYS IN FILE-AID

     
 When you begin using File-AID,                         |-------------|---- --------|------------ -----|
 commonly used commands are assigned        | PF1/13   | PF2/14  | PF3/15        |
 to the PF keys as shown on the right.                |  HELP    |  SPLIT   |   END           |
                                                                                |                |               |                        |
 You can change these default assignments      |--------------|-------------|-----------------|
 in option 0.0.3 or via the KEYS command.       | PF4/16    | PF5/17  | PF6/18       |
                                                                                | RETURN |  RFIND  | RCHANGE |
                                                                                |                 |               |                       |
                                                                                |---------------|------------|------------------|
                                                                                | PF7/19     | PF8/20  | PF9/21        |
                                                                                |   UP         |  DOWN  |  SWAP        |
                                                                                |                 |                |                       |
                                                                                |---------------|-------------|-----------------|
                                                                                | PF10/22   | PF11/23 | PF12/24     |
                                                                                |  LEFT       |  RIGHT  | RETRIEVE |
                                                                                |                  |               |                    |
                                                                               |----------------|------------|-----------------| 

Wednesday, April 4, 2012

GENERAL INFORMATION PA KEYS IN FILE-AID


The two program access (PA) keys have special meaning in ISPF and File-AID.  They are not equated to ISPF or File-AID commands, and they may not be reassigned.                                 
Normally, you should not use PA1 while operating in File-AID full screen mode.  However, there are two exceptions.                                   
If you press PA1 after the keyboard has been unlocked by File-AID, it is treated like PA2 (RESHOW).  It does not cause exit from File-AID. However, if you press PA1 a second time without any intervening interaction, it causes the current processing to be terminated and the ISPF PRIMARY OPTION MENU is redisplayed.   
If you press PA1 after the keyboard has been manually unlocked (by pressing the RESET key), it usually causes the current processing to be terminated. The ISPF PRIMARY OPTION MENU is redisplayed.            
You can use PA2 to reshow the last full screen image displayed by File-AID.                                             
You may need to reshow the screen if you accidentally press the ERASE INPUT or CLEAR key, or if you have typed data on the screen that you want ignored and have not yet pressed ENTER or a PF key.
   

Monday, April 2, 2012

MISCELLANEOUS COMMANDS IN FILE-AID


Miscellaneous commands cover a variety of functions.  They are listed and briefly described below.                                                  
  KEY      Causes a specified key to be retrieved or the key specification screen to be displayed (applies to BDAM, ISAM, VSAM-KSDS, VSAM-RRDS, and IAM files only)    
  HEX    * Causes data to be displayed in either hexadecimal or character format 
  CAPS   * Causes alphabetic data entered from the terminal to be either translated to upper case or left as-is       
  RESET  * Causes a general resetting of intensified messages and incomplete line commands
  CHAR      Causes a switch from Formatted or Vertical editing modes to Character editing mode            
FORMAT    Causes a switch from Vertical or Character editing modes to Formatted editing mode (Aliases: FMT, MAP)
VFMT      Causes a switch from Formatted or Character editing modes to Vertical editing mode                     
SPLIT   * Causes split screen mode to be entered or changes the location of the split line                     
SWAP    * Moves the cursor to wherever it was previously positioned on the other logical screen of a split screen pair                   
TSO     * Allows a TSO command or CLIST to be entered from any screen
KEYS    * Causes an immediate display of a screen on which current PF key definitions are displayed and modifiable    
PANELID * Causes all subsequent screens to be displayed/not displayed with the panel identifier shown in the upper left corner of the screen
HELP    * Displays additional information about an error or switches to the on-line tutorial                                                 
CURSOR  * Moves the cursor to the first input field on line 2     
PRINT   * Causes a snapshot of the current screen to be recorded in the ISPF list file for subsequent printing                        
PRINT-HI* Same as PRINT except that high-intensity characters on the screen are printed with overstrikes to simulate the high-intensity display     
JCL       Causes the generated JCL to be displayed