Top Banner

of 34

Mainframe Questionnaire

Jun 02, 2018

Download

Documents

bhaskarbhomia
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/10/2019 Mainframe Questionnaire

    1/34

    Some Questionnaire for your Reference:

    COBOL

    1 Diff b/w Next sentence and continue with example2 How to pass data to a COBOL program and how man was we can pass data to cobolprogram!

    " How to use #O$% in COBOL program

    & 'hat is (ndex and where it is used!

    ) 'hat is #earch and #earch all and which one is faster

    * 'rite the logic of swapping a +alue of two +ariable without using the third +ariable!

    ,! -rres. $ename. redifine. search option. search -LL option! tilit function. #ome senarios0case stud! #ntax error0how will u define CO3 +ariable Difference between CO31. CO32 . CO3 "!

    4! '(%H HOLD option in cursor

    5! #6LCOD7 and #6L#%-%7 0 Difference

    18! 'hat is Dnamic #6L

    11! Difference between 3lan and 3ac9age12! $efrential integrit : ;oriegn 9es

    1"! Chec9 3ending status of a table and how it is remo+ed!

    1&! #ubselect and examples

    1)! Common #6L Codes

    1*! $estart Logic1,! %hree file Comparision14! ain 3rogram and #ub03rogram concepts15! #tring ;ormatting in COBOL < (nspect. #tring. nstring etc=

    JCL

    1! what is #B",.how we resol+e it

    2! what is #8C&.#8C,"! what is the temp! dataset. what is the use

    &! what are D(#3 parameters.DCB parameters

    )! how man tpes of procedures we ha+e

    *! how to restart a perticular step from >OB if that steps abended

    ,! eg! we ha+e ) steps in a proc.now step" creates a new ?D? file which further used in step)

    what we will mention in step) while accessing it!

    4! in the abo+e exaple.suppose step" run fine and abended in step&. than while gi+ing start whatwe will

    mention in step) to refer the ?D? CL without using COND parameter

    2 'hat is OD in >CL

    " 'hat is the use of $epro!!

    &!ain ob cards option. sort utilit. other >CL utilit li9e (DC-. CO3-$7. CO3 titlit.Different option li9e time : condition parameter!

    DB2

  • 8/10/2019 Mainframe Questionnaire

    2/34

    1! #6L codes cursor related. 048".0411.048).058&.0511.0522.052,.0414.0148.@188

    2! how we use cursor

  • 8/10/2019 Mainframe Questionnaire

    3/34

  • 8/10/2019 Mainframe Questionnaire

    4/34

    MAINFRAME COBOL IN!ER"IE# Q$ES!IONS

    %& Name t'e (i)isions in a COBOL *ro+ram&

    (D7N%(;(C-%(ON D((#(ON. 7N($ON7N% D((#(ON. D-%- D((#(ON.3$OC7D$7 D((#(ON!

    2& #'at are t'e (ifferent (ata ty*es a)ai,a-,e in COBOL.

    -lpha0numeric an( meanin+&

    http://www.mainframetutorials.com/COBOLFAQ.htmlhttp://www.mainframetutorials.com/COBOLFAQ.htmlhttp://www.mainframetutorials.com/COBOLFAQ.htmlhttp://www.mainframetutorials.com/COBOLFAQ.htmlhttp://www.mainframetutorials.com/COBOLFAQ.htmlhttp://www.mainframetutorials.com/COBOLFAQ.html
  • 8/10/2019 Mainframe Questionnaire

    5/34

  • 8/10/2019 Mainframe Questionnaire

    6/34

    #cope terminator is used to mar9 the end of a +erb e!g! 7-L-%7. 7ND07-L-%7K (;.7ND0(;!

    26& 9o (o you (o in,ine ERFORM.

    37$;O$ !!! !!!

    7ND 37$;O$

    28& #'en ou,( you use in,ine *erform.

    'hen the bod of the perform will not be used in other paragraphs! (f the bod of theperform is a generic tpe of code

  • 8/10/2019 Mainframe Questionnaire

    7/34

    /7& 9o many -ytes (oes a Simum siHe of a =% ,e)e, item in COBOL I. in COBOL II.

    (n COBOL ((J 1*,,,21)

    44& 9o (o you reference t'e fo,,oin+ fi,e formats from COBOL *ro+rams:

    ;ixed Bloc9 ;ile 0 se O$?-N(#-%(ON (# #767N%(-L! se $7CO$D(N? OD7 (#;. BLOCF CON%-(N# 8 !

    ;ixed nbloc9ed 0 se O$?-N(#-%(ON (# #767N%(-L! se $7CO$D(N? OD7 (#;. do not use BLOCF CON%-(N#

    ariable Bloc9 ;ile 0 se O$?-N(#-%(ON (# #767N%(-L! se $7CO$D(N? OD7(# . BLOCF CON%-(N# 8! Do not code the & btes for record length in ;D ie >CL reclength will be max rec length in pgm @ &

    ariable nbloc9ed 0 se O$?-N(#-%(ON (# #767N%(-L! se $7CO$D(N? OD7(# . do not use BLOCF CON%-(N#! Do not code & btes for record length in ;D ie >CLrec length will be max rec length in pgm @ &!

    7#D# #- file 0 se O$?-N(#-%(ON (# #767N%(-L!

    F#D# #- file 0 se O$?-N(#-%(ON (# (ND77D. $7CO$D F7 (#. -L%7$N-%7$7CO$D F7 (#

    $$D# ;ile 0 se O$?-N(#-%(ON (# $7L-%(7. $7L-%(7 F7 (#

    3rinter ;ile 0 se O$?-N(#-%(ON (# #767N%(-L! se $7CO$D(N? OD7 (# ;.BLOCF CON%-(N# 8! CL DCB=!

    46& #'at are (ifferent fi,e OEN mo(es a)ai,a-,e in COBOL.

    Open for (N3%. O%3%. (0O. 7%7ND!

    48& #'at is t'e mo(e in 'ic' you i,, OEN a fi,e for ritin+.

    O%3%. 7%7ND

    45& In t'e JCL? 'o (o you (efine t'e fi,es referre( to in a su-routine .#uppl the DD cards ust as ou would for files referred to in the main program!

    47& Can you RE#RI!E a recor( in an ESDS fi,e. Can you DELE!E a recor( from it.

    Can rewriteCL

  • 8/10/2019 Mainframe Questionnaire

    8/34

    6%& #'at is Static?Dynamic ,inin+ .

    (n static lin9ing. the called subroutine is lin90edited into the calling program . while indnamic lin9ing. the subroutine : the main program will exist as separate load modules!ou choose static/dnamic lin9ing b choosing either the DN- or NODN- lin9 editoption!

  • 8/10/2019 Mainframe Questionnaire

    9/34

    #'at is t'e function of DD DIS *arameter. JCL

  • 8/10/2019 Mainframe Questionnaire

    10/34

  • 8/10/2019 Mainframe Questionnaire

    11/34

    22 #'en s*ace is a,,ocate( for an out*ut (ataset? 'at units can -e use(.

  • 8/10/2019 Mainframe Questionnaire

    12/34

    4 I(entifies t'e ,i-raries t'at t'e system i,, searc' for inc,u(e +rou*s or *roce(uresname(in EEC statements

    //& #'at *arameter of t'e o- statement is use( to ,imit t'e C$ time consume( -y t'eo-.

  • 8/10/2019 Mainframe Questionnaire

    13/34

    2 R!G *arameter

  • 8/10/2019 Mainframe Questionnaire

    14/34

  • 8/10/2019 Mainframe Questionnaire

    15/34

    DB2 IN!ER"IE# Q$ES!IONS AND ANS#ERS

    % 9o ou,( you fin( out t'e tota, num-er of ros in a DB2 ta-,e.

    se #7L7C% CON%es in DB2.

    #pecif the indexed columns in the 'H7$7 clause of db2 Euer!

    4 9o (o you fin( t'e ma>imum )a,ue in a co,umn in (-2.

    se #7L7C% -

    6 9o (o you retrie)e t'e first 6 c'aracters of FIRS!NAME co,umn ofDB2 ta-,e EM .

    #6L 6uer J #7L7C% #B#%$

  • 8/10/2019 Mainframe Questionnaire

    16/34

    B7%'77N supplies a range of +alues while (N supplies a list of +alues!

    %4 Is BE!#EEN inc,usi)e of t'e ran+e )a,ues s*ecifie(. 13

    es!

    %6 #'at is PLIKEP use( for in #9ERE c,ause. #'at are t'e i,(car(

    c'aracters. 13L(F7 is used for partial string matches! TUVTUV < for a string of ancharacter = and TUVWTUV

  • 8/10/2019 Mainframe Questionnaire

    17/34

    7ither b using the single row #7L7C% statements. or b using theC$#O$!

    -part from cursor. what other was are a+ailable to ou to retrie+e a row froma table in embedded #6L 0

    #ingle row #7L7C%s!

    26 #'ere ou,( you s*ecify t'e DECLARE C$RSOR statement. 13

    #ee answer to next Euestion!28 9o (o you s*ecify an( use a cursor in a COBOL *ro+ram. 13

    se D7CL-$7 C$#O$ statement either in wor9ing storage or in proceduredi+ision

  • 8/10/2019 Mainframe Questionnaire

    18/34

    table/+iew in terms of DB2 datatpes!

    2! - host language cop boo9 that gi+es the host +ariable definitions for thecolumn names!

    /7 Is it man(atory to use DCL@EN. If not? 'y ou,( you use it at a,,.

    (t is not mandator to use DCL?7N!

    sing DCL?7N. helps detect wrongl spelt column names etc! during thepre0compile stage itself < because of the D7CL-$7 %-BL7 =! DCL?7N beinga tool. would generate accurate host +ariable definitions for the tablereducing chances of error!

    /ecute( .

    1! se D#N utilit to run a DB2 batch program from nati+e %#O! -n exampleis shownJ

    D#N ##%7

  • 8/10/2019 Mainframe Questionnaire

    19/34

    DB2 Inter)ie Questions AR! III &mainframe+uruu,&com

    6= #'at are t'e iso,ation ,e)e,s *ossi-,e . 13

    C#J Cursor #tabilit

    $$J $epeatable $ead

    6% #'at is t'e (ifference -eteen CS an( RR iso,ation ,e)e,s.

    C#J $eleases the loc9 on a page after use

    $$J $etains all loc9s acEuired till end of transaction62 #'ere (o you s*ecify t'em .

    (#OL-%(ON L77L is a parameter for the bind process!

    6/ #'en (o you s*ecify t'e iso,ation ,e)e,. 9o.

    During the B(ND process! (#OL-%(ON < C#/$$ =!!!

    ( use C# and update a page! 'ill the loc9 be released after ( am done withthat page

    No!

    64 #'at are t'e )arious ,ocin+ ,e)e,s a)ai,a-,e.

    3-?7. %-BL7. %-BL7#3-C7

    66 9o (oes DB2 (etermine 'at ,ocsiHe to use.

    1! Based on the loc90siMe gi+en while creating the tablespace

    2! 3rogrammer can direct the DB2 what loc90siMe to use

    "! (f loc90siMe -N is specified. DB2 usuall chooses a loc90siMe of 3-?768 #'at are t'e (isa()anta+es of A@E ,e)e, ,oc. RAMES9&mainframetutoria,s&com

    High resource utiliMation if large updates are to be done

    65 #'at is ,oc esca,ation.

    3romoting a 3-?7 loc90siMe to table or tablespace loc90siMe when atransaction has acEuired more loc9s than specified in NLF%#! Loc9sshould be ta9en on obects in single tablespace for escalation to occur!

    67 #'at are t'e )arious ,ocs a)ai,a-,e.

    #H-$7. 7CL#(7. 3D-%7

    6

  • 8/10/2019 Mainframe Questionnaire

    20/34

    85 #'at is a co,,ection.

    a user defined name that is the anchor for pac9ages! (t has not phsicalexistence! ain usage is to group pac9ages!

    (n #3;( suppose ou want to select max! of 1888 rows . but the selectreturns onl 288 rows!

    87 #'at are t'e 2 s,co(es t'at are returne(. 13

    188 < for successful completion of the Euer =. 8 es'a)e +one 'ayire& #'at (o you (o. 13

    Loo9s li9e index page split has occurred! DO a $7O$? of the indexes!

    52 #'at is (ynamic SQL. 13

    Dnamic #6L is a #6L statement created at program execution time!

    5/ #'en is t'e access *at' (etermine( for (ynamic SQL. 13

    -t run time. when the 3$73-$7 statement is issued!

    54 Su**ose I 'a)e a *ro+ram 'ic' uses a (ynamic SQL an( it 'as-een *erformin+ e,, ti,, no& Off ,ate? I fin( t'at t'e *erformance 'as(eteriorate(& #'at 'a**ene(. 13

    3robabl $N #%-%# is not done and the program is using a wrong indexdue to incorrect stats!

    3robabl $N#%-%# is done and optimiMer has chosen a wrong access pathbased on the latest statistics!

    DB2 (nter+iew 6uestions 0 3-$% ( www!mainframeguru9ul!com

    56 9o (oes DB2 store N$LL *'ysica,,y.as an extra0bte prefix to the column +alue! phsicall. the nul prefix is HexTUV88TUV if the +alue is present and Hex TUV;;TUV if it is not!

    58 9o (o you retrie)e t'e (ata from a nu,,a-,e co,umn. 13

    se null indicators! #ntax !!! (N%O JHO#%-$JNLL(ND

    55 #'at is t'e *icture c,ause of t'e nu,, in(icator )aria-,e. 13

    #5

  • 8/10/2019 Mainframe Questionnaire

    21/34

    Y of rows in the table

    3ercent of rows in clustering seEuence

    Y of distinct +alues of indexed column

    Y of rows mo+ed to a nearb/farwa page due to row length increase

    7/ #'at is REOR@. #'en is it use(.

    $7O$? reorganiMes data on phsical storage to reclutser rows. positioning

    o+erflowed rows in their proper seEuence. to reclaim space. to restore freespace! (t is used after hea+ updates. inserts and delete acti+it and aftersegments of a segmented tablespace ha+e become fragmented!

    74 #'at is IMA@ECOG . 13

    (t is full bac9up of a DB2 table which can be used in reco+er!

    76 #'en (o you use t'e IMA@ECOG. 13

    %o ta9e routine bac9up of tables

    -fter a LO-D with LO? NO

    -fter $7O$? with LO? NO

    78 #'at is COG ENDIN@ status.

    - state in which. an image cop on a table needs to be ta9en. (n this status.the table is a+ailable onl for Eueries! ou cannot update this table! %oremo+e the CO3 37ND(N? status. ou ta9e an image cop or use $73-($

    utilit!75 #'at is C9ECK ENDIN@ .

    'hen a table is LO-Ded with 7N;O$C7 NO option. then the table is left inCH7CF 37ND(N? status! (t means that the LO-D utilit did not performconstraint chec9ing!

    77 #'at is Q$IESCE.

    - 6(7#C7 flushes all DB2 buffers on to the dis9! %his gi+es a correctsnapshot of the database and should be used before and after an(-?7CO3 to maintain consistenc!

    7

  • 8/10/2019 Mainframe Questionnaire

    22/34

  • 8/10/2019 Mainframe Questionnaire

    23/34

    'hen a column which contains long text. e!g! remar9s. notes. ma ha+e inmost cases less than )8 of the maximum length!

    %=7 #'at are t'e (isa()anta+es of usin+ "ARC9AR.

    1! Can lead to high space utiliMation if most of the +alues are close tomaximum!

    2! 3ositioning of -$CH-$ column has to be done carefull as it has

    performance implications!"! $elocation of rows to different pages can lead to more (/Os on retrie+al!

    %=

  • 8/10/2019 Mainframe Questionnaire

    24/34

    "SAM IN!ER"IE# Q$ES!IONS AND ANS#ERS

    "SAM

    %& #'at are t'e (ifferent ty*es of "SAM fi,es a)ai,a-,e.

    7#D#J 7ntr #eEuence Data #et

    F#D#J Fe #eEuence Data #et

    $$D#J $elati+e Data #et

    2& #'at is IDCAMS .(DC-# is the -ccess ethod #er+ices program! ou run the (DC-# program and suppl -#commands thru ##(N!

  • 8/10/2019 Mainframe Questionnaire

    25/34

    alue of 2 for cross region means that the file can be processed simultaneousl b multiple userspro+ided onl one of them is an updater! alue of " for cross sstem means that an number of

    obs can process the file for input or output

  • 8/10/2019 Mainframe Questionnaire

    26/34

    se ?D? namet +enerationof a @D@.

    ?i+e

  • 8/10/2019 Mainframe Questionnaire

    27/34

    CICS IN!ER"IE# Q$ES!IONS

    %& 9o (o you *,ace t'e cursor on a *articu,ar *osition on t'e screen. 13

    o+e 01 to the length attribute of the field aand use the C$#O$ option!

    2& Define t'e fie,( it' IC in t'e BMS ma*&

    se C$#O$

  • 8/10/2019 Mainframe Questionnaire

    28/34

  • 8/10/2019 Mainframe Questionnaire

    29/34

    42& I 'a)e !SQ it' %6 items& I ant to (e,ete t'e %=t' item& 9o (o I (o t'at.

    4/& Can you issue SQL COMMI! from a CICS *ro+ram. 13

    es!

    44& #'at is t'e ot'er ay of terminatin+ a transaction. 13

    77C C(C# #NC3O(N%! -ssuming it is a L'! %his will not end the n!46& #'at is an ASRA a-en( .

    -n data exception problem #OC,. #OC& etc!

    48& #'at is an AEG< a-en( .

    DB2/(D# not up!

    45& #'at are t'e situations un(er 'ic' NE#COG is reuire( .

    'hen a program has been used in C(C# atleast once and then changed and recompiled!

    47& #'at is 2 *'ase commit.

    'hat is 77C C(C# $7%$(77

    sed b #%-$%ed tas9s to get the parameters passed to them!

    4ecute a -ac+roun( CICS t>n .

    'ith a #%-$% or -%(!

    66& Can a CICS re+ion -e attac'e( to more t'an one DB2 su-system .......................;

    68& #'at (etermines t'e DB2 su-system to 'ic' a *articu,ar CICS re+ion isattac'e( .

    65& #'at is t'e DSNC transaction use( for .

    .................................

    67& 9o (o you 'an(,e error in a CICS *ro+ram.

    #ame as "*!

    6

  • 8/10/2019 Mainframe Questionnaire

    30/34

    Jun may +et mo)e( in& #i,, cause Stora+e )io,ation& ....

    ...............................

    86& 9o (o I fin( t'e name of t'e CICS re+ion insi(e my COBOL *ro+ram.

    ..........................

    88& #'en you (o a S!AR!? 'at i,, t'e )a,ue of EIBCALEN.

    Iero!

    85& 9o are "SAM fi,es Rea( in CICS *+ms. 13;ile Control Commands! $andom. #eEuential. forward and bac9ward!

    87& 9o i,, you access a "SAM fi,e usin+ an a,ternate in(e>.

    %hru the path! Define path as an ;C% and use normal ;ile control commands!

    8

  • 8/10/2019 Mainframe Questionnaire

    31/34

    JCL IN!ER"IE# Q$ES!IONS

    %& #'at is *rimary a,,ocation for a (ataset.%he space allocated when the dataset is first created!

    2& #'at is t'e (ifference -eteen *rimary an( secon(ary a,,ocations for a(ataset.

    #econdar allocation is done when more space is reEuired than what has alreadbeen allocated!

    /&9o many e>tents are *ossi-,e for a seuentia, fi,e . For a "SAM fi,e .

    1* extents on a +olume for a seEuential file and 12" for a #- file!

    4& #'at (oes a (is*osition of NE#?CA!L@?DELE!E mean.

    %hat this is a new dataset and needs to be allocated. to C-%L? the dataset if thestep is successful and to delete the dataset if the step abends!

    6& #'at (oes a (is*osition of NE#?CA!L@?KEE mean.

    %hat this is a new dataset and needs to be allocated. to C-%L? the dataset if the

    step is successful and to F773 but not C-%L? the dataset if the step abends!%hus if the step abends. the dataset would not be catalogued and we would needto suppl the +ol! ser the next time we refer to it!

    8& 9o (o you access a fi,e t'at 'a( a (is*osition of KEE.

    Need to suppl +olume serial no! OLA#7$Axxxx!

    5& #'at (oes a (is*osition of MOD?DELE!E?DELE!E mean .

    %he OD will cause the dataset to be created CL!

    %%& 9o (o you create a tem*orary (ataset. #'ere i,, you use t'em.

    %emporar datasets can be created either b not specifing an D#N-7 or bspecifing the temporar file indicator as in D#NA::%73!

    'e use them to carr the output of one step to another step in the same ob! %hedataset will not be retained once the ob completes!

    %2& 9o (o you restart a *roc from a *articu,ar ste*.

    (n ob card. specif $7#%-$%Aprocstep!stepnamewhere procstep A name of the cl step that in+o9ed the proc

    and stepname A name of the proc step where ou want execution to start

    %/& 9o (o you si* a *articu,ar ste* in a *roc;JOB.

    Can use either condition codes or use the cl control statement (; CL=

    %/a& A ROC 'as fi)e ste*s& Ste* / 'as a con(ition co(e& 9o can youo)erri(e;nu,,ify t'is con(ition co(e.

    3ro+ide the o+erride on the 77C stmt in the >CL as followsJ

  • 8/10/2019 Mainframe Questionnaire

    32/34

    //#%73881 77C procname.COND!stepnameA+alue

    -ll parameters on an 77C stmt in the proc such as COND. 3-$ ha+e to beo+erridden li9e this!

    %4& 9o (o you o)erri(e a s*ecific DDNAME;SGSIN in ROC from a JCL.

    //Zstepname!ddX D#NA!!!

    %6& #'at is NO!CA! 2 .

    %his is an # message indicating that a duplicate catalog entr exists! 7!g!. ifou alread ha+e a dataset with dsn A TUVxxxx!TUV and u tr to create onewith disp new.catlg. ou would get this error! the program open and write would gothrough and at the end of the step the sstem would tr to put it in the sstemcatalog! at this point since an entr alread exists the catlg would fail and gi+e thismessage! ou can fix the problem b deleting/uncataloging the first data set andgoing to the +olume where the new dataset existsOB card le+el!

    $7?(ON specifies the max region siMe! $7?(ONA8F or 8 or omitting $7?(ONmeans no limit will be applied!

    2%& #'at (oes t'e !IME *arameter si+nify . #'at (oes !IME%44= mean .

    %(7 parameter can be used to o+ercome #"22 abends for programs that

    genuinel need more C3 time! %(7A1&&8 means no C3 time limit is to beapplied to this step!

    22& #'at is CONDE"EN .

    eans execute this step e+en if an of the pre+ious steps. terminated abnormall!

    2/& #'at is CONDONLG .

    eans execute this step onl if an of the pre+ious steps. terminated abnormall!

    24& 9o (o you c'ec t'e synta> of a JCL it'out runnin+ it.

    %37$NA#C-N on the >OB card or use >#C-N!

    26& #'at (oes IEB@ENER (o.

    sed to cop one 6#- file to another! #ource dataset should be described using##%1 ddname! Destination dataset should be decribed using ##%2!(7B?7N$ can also do some reformatting of data b suppling control cards +ia##(N!

    28& 9o (o you sen( t'e out*ut of a COBOL *ro+ram to a mem-er of aDS.

    Code the D#N as pds

  • 8/10/2019 Mainframe Questionnaire

    33/34

    //##(N DD

    input data

    input data

    /

    27;%81

    //##%#(N DD

    D#N ##%7

    $N 3$O?$-//2& #'at is S!ELIB? JOBLIB. #'at is it use( for.

    #pecifies that the pri+ate librar OBL(B to all steps in the ob!

    //& #'at is or(er of searc'in+ of t'e ,i-raries in a JCL.

    ;irst an pri+ate libraries as specified in the #%73L(B or >OBL(B. then the sstemlibraries such as ##1!L(NFL(B! %he sstem libraries are specified in the lin9list!

    /4& #'at 'a**ens if -ot' JOBLIB S!ELIB is s*ecifie( .

    >OBL(B is ignored!

    /6& #'en you s*ecify muti*,e (atasets in a JOBLIB or S!ELIB? 'at factor(etermines t'e or(er.

    %he librar with the largest bloc9 siMe should be the first one!

    /8& 9o to c'an+e (efau,t *roc,i- .//-BCD >CLL(B O$D7$ACL is #H$ and the pgm opens the file in 7%7ND mode! 'hathappens

    $ecords will be written to end of file

  • 8/10/2019 Mainframe Questionnaire

    34/34