Saturday, October 19, 2013

CICS Interview Questions 4

Q)  Mention the option (along with argument type) used in a CICS command to retrieve the response code after execution of the command.
A)  RESP( S9(8) COM.)

Q)  What’s the CICS command used to access current date and time?
A)  ASKTIME.

Q)  Into what fields will the date and time values be moved after execution of the above command?
A)  EIBDATE & EIBTIME.

Q)    How do you terminate an already issued DELAY command?
A)  EXEC CICS CANCEL
        REQID(id)
     END-EXEC

Q)    How do you dynamically set the CURSOR position to a specific field?
A)  MOVE –1 to FIELD+L field. Mention CURSOR option in the SEND command.

Q)    Which option of the PCT entry is used to specify the PF key to be pressed for initiating a transaction?
A)  TASKREQ=PF1

Q)    Specify the CICS command used to read a VSAM record starting with prefix “F”. Code all the relevant options.
A)  EXEC CICS READ
           DATASET(‘FILENAME’)
     INTO(data-area)
           RIDFLD(data-area)
     KEYLENGTH(1)
           GENERIC
     LENGTH(WK-LEN)
     END-EXEC.

Q)    Mention the option used in the CICS READ command to gain accessibility directly to the file I/O area. (AssumeCOBOL-II).
A)  SET(ADDRESS OF LINKAGE-AREA).

Q)    Which command is used to release a record on which exclusive control is gained?
A)  EXEC CICS UNLOCK END-EXEC.

Q)    How do you establish a starting position in a browse operation?
A)     EXEC CICS STARTBR---------- END-EXEC.

Q)    What is the option specified in the read operation to gain multiple concurrent operations on the same dataset?
A)     REQID(value).

Q)    What is the CICS command that gives the length of TWA area?
A)     EXEC CICS ASSIGN
TWALENG(data-value)
END-EXEC.

Wednesday, October 2, 2013

CICS Interview Questions 3

Q) What does “Pseudo Conversational” mean?
A) The programming technique in which the task will not wait for the end-user replies on the terminal. Terminating the task every time the application needs a response from the user and specifying the next transaction to be started when the end user press any attention key (Enter, PF1 through PF24, PA1,PA2 and Clear) is pseudo-conversational processing.

Q) What is the function of the CICS translator?
A) The CICS translator converts the EXEC CICS commands into call statements for a specific programming language.
   There are CICS translators for Assembler, COBOL, and PL/1.

Q) How can you start a CICS transaction other than by keying the Transaction ID at the terminal?
A) By coding an EXEC CICS START in the application program
1. By coding the trans id and a trigger level on the DCT table
2. By coding the trans id in the EXEC CICS RETURN command
3. By associating an attention key with the Program Control Table
4. By embedding the TRANSID in the first four positions of a screen sent to the terminal.
5. By using the Program List Table

Q) What is the purpose of the Program List Table?
A) The Program List Table records the set of applications programs that will be executed automatically at CICS start-up time.

Q) What are the differences between and EXEC CICS XCTL and an EXEC CICS START command?
A) The XCTL command transfer control to another application (having the same Transaction ID), while the START command initiates a new transaction ID (therefore a new task number). The XCTL continues task on the same terminal. START can initiate a task on another terminal.

Q) What are the differences between an EXEC CICS XCTL and an EXEC CICS LINK command?
A) The XCTL command transfer control to an application program at the same logical level (do not expect to control back), while the LINK command passes control to an application program at the next logical level and expects control back.

Q) What happens to resources supplied to a transaction when an XCTL command is executed?
A) With an XCTL, the working storage and the procedure division of the program issuing the XCTL are released. The I/O areas, the GETMAIN areas, and the chained Linkage Section areas (Commarea from a higher level) remain. All existing locks and queues also remain in effect. With a LINK, however, program storage is also saved, since the transaction expects to return and use it again.

Q) What CICS command do you need to obtain the user logon-id?
A) You must code EXEC CICS ASSIGN with the OPERID option.

Q) What is a resident program?
A) A program or map loaded into the CICS nucleus so that it is kept permanently in main storage and not deleted when CICS goes “Short On Storage”.

Q) What is EIB. How it can be used?
A) CICS automatically provides some system-related  information to  each  task  in  a  form  of  EXEC Interface Block (EIB), which is unique to the CICS command level. We can use  all  the fields  of EIB in  our application  programs  right  away.

Q) What does “Pseudo Conversational” mean?
A) The programming technique in which the task will not wait for the end-user replies on the terminal. Terminating the task every time the application needs a response from the user and specifying the next transaction to be started when the end user press any attention key (Enter, PF1 through PF24, PA1,PA2 and Clear) is pseudo-conversational processing.

Q) What is the function of the CICS translator?
A) The CICS translator converts the EXEC CICS commands into call statements for a specific programming language.
   There are CICS translators for Assembler, COBOL, and PL/1.

Q) How can you start a CICS transaction other than by keying the Transaction ID at the terminal?
A) By coding an EXEC CICS START in the application program
1. By coding the trans id and a trigger level on the DCT table
2. By coding the trans id in the EXEC CICS RETURN command
3. By associating an attention key with the Program Control Table
4. By embedding the TRANSID in the first four positions of a screen sent to the terminal.
5. By using the Program List Table

Q) What is the purpose of the Program List Table?
A) The Program List Table records the set of applications programs that will be executed automatically at CICS start-up time.

Q) What are the differences between and EXEC CICS XCTL and an EXEC CICS START command?
A) The XCTL command transfer control to another application (having the same Transaction ID), while the START command initiates a new transaction ID (therefore a new task number). The XCTL continues task on the same terminal. START can initiate a task on another terminal.

Q) What are the differences between an EXEC CICS XCTL and an EXEC CICS LINK command ?
A) The XCTL command transfer control to an application program at the same logical level (do not expect to control back), while the LINK command passes control to an application program at the next logical level and expects control back.

Q) What happens to resources supplied to a transaction when an XCTL command is executed?
A) With an XCTL, the working storage and the procedure division of the program issuing the XCTL are released. The I/O areas, the GETMAIN areas, and the chained Linkage Section areas (Commarea from a higher level) remain. All existing locks and queues also remain in effect. With a LINK, however, program storage is also saved, since the transaction expects to return and use it again.

Q) What CICS command do you need to obtain the user logon-id?
A) You must code EXEC CICS ASSIGN with the OPERID option.

Q) What is a resident program?
A) A program or map loaded into the CICS nucleus so that it is kept permanently in main storage and not deleted when CICS goes “Short On Storage”.

Q) What is EIB. How it can be used?
A) CICS automatically provides some system-related  information to  each  task  in  a  form  of  EXEC Interface Block (EIB), which is unique to the CICS command level. We can use  all  the fields  of EIB in  our application  programs  right  away.

Q) What is some of the information available in the EIB area?
A)
I. The cursor position in the map
II.Transaction ID
III.Terminal ID
IV. Task Number
V.  Length of  communication area
VI. Current date and time
VII.Attention identifier

Q) What information can be obtained from the EIBRCODE?
A) The EIBRCODE tells the application program if the last CICS command was executed successfully and, if not, why not.

Saturday, September 7, 2013

Defaults

JCL Defaults
1.(NEW,DELETE,DELETE)  - DISP Parameter
2. 5 Buffers - BUFNO Parameter in DCB

COBOL Defaults
1.Trailing - Default for SIGN clause
2.Ascending - SEARCH ALL
3.NOSSRANGE - Subscript out of ranger checking

DB2 Defaults
1.BP00,BP01,BP02 & BP32 - Default Buffers in DB2
2.REPLACE - ACTION Parameter in BIND card
3.VALIDATE - RUN parameter in BIND CARD
4.ASCENDING - ORDER BY in Sort

CICS Interview Questions 2

Q) What  are the  six  different  types  of  argument  values  in  COBOL  that  can  be  placed in various options of a CICS command?
A)
Data Value -  EX (Literal 8 or 7 7 KEYLEN PIC S9(4 ) COMP VALUE 8.)
   Data Area    -  EX (01 RECORD-AREA.
                                  05 FIELD1 PIC X(5). )
   Pointer-Ref   - EX (05 POINTER-I PIC S9(8) COMP. )
   Name           - EX (05 FILE-NAME PIC X(5) VALUE ‘FILEA’. )
   Label            - Cobol paragraph name
   HHMMSS    -  EX (77 TIMEVAL PIC S9(7) COMP3. )

Q) Kindly specify the PIC clause for the following
   Any BLL Cell, Data type of Length Option field, HHMMSS type of data fields
A) Any BLL Cell       - S9(8) COMP
   Data type of Length Option field   - S9(4) COMP
   HHMMSS type of data fields         -  S9(7) COMP3

Q) Specify CICS transaction initiation process. (From the perspective of CICS control programs and control tables.)
A)
TCP places d ata in TIOA and corresponding entry into TCT.
KCP acquires the transaction identifier from TIOA and verifies if it is present in PCT.
SCP acquires Storage in Task Control Area (TCA), in which KCP prepares control data for the task.
KCP then loads the application programs mentioned in PCT by looking for it in PPT.
If resid ent -  real storage memory location is not present in the  PPT  the control  is  passed  to  PCP that
loads the application programs from the physical storage location address given in PPT. The control is
then passed to  the application program (LOAD module).

Q) List the sequence of steps used to achieve “Modification in Skip Sequential Mode.”
A) I.  READNEXT command
II.  Issue the ENDBR command
III.  Issue the READ command with UDTAE optio n.
IV.  Manipulate the record (DELETE or REWRITE command)
V.  Issue START command
VI.  Issue two READNEXT commands (One for dummy skip)
VII. Go to step two.

Q) Specify the requirements for Auto matic Task Initia tion. (Mention the control table, it’s entries
and the corresponding Procedure division CICS command).
A)
DFHDCT  TYPE=INTRA,
       DESTID=MSGS,
          TRANSID=MSW1,
           TRIGLEV=1000

    EXEC CICS WRITEQ TD
    QUEUE(‘MSGS’),
    FROM(DATA-AREA),
    LENGTH(MSG_LEN)
    END-EXEC.

Q) What are the commands used to gain exclusive control over a resource (for Ex a Temporary storage queue.)?
A)
EXEC CICS ENQ       EXEC CICS DEQ
    RESOURCE(QID)      RESOURCE(QID)
   END-EXEC            END-EXEC

Q) What is the EIB parameter and  the CICS command used to implement Pseudo-Conversa tional
   technique using single PCT - Single PPT entry?
A)
EIBCALEN - To check if COMMAREA has been passed in terurn command.
    EXEC CICS RETURN
    TRANSID(data-name)
    COMMAREA(data-area)
    LENGTH(data-value)
    END-EXEC

Q) Mention the 5 fields available in the symbolic map for every ‘NAMED’ field in the DFHMDI
macro? Give a brief description of these fields (Not exceeding a line).
A)
FIELD+L - Return the length of text entered (or for dymanic cursor positioing)
   FIELD+F  - Returns X(80) if data entered but erased.
   FIELD+A  - Used for attributes reading and setting
   FIELD+I  - Used for reading the text entered while receiving the map.
   FIELD+O  - Used for sending information on  to the MAP.

Q) What are the two ways of breaking a CPU bound process to allow other tasks to gain access to CPU.
A)
EXEC CICS DELAY       EXEC CICS DELAY
    INTERVAL(hhmmss)        TIME(hhmmss)
    END-EXEC              END-EXEC

POST and  WAIT commands also achieve the same result.

Q) How do you initiate another transaction? The transaction initiated should be in a position to retrieve information  pertaining  to  which  transaction  has initia ted  it and  from  which  terminal. (Code the required CICS commands)
A)
EXEC CICS START
    INTERVAL(hhmmss)/TIME(hhmmss)
    TRANSID(‘TRAN’)
    TERMID(‘TRM1)
    FROM(data-area)
    LENGTH(data-value)
    RTRANSID(EIBTRNID)
    RTERMID(EIBTRMID)
   END-EXEC

   EXEC CICS RETRIEVE
    INTO(data-area)
    LENGTH(data-value)
    RTRANSID(data-name)
    RTERMID(data-name)
   END-EXEC

Sunday, September 1, 2013

COBOL

8 - Maximum length of Program ID.
7 - Maximum Level in OCCURS clause.
18 - Maximum numbers of digits in a numeric field.
30 - Maximum length of name of Identifier.
120 - Maximum numbers of characters in an alphanumeric field.

Sunday, August 25, 2013

JCL Specials

Symbols used in JCL datasets
1. && - Temporary Datasets
2. & -  Symbolic parameters in procedures
3. * - Referbacks

Temp Datasets
1. Without DSN - //DATA1 DD
2. With DSN    - //DATA2 DD DSN=&&tempdata

Special Programs
1. IGYCRCTL - Compilation
2. IEWL     - Link/Edit 
3. DSNHPC   - Precompile
4. IKJEFT01 - Bind

System Programs
1. IEF* - Program produced by scheduler group
2. IEB* - Dataset utility programs
3. IEH* - System utility programs
4. IEW* - Linkage/Loading programs

Sunday, August 18, 2013

Overrides In JCL

1. REGION Parameter - JOB Over-rides EXEC

//JOB1 JOB (A123),'XYZ'
//        REGION=40K   
//STEP1 EXEC PGM=PGM1,REGION=10K
//STEP2 EXEC PGM=PGM2,REGION=20K

Example : If STEP1 utilises complete 10K,also STEP2 utilises 20K but require more region , it over-rides its step region declaration and utilises the job region declaration (Provided there is no region requirement from any other step).
But if it exceeds the JOB region declaration, the job abebds.

2.TIME Parameter - EXEC Over-rides JOB

//JOB1 JOB (A123),'XYZ'
//        TIME=12
//STEP1 EXEC PGM=PGM1,TIME=04
//STEP2 EXEC PGM=PGM2,TIME=04
//STEP3 EXEC PGM=PGM3,TIME=02

Example : If STEP1 or STEP2 utilises more than 4 minutes,then even though total time for job is 12 minutes, the steps are not executed and the job abends.
If JOB is coded smaller time than the EXEC, then the JOB will terminateto the specified time of the JOB.

3. COND Paramter - JOB Over-rides EXEC

4. JOBLIB AND STEPLIB Parameters - STEPLLIB over-rides JOBLIB