Need a ONLINE MAINFREAME Course/Poject Case Study) / Corporate Training/ application support ????

Lets schedule the class. Write me @ mfdtech@gmail.com, for more information refer to : http://onlinemainframe.blogspot.com/
Iam Willing to take up Freelancing projects on Cobol / MF. please mail me @ mfdtech@gmail.com

Google
 

Thursday, January 31, 2008

Interview Questions @ EMphasis

Cobol,Jcl,Db2 related Interview Qns

  1. How to identify a file declared in Source (cobal pmg only) is a VSAM file (ESDS.) or not.

    1. AS(Address Sequential ) as to prefixed to the logical name

      1. Eg :: select File1 assign to AS-FILE11

    2. Check the FD section :: we declare ORGANISATION IS SEQUENTIAL/INDEXED/ RANDOM

    3. File status code (23 eof)

  1. How do create VSAM files

    1. Using IDCAMS / File Aid / Workbench (these tools internally uses idcams)

  1. How do u identify a file to be created is ESDS/KSDS/RRDS – by looking at Cluster create statements .

    1. ESDS will have :: Data and Cluster Datasets

    2. KSDS will have :: Index,Data and Cluster Datasets

    3. RSDS will have :: Data and Cluster Datasets

Other Important Point is in Cluster Declaration, we declare Index, Non-Indexed

and Numbered for KSDS/ESDS/RRDS


  1. How do u identify whether VSAM file is Fixed or VB.

    1. If Record Size (F,F) -- > fixed, if Recordsixe (F,V) -- > Variable


  1. How do you identify the dataset is VSAM dataset or not by looking at the Job.

    1. Check the DCB parameter, for DSORG parameter

DSORG = PS (seq.dataset)

PO ( Partitioned dataset)

ESDS (esds vsame dataset)

KSDS (ksds vsame dataset)

RRDS (rrds vsame dataset)


  1. How do u copy records from 50 to 70 from a file having 100 records (for various vsam files).

    1. Use Repro with ESDS :: From (address) To (address)

    2. KSDS :: From (Index key) To (Index Key)

    3. RRDS :: From (Number) To (Number)

    4. LSDS :: Skip (nn), count(nn)


  1. How do u declare a Variable file in Cobol -- check roy and datidar

    1. Eg :: FD File1

Record Contains 10 to 1000 characters

        1. WS-Rec-MIN PIC X(10).

        2. 01 WS-Rec-Max PIC X(1000)


  1. how do u declare LRECL in JCL for Variable file.

    1. For above file lrcel = 1004 (i.e., 4 bytes additional to actual size of file)


  1. When do use Optional file – while declaring a file and where do u mention this.

    1. We use this in IO-section,

    2. The job will run even when the file is available or not.

Eg : :: select File1 assign to AS-FILE11

File1 is Optional


  1. When do we use Extend Mode for the seq file,

    1. This mobe is used to append the data. Usually it is used to record history.


  1. Can cobol pgm can be coded without FD section ?

    1. Yes.

    2. Eg : Usually most of the subprograms or stored procedures will not have FD section


  1. D in 7th column of cobol program

    1. This is used in the program for debugging mode


  1. SOC4 :: trying to read a will which is not opened or index/subscript out of range (it basically happens while trying to access the data)


  1. SOC7 :: Dataismatch (will give the statement of the process statement. (like IF ws-n > 0) or airthamatic statements or statemts involves evaluation etc.,) Note :: Move statement is root cause for SOC7 error Resolution :: a) get the error statemnt no. from the sysout of run-jcl b) search for the statement no. in sysprint of Compile jcl log -- this will give you the approxmate statement caused soc7 error, c) Find for the variable with comp3 in above statement, and find the cause using by displaying respective variables or using Expdeter


  1. Pls write the jcl to run main program which has a subroutine?

Main Pgm::

Select INFILE-MAIN assign to MAINFL


SUB Pgm ::

Select INFILE-SUB assign to SUBFL


JCL ::


//job

//step exec PGM=MAINPGM

//MAINFL DD DSN=a.b.main

//SUBFL DD DSN = a.b.subp



  1. What is implicit and Explicit Commit

    1. Explicit commit is coded by the programmer, as and when specified commit point is reached data is commited, this is done to minimize the data loss in case of abends.

    2. Implicit Commit is taken care by the system on successful/unsuccessful execution.


  1. I have 200 versions of a GDG, how to include all the versions in a single step.

    1. Use the GDG base, It will include all the versions (including the one created in above step)


  1. In step1 I have created a version with +1, how do crete 2nd version in next step

    1. Give it at (+2)


  1. Now I want to use the file created in step to in step 3, how do u refer that

    1. Give it as (+2) as we are in same Job


  1. How to Pass return Code / data to JCL from COBOL

    1. We can pass only two bytes of data from cobol to JCL using the RETURN-CODE.

    2. Eg : Move 04 to RETURN-CODE. This return code will override the actual return code of previous step.

  1. which file is required, to expedit(debug a program thru expeditor) a program

    1. Its DDIO (RRDS ) file (to generate this file pgm has to be compiled with Exped=y option)

3 comments:

Anonymous said...

Thanks for the post.Please visit the site for
Mainframe Interview Questions and Answers

http://www.aired.in/2010/01/mainframe-interview-question-answers.html

Joy said...

Mainframe Interview Question Answers Collection

Bathula Sreenivasa Rao said...

Good list of questions,
For real time scenario based Mainframe interview questions,please refer
WWW.MAINFRAMEINTERVIEW.COM