mainframe intreview question
TRANSCRIPT
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 1/83
1. What is the diference between index and subscript? - GS
Subscript reers to the array occurrence while index is the displacement (in no
o bytes) rom the beinnin o the array. !n index can only be modi"ed usin
#$%&'% S$!%*+ , S$. eed to ha/e index or a table in order to use S$!%*+
S$!%*+ !00.
What is the diference between S$!%*+ and S$!%*+ !00? - GS
S$!%*+ - is a serial search.
S$!%*+ !00 - is a binary search , the table must be sorted
(!*$2G3$S*$2G 4$5 clause to be used , data loaded in this order)
beoreusin S$!%*+ !00.
6.What is the diference between *'27$ , $8 S$$*$ ?
*'27$ is li9e a null statement (do nothin) while $8 S$$*$ transers
control to the next sentence (::) (! sentence is terminated by a period)
What does $82 do ?
oes nothin : 2 used must be the only sentence within a pararaph.
;.What is the diference between *'# , *'#-; ?
*'# is a binary storae ormat while *'#-; is pac9ed decimal ormat.
*02$ 2$%<2$W =7$S2' >!4 (!2&%!$)
*lient codes
GS - Goldman Sachs
*'>'0
ame the di/isions in a *'>'0 proram. - GS
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 2/83
2$2&2*!2' 2<2S2' $<2%'$ 2<2S2' !! 2<2S2' #%'*$7%$
2<2S2'.
What are the diferent data types a/ailable in *'>'0?
!lpha-numeric (8) alphabetic (!) and numeric (@).
What does the 222!02A$ /erb do? - GS
!lphabetic !lphanumeric "elds , alphanumeric edited items are set to S#!*$S.
umeric umeric edited items set to A$%'.
&200$% '**7%S $#$2G ' items let untouched.
What is BB le/el used or ?
$lementary le/el item. *annot be subdi/isions o other items (cannot be
Cuali"ed) nor can they be subdi/ided themsel/es.
What is DD le/el used or ?
&or condition name *ondititon.
What is le/el EE used or ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 3/83
&or %$!$S clause.
What does the 2S 7$%2* clause establish ?
2S 7$%2* can be used on alphanumeric items sined numeric , pac9ed
decimal
items and usined numeric , pac9ed decimal items. 2S 7$%2* returns %7$ i
the item only consists o F-@. +owe/er i the item bein tested is a sined
item then it may contain F-@ and - .
+ow do you de"ne a table3array in *'>'0?
F1 !%%!5S.
FH !%%!51 #2* 8(@) '**7%S 1F 2$S.
FH !%%!56 #2* 8(E) '**7%S 6F 2$S 2$8$ >5 WS-2$8.
*an the '**7%S clause be at the F1 le/el?
o.
What is the diference between index and subscript? - GS
Subscript reers to the array occurrence while index is the displacement (in no
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 4/83
o bytes) rom the beinnin o the array. !n index can only be modi"ed usin
#$%&'% S$!%*+ , S$. eed to ha/e index or a table in order to use S$!%*+
S$!%*+ !00.
What is the diference between S$!%*+ and S$!%*+ !00? - GS
S$!%*+ - is a serial search.
S$!%*+ !00 - is a binary search , the table must be sorted
(!S*$2G3$S*$2G 4$5 clause to be used , data loaded in this order)
beore
usin S$!%*+ !00.
What should be the sortin order or S$!%*+ !00? - GS
2t can be either !S*$2G or $S*$2G. !S*$2G is deault. 2 you want
the search to be done on an array sorted in descendin order then while
de"nin the array you should i/e $S*$2G 4$5 clause. (5ou must load the
table in the speci"ed order).
What is binary search?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 5/83
Search on a sorted array. *ompare the item to be searched with the item
at the center. 2 it matches "ne else repeat the process with the let hal
or the riht hal dependin on where the item lies.
y proram has an array de"ned to ha/e 1F items. ue to a bu 2 "nd that
e/en i the proram access the 11th item in this array the proram does not
abend. What is wron with it?
ust use compiler option SS%!G$ i you want array bounds chec9in.
eault is 'SS%!G$.
+ow do you sort in a *'>'0 proram? Gi/e sort "le de"nition sort statement
syntax and meanin. - GS
Syntax
S'% "le-1 ' !S*$2G3$S*$2G 4$5 9ey....7S2G "le-6 G2<2G "le-;.
7S2G can be substituted by 2#7 #%'*$7%$ 2S para-1 +%7 para-6
G2<2G can be substituted by '7#7 #%'*$7%$ 2S para-1 +%7 para-6.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 6/83
"le-1 is the sort wor9"le and must be described usin S entry in &20$
S$*2'.
"le-6 is the input "le or the S'% and must be described usin an & entry
in &20$ S$*2' and S$0$* clause in &20$ *'%'0.
"le-; is the out"le rom the S'% and must be described usin an & entry in
&20$ S$*2' and S$0$* clause in &20$ *'%'0.
"le-1 "le-6 , "le-; should not be opened explicitly.
2#7 #%'*$7%$ is executed beore the sort and records must be %eleased to
the sort wor9 "le rom the input procedure.
'7#7 #%'*$7%$ is executed ater all records ha/e been sorted. %ecords
rom
the sort wor9 "le must be %eturned one at a time to the output procedure.
+ow do you de"ne a sort "le in I*0 that runs the *'>'0 proram?
7se the S'%W4F1 S'%W4F6..... names in the step. umber o sort
datasets
depends on the /olume o data bein sorted but a minimum o ; is reCuired.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 7/83
What are the two ways o doin sortin in a *'>'0 proram? Gi/e the ormats. -
GS
See Cuestion 1E.
Gi/e the ormat o 7S2G and G2<2G in S'% statement. What are the
restrictions with it? - GS
See Cuestion 1E. %estrictions - *annot massae records cannot select records
to be sorted.
What is the diference between perormin a S$*2' and a #!%!G%!#+? - GS
#erormin a S$*2' will cause all the pararaphs that are part o the
section to be perormed.
#erormin a #!%!G%!#+ will cause only that pararaph to be perormed.
What is the use o $<!07!$ statement? - GS
$/aluate is li9e a case statement and can be used to replace nested 2s. he
diference between $<!07!$ and case is that no Jbrea9J is reCuired or
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 8/83
$<!07!$ i.e. control comes out o the $<!07!$ as soon as one match is made.
What are the diferent orms o $<!07!$ statement?
$<!07!$ $<!07!$ S=0*'$ !0S' &20$-S!7S
W+$ !K> ! *K W+$ 1FF !0S' JFFJ imperati/e stmt
imperati/e stmt
W+$ (8)35 K L W+$ -;FH !0S' J;6J
imperati/e stmt imperati/e stmt
W+$ '+$% W+$ '+$%
imperati/e stmt imperati/e stmt
$-$<!07!$ $-$<!07!$
$<!07!$ S=0*'$ !0S' !K> $<!07!$ S=0*'$ !0S' %7$
W+$ 1FF !0S' %7$ W+$ 1FF !0S' !K>
imperati/e stmt imperati/e stmt
W+$ -;FH !0S' &!0S$ W+$ -;FH !0S' (!3*KL)
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 9/83
imperati/e stmt imperati/e stmt
$-$<!07!$ $-$<!07!$
+ow do you come out o an $<!07!$ statement? - GS
!ter the execution o one o the when clauses the control is automatically
passed on to the next sentence ater the $<!07!$ statement. here is no need
o any extra code.
2n an $<!07!$ statement can 2 i/e a complex condition on a when clause?
5es.
What is a scope terminator? Gi/e examples.
Scope terminator is used to mar9 the end o a /erb e.. $<!07!$ $-
$<!07!$M
2& $-2&.
+ow do you do in-line #$%&'%? - GS
#$%&'% ... N720O ...
NsentencesO
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 10/83
$ #$%&'%
When would you use in-line perorm?
When the body o the perorm will not be used in other pararaphs. 2 the body
o the perorm is a eneric type o code (used rom /arious other places in the
proram) it would be better to put the code in a separate para and use#$%&'%
paraname rather than in-line perorm.
What is the diference between *'27$ , $8 S$$*$ ?
*'27$ is li9e a null statement (do nothin) while $8 S$$*$ transers
control to the next sentence (::) (! sentence is terminated by a period)
What does $82 do ?
oes nothin : 2 used must be the only sentence within a pararaph.
*an 2 rede"ne an 8(1FF) "eld with a "eld o 8(6FF)?
5es. %ede"nes Pust causes both "elds to start at the same location. &or
example
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 11/83
F1 WS-'# #2* 8(1)
F1 WS-'#-%$ %$$&2$S WS-'# #2* 8(6).
2 you '<$ J16J to WS-'#-%$
2S#0!5 WS-'# will show 1 while
2S#0!5 WS-'#-%$ will show 16. (?)
*an 2 rede"ne an 8(6FF) "eld with a "eld o 8(1FF) ?
5es.
What do you do to resol/e S'*-B error? - GS
>asically you need to correct the ofendin data.
any times the reason or S'*B is an un-initialiQed numeric item. $xamine that
possibility "rst.
any installations pro/ide you a dump or run time abends ( it can be
enerated also by callin some subroutines or 'S ser/ices thru assembly
lanuae). hese dumps pro/ide the ofset o the last instruction at which the
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 12/83
abend occurred. $xamine the compilation output 8%$& listin to et the /erb
and the line number o the source code at this ofset. hen you can loo9 at
the source code to "nd the bu. o et capture the runtime dumps you will
ha/e to de"ne some datasets (S5S!>'7 etc. ) in the I*0.
2 none o these are helpul use Pudment and 2S#0!5 to localiQe the
source o error.
Some installation miht ha/e batch proram debuin tools. 7se them.
+ow is sin stored in #ac9ed ecimal "elds and Aoned ecimal "elds?
#ac9ed ecimal "elds Sin is stored as a hex /alue in the last nibble (L
bits ) o the storae.
Aoned ecimal "elds !s a deault sin is o/er punched with the numeric
/alue stored in the last bite.
+ow is sin stored in a comp-; "eld? - GS
2t is stored in the last nibble. &or example i your number is 1FF it stores
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 13/83
hex F* in the last byte hex 1* i your number is 1F1 hex 6* i your number is
1F6 hex 1 i the number is -1F1 hex 6 i the number is -1F6 etc...
+ow is sin stored in a *'# "eld ? - GS
2n the most sini"cant bit. >it is on i -/e of i /e.
What is the diference between *'# , *'#-; ?
*'# is a binary storae ormat while *'#-; is pac9ed decimal ormat.
What is *'#-1? *'#-6?
*'#-1 - Sinle precision Roatin point. 7ses L bytes.
*'#-6 - ouble precision Roatin point. 7ses D bytes.
+ow do you de"ne a /ariable o *'#-1? *'#-6?
o picture clause to be i/en. $xample F1 WS-<!% 7S!G$ *'#-1.
+ow many bytes does a S@(B) *'#-; "eld occupy ?
Will ta9e L bytes. Sin is stored as hex /alue in the last nibble.
General ormula is 2((n36) 1)) where nKB in this example.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 14/83
+ow many bytes does a S@(B) S2G %!202G S$#!%!$ "eld occupy ?
Will occupy D bytes (one extra byte or sin).
+ow many bytes will a S@(D) *'# "eld occupy ?
L bytes.
What is the maximum /alue that can be stored in S@(D) *'#?
@@@@@@@@
What is *'# S5*?
*auses the item to be alined on natural boundaries. *an be S5*+%'2A$0$&
or %2G+.
&or binary data items the address resolution is aster i they are located at
word boundaries in the memory. &or example on main rame the memory word
siQe
is L bytes. his means that each word will start rom an address di/isible by
L. 2 my "rst /ariable is x(;) and next
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 15/83
one is s@(L) comp then i you do not speciy the S5* clause S@(L) *'# will
start rom byte ; ( assumin that it starts rom F ). 2 you speciy S5*
then the binary data item will start rom address L. 5ou miht see some wastae
o memory but the access to this
computational "eld is aster.
What is the maximum siQe o a F1 le/el item in *'>'0 2? in *'>'0 22?
2n *'>'0 22 1EBBB61H
+ow do you reerence the ollowin "le ormats rom *'>'0 prorams
&ixed >loc9 &ile - 7se '%G!2S!2' 2S S$=7$2!0. 7se %$*'%2G '$ 2S
&
>0'*4 *'!2S F .
&ixed 7nbloc9ed - 7se '%G!2S!2' 2S S$=7$2!0. 7se %$*'%2G '$
2S & do
not use >0'*4 *'!2S
<ariable >loc9 &ile - 7se '%G!2S!2' 2S S$=7$2!0. 7se %$*'%2G '$
2S <
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 16/83
>0'*4 *'!2S F. o not code the L bytes or record lenth in & ie I*0 rec
lenth will be max rec lenth in pm L
<ariable 7nbloc9ed - 7se '%G!2S!2' 2S S$=7$2!0. 7se %$*'%2G '$
2S <
do not use >0'*4 *'!2S. o not code L bytes or record lenth in & ie I*0
rec lenth will be max rec lenth in pm L.
$SS <S! "le - 7se '%G!2S!2' 2S S$=7$2!0.
4SS <S! "le - 7se '%G!2S!2' 2S 2$8$ %$*'% 4$5 2S !0$%!$
%$*'%
4$5 2S
%%S &ile - 7se '%G!2S!2' 2S %$0!2<$ %$0!2<$ 4$5 2S
#rinter &ile - 7se '%G!2S!2' 2S S$=7$2!0. 7se %$*'%2G '$ 2S &
>0'*4
*'!2S F. (7se %$*&K&>! in I*0 *>).
What are diferent "le '#$ modes a/ailable in *'>'0?
'pen or 2#7 '7#7 2-' $8$.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 17/83
What is the mode in which you will '#$ a "le or writin? - GS
'7#7 23' ! $8$
2n the I*0 how do you de"ne the "les reerred to in a subroutine ?
Supply the cards Pust as you would or "les reerred to in the main
proram.
*an you %$W%2$ a record in an $SS "le? *an you $0$$ a record rom it?
*an rewrite(record lenth must be same) but not delete.
What is "le status @6? - GS
0oic error. e.. a "le is opened or input and an attempt is made to write
to it.
What is "le status ;@ ?
ismatch in 0%$*0 or >0'*4S2A$ or %$*& between your *'>'0 pm , the I*0
(or
the dataset label). 5ou will et "le status ;@ on an '#$.
What is Staticynamic lin9in ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 18/83
2n static lin9in the called subroutine is lin9-edited into the callin
proram while in dynamic lin9in the subroutine , the main proram will
exist as separate load modules. 5ou choose static3dynamic lin9in by choosin
either the 5! or '5! lin9 edit option. ($/en i you choose '5! a
*!00 identi"er (as opposed to a *!00 literal) will translate to a 5!2*
call).
! statically called subroutine will not be in its initial state the next time
it is called unless you explicitly use 222!0 or you do a *!*$0. !
dynamically called routine will always be in its initial state.
What is !'$(6L) !'$(;1) %'$(6L) and %'$(!5)? ( applicable to
only
<S3$S! $nterprise Ser/er).
hese are compile3lin9 edit options.
!'$ - !ddressin mode. %'$ - %esidency mode.
!'$(6L) - 6L bit addressin. !'$(;1) - ;1 bit addressin. !'$(!5) -
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 19/83
$ither 6L bit or ;1 bit addressin dependin on %'$.
%'$(6L) - %esides in /irtual storae below 1E e line. 7se this or ;1 bit
prorams that call 6L bit prorams. ('S3<S *obol pms use 6L bit addresses
only).
%'$(!5) - *an reside abo/e or below 1E e line.
What compiler option would you use or dynamic lin9in?
5!.
What is SS%!G$ 'SS%!G$ ?
hese are compiler options w.r.t subscript out o rane chec9in. 'SS%!G$ is
the deault and i chosen no run time error will be Raed i your index or
subscript oes out o the permissible rane.
+ow do you set a return code to the I*0 rom a *'>'0 proram?
o/e a /alue to %$7%-*'$ reister. %$7%-*'$ should not be declared in
your proram.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 20/83
+ow can you submit a Pob rom *'>'0 prorams?
Write I*0 cards to a dataset with
33xxxxxxx S5S'7K(!2%%) where J!J is output class and dataset should be
opened or output in the proram. e"ne a DF byte record layout or the "le.
What are the diferences between 'S <S *'>'0 and <S *'>'0 22?
'S3<S *obol pms can only run in 6L bit addressin mode <S *obol 22 pms can
run either in 6L bit or ;1 bit addressin modes.
%eport writer is supported only in 'S3<S *obol.
7S!G$ 2S #'2$% is supported only in <S *'>'0 22.
%eerence modi"cation e WS-<!%(16) is supported only in <S *'>'0 22.
$<!07!$ is supported only in <S *'>'0 22.
Scope terminators are supported only in <S *'>'0 22.
'S3<S *obol ollows !S2 BL stds while <S *'>'0 22 ollows !S2 DH stds.
7nder *2*S *alls between <S *'>'0 22 prorams are supported.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 21/83
What are the steps you o throuh while creatin a *'>'0 proram executable?
>6 precompiler(i embedded sCl used) *2*S translator (i *2*S pm) *obol
compiler 0in9 editor.
2 >6 proram create plan by bindin the >%s.
*an you call an 'S <S *'>'0 pm rom a <S *'>'0 22 pm ?
2n non-*2*S en/ironment it is possible. 2n *2*S this is not possible.
<S!
What are the diferent types o <S! "les a/ailable?
$SS $ntry SeCuence ata Set
4SS 4ey SeCuence ata Set
%%S %elati/e ata Set
What is 2*!S ?
2*!S is the !ccess ethod Ser/ices proram. 5ou run the 2*!S proram
and
supply !S commands thru S5S2. (examples o !S commands are $0$$
$&2$
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 22/83
%$#%' etc..).
*an !S commands be run rom the S' prompt ?
5es
Syntax o !S modal commands ?
ote these can be used only under 2*!S and not rom the S' prompt.
2& 0!S**(or !8**) O(or NK etc..) /alue -
+$ -
' -
command set (such as $0$$ $&2$ etc..)
$0S$ -
' -
command set
0!S** - *ondition code rom the last unction(such as delete) executed
!8** - ax condition code that was returned by any o the pre/ unctions
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 23/83
S$ is also a /alid !S command. S$ 0!S** (or !8**) K /alue
he maximum condition code is 1E. ! cond code o L indicates a warnin. ! cond
code o D is usually encountered on a $0$$ o a dataset that is not present.
7nder 2*!S multiple unctions can be executed each o which returns a cond
code. What will be the condition code returned to the operatin system ?
he maximum condition code enerated is returned as the condition code o the
2*!S step.
What is *ontrol 2nter/al *ontrol !rea
*ontrol 2nter/al is analoous to a physical bloc9 or =S! "les. 2t is the
unit o i3o. ust be between H16 bytes to ;6 9. 7sually either 64 or L4. !
larer control inter/al increases perormance or seCuential processin while
the re/erse is true or random access. 7nder *2*S when a record is loc9ed the
entire *2 ets loc9ed.
*ontrol area is a roup o control inter/als. *! is used durin allocation. *!
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 24/83
siQe is calculated based on the allocation type (cyl trac9s or records) and
can be max o 1 cylinder
What is &%$$S#!*$ ?
*oded in the $&2$ as &%$$S#!*$(ci ca) where ci is the percentae o each
control inter/al to be let ree or insertions ca is the percentae o
control inter/als in each control area to be let empty.
+ow do you decide on optimum /alues or *2 &%$$S#!*$ etc...
*2 siQe should be based on record lenth type o processin. 7sually *2 is L4.
2 record lenth is larer(O14) chose E4 or D4.
&%$$S#!*$ should be lare i more number o insertions are en/isaed. 7sual
/alues are (6F 6F) when hea/y updates are expected. *2 siQe can be calculated.
Would you speciy &%$$S#!*$ or an $SS?
o. >ecause you cannot insert records in an $SS also when you rewrite a
record it must be o the same lenth. hus puttin any /alue or reespace
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 25/83
does not ma9e any sense.
What is S+!%$'#S ?
S+!%$'#S is a parameter in the $&2$ and speci"es how an obPect can be
shared amon users. 2t is coded as S+!%$'#S(a b) where a is the cross reion
share option ie how two or more Pobs on a sinle system can share the "le
while b is the cross system share option ie how two or more Pobs on diferent
<Ses can share the "le. 7sual /alue is (6 ;).
What is the meanin o each o the /alues in S+!%$'#S(6 ;)?
<alue o 6 or cross reion means that the "le can be processed simultaneously
by multiple users pro/ided only one o them is an updater. <alue o ; or cross
system means that any number o Pobs can process the "le or input or output
(<S! does nothin to ensure interity).
+ow do you de"ne a 4SS ?
$&2$ *07S$%(cluster name) with the 2$8$ parameter. !lso speciy the ds
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 26/83
name or the !! component , the ds 2$8 component. 'ther important
parms are
%$*'%S2A$ 4$5S S+!%$'#2'S.
+ow do you de"ne an !028 ? +ow do you use !028s in batch *2*S pms ?
$&2$ !0$%!$2$8. 2mportant paramters are %$0!$ where you speciy
the
base cluster name 4$5S %$*'%S2A$S+!%$'#2'S72=7$4$5(or
'72=7$4$5)
!!(ds name or the data component) 2$8(ds name or the index
component).
hen $&2$ #!+. 2mportant paramters are !$ (ds name or the path)
#!+$%5 (ds name o the alternate index name) 7#!$(or '7#!$) which
speci"es whether an alt index is updated when a update to the base cluster
ta9es place.
hen >02$8. #arameters are 2!!S$(ds name o base cluster)
'7!!S$(ds
name o !28).
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 27/83
7sin alternate indexes in batch pms
2n the I*0 you must ha/e stmts or the cluster and or the path(s). 2n the
cobol pm S$0$* .. !SS2G ' ddname or base cluster %$*'% 4$5 2S...
!0$%!$ %$*'% 4$5 2S..
7sin alternate indexes in *2*S pms
&* entries must be created or both base cluster , the path. o read usin the
alternate index use the dd name o the path in *2*S "le control commands.
What happens when you open an empty <S! "le in a *'>'0 proram or
input?
! <S! "le that has ne/er contained a record is treated as una/ailable.
!ttemptin to open or input will ail. !n empty "le can be opened or output
only. When you open or output *'>'0 will write a dummy record to the "le ,
then delete it out.
+ow do you initialiQe a <S! "le beore any operation? a <S! with alternate
index?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 28/83
*an write a dummy proram that Pust opens the "le or output , then closes it.
What does a "le status o F6 on a <S! indicate?
uplicate alternate 9ey . +appens on both input and output operation
+ow do you calculate record siQe o an alternate cluster? Gi/e your /alues or
both uniCue and non-uniCue.
7niCue *ase H ( alt-9ey-lenth primary-9ey )
onuniCue *ase H ( alt-9ey-lenth n primary-9ey )
where n K T o duplicate records or the alternate 9ey
What is the diference between seCuential "les and $SS "les?
SeCuential(=S!) "les can be created on tape while $SS "les cannot.
!lso you can ha/e !02$8 or an $SS while no such acility exists or =S!
"les.
+ow do you load a <S! data set with records ?
7sin the %$#%' command.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 29/83
+ow do you de"ne a GG ?
7se the $&2$ G$$%!2'!!G%'7# command. 2n the same 2*!S step
another
dataset must be de"ned whose *> parameters are used when new enerations
o
the GG are created. his dataset is 9nown as the model dataset. he ds name
o
this model dataset must be the same as that o the GG so use a disp o 9eep
rather than catl and also speciy spaceK(tr9F)
o all /ersions o the GG ha/e to be o the same record lenth ?
o the *> o the model dataset can be o/erridden when you allocate new
/ersions.
+ow are diferent /ersions o GG named ?
base-"le-name.Gnnnnn<FF where nnnnK eneration number (upto 6HH).
nnnn will be FFFF or the 1st eneration.
Suppose ; enerations o a GG exist. +ow would you reerence the 1 st
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 30/83
eneration in the I*0? - GS
7se GG name(-6).
Suppose a eneration o GG ets created in a particular step o a proc. +ow
would you reer the current eneration in a subseCuent step? What would be the
disposition o this eneration now? - GS
%elati/e eneration numbers are updated only at the end o the Pob not at the
end o a step. o allocate a new eneration we would be usin (1) with a 2S#
o ($W*!0G$0$$). o reer to this in a subseCuent step in the same Pob
we would aain use (1) but with a 2S# o S+% or '0.
What more ino you should i/e in the statement while de"nin the next
eneration o a GG? - GS
Gi/e (1) as the eneration number i/e (newcatl) or disp i/e space
parameter can i/e the dcb parameter i you want to o/erride the dcb o the
model dataset.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 31/83
!ssumin that the $&2$ Pcl is not a/ailable how do you et ino about a <S!
"leJs oranisation ?
7se the 02S*! command.
urin processin o a <S! "le some system error occurs and it is
subseCuently unusable . What do you do ?
%un <$%2&5.
I*0
What is primary allocation or a dataset?
he space allocated when the dataset is "rst created.
What is the diference between primary and secondary allocations or a dataset?
Secondary allocation is done when more space is reCuired than what has already
been allocated.
+ow many extents are possible or a seCuential "le ? &or a <S! "le ?
1E extents on a /olume or a seCuential "le and 16; or a <S! "le.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 32/83
What does a disposition o ($W*!0G$0$$) mean? - GS
hat this is a new dataset and needs to be allocated to *!0G the dataset i
the step is successul and to delete the dataset i the step abends.
What does a disposition o ($W*!0G4$$#) mean? - GS
hat this is a new dataset and needs to be allocated to *!0G the dataset i
the step is successul and to 4$$# but not *!0G the dataset i the step
abends. hus i the step abends the dataset would not be cataloued and we
would need to supply the /ol. ser the next time we reer to it.
+ow do you access a "le that had a disposition o 4$$#? - GS
eed to supply /olume serial no. <'0KS$%Kxxxx.
What does a disposition o ('$0$$$0$$) mean ?
he ' will cause the dataset to be created (i it does not exist) and then
the two $0$$s will cause the dataset to be deleted whether the step abends or
not. his disposition is used to clear out a dataset at the beinnin o a Pob.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 33/83
What is the statement or a output "le?
7nless allocated earlier will ha/e the our parameters
2S#K($W*!0G$0$$) 72 S#!*$ , *> .
What do you do i you do not want to 9eep all the space allocated to a dataset?
- GS
Speciy the parameter %0S$ ( release ) in the S#!*$ e..
S#!*$K(*50(HFHF)%0S$)
What is 2S#K($W#!SS$0$$)?
his is a new "le and create it i the step terminates normally pass it to
the subseCuent steps and i step abends delete it. his dataset will not
exist beyond the I*0.
+ow do you create a temporary dataset? Where will you use them?
emporary datasets can be created either by not speciyin any S!$ or by
speciyin the temporary "le indicator as in SK,,$#.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 34/83
We use them to carry the output o one step to another step in the same Pob.
he dataset will not be retained once the Pob completes.
+ow do you restart a proc rom a particular step? - GS
2n Pob card speciy %$S!%Kprocstep.stepname
where procstep K name o the Pcl step that in/o9ed the proc
and stepname K name o the proc step where you want execution to start
+ow do you s9ip a particular step in a proc3I'>? - GS
*an use either condition codes or use the Pcl control statement 2& (only in $S!
I*0)
! #%'* has "/e steps. Step ; has a condition code. +ow can you
o/erride3nulliy this condition code? - GS
#ro/ide the o/erride on the $8$* stmt in the I*0 as ollows
33S$#FF1 $8$* procname*'.stepnameK/alue
!ll parameters on an $8$* stmt in the proc such as *' #!% ha/e to be
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 35/83
o/erridden li9e this.
+ow do you o/erride a speci"c !$3S5S2 in #%'* rom a I*0?
33Nstepname.ddO SK...
What is '*! 6 - GS
his is an <S messae indicatin that a duplicate catalo entry exists. $..
i you already ha/e a dataset with dsn K Jxxxx.yyyyJ and u try to create one
with disp newcatl you would et this error. the proram open and write would
o throuh and at the end o the step the system would try to put it in the
system catalo. at this point since an entry already exists the catl would
ail and i/e this messae. you can "x the problem by deletin3uncataloin
the "rst data set and oin to the /olume where the new dataset exists(this
ino is in the mslo o the Pob) and cataloin it.
What is JSF*BJ abend? - GS
*aused by in/alid data in a numeric "eld.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 36/83
What is a SF*L error ? - GS
Storae /iolation error - can be due to /arious reasons. e.. %$!2G a "le
that is not open in/alid address reerenced due to subscript error.
What are S;B S>;B S$;B abends?
!ll indicate dataset out o space. S;B - no secondary allocation was
speci"ed. S>;B - end o /ol. and no urther /olumes speci"ed. S$;B - ax. o
1E extents already allocated.
What is S;66 abend ?
2ndicates a time out abend. 5our proram has ta9en more *#7 time than the
deault limit or the Pob class. *ould indicate an in"nite loop.
Why do you want to speciy the %$G2' parameter in a I*0 step? - GS
o o/erride the %$G2' de"ned at the I'> card le/el.
%$G2' speci"es the max reion siQe. %$G2'KF4 or F or omittin %$G2'
means
no limit will be applied.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 37/83
What does the 2$ parameter siniy ? What does 2$K1LLF mean ?
2$ parameter can be used to o/ercome S;66 abends or prorams that
enuinely
need more *#7 time. 2$K1LLF means no *#7 time limit is to be applied to this
step.
What is *'K$<$ ?
eans execute this step e/en i any o the pre/ious steps terminated
abnormally.
What is *'K'05 ?
eans execute this step only i any o the pre/ious steps terminated
abnormally.
+ow do you chec9 the syntax o a I*0 without runnin it?
5#$%7KS*! on the I'> card or use IS*!.
What does 2$>G$$% do?
7sed to copy one =S! "le to another. Source dataset should be described usin
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 38/83
S5S71 ddname. estination dataset should be decribed usin S5S76. 2$>G$%
can
also do some reormattin o data by supplyin control cards /ia S5S2.
+ow do you send the output o a *'>'0 proram to a member o a #S?
*ode the S as pds(member) with a 2S# o S+%. he disp applies to the pds
and
not to a speci"c member.
2 ha/e multiple Pobs ( I*0s with se/eral I'> cards ) in a member. What happens
i 2 submit it?
ultiple Pobs are submitted (as many Pobs as the number o I'> cards).
2 ha/e a *'>'0 proram that !**$#s some input data. +ow do you code the
I*0
statment or this? ( +ow do you code instream data in a I*0? )
33S5S2
input data
input data
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 39/83
3
*an you code instream data in a #%'* ?
o.
+ow do you o/ercome this limitation ?
'ne way is to code S5S2 75 in the #%'* and then o/erride this rom
the
I*0 with instream data.
+ow do you run a *'>'0 batch proram rom a I*0? +ow do you run a
*'>'03>6
proram?
o run a non >6 proram
33S$#FF1 $8$* #GK5#%'G
o run a >6 proram
33S$#FF1 $8$* #GK24I$&F1
33S5SS2
S S5S$(....)
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 40/83
%7 #%'G%!(5#%'G)
#0!(.....) 02>(....) #!%S(...)
3
What is S$#02> I'>02>? What is it used or? - GS
Speci"es that the pri/ate library (or libraries) speci"ed should be searched
beore the deault system libraries in order to locate a proram to be
executed.
S$#02> applies only to the particular step I'>02> to all steps in the Pob.
What is order o searchin o the libraries in a I*0? - GS
&irst any pri/ate libraries as speci"ed in the S$#02> or I'>02> then the
system libraries such as S5S1.02402>. he system libraries are speci"ed in
the lin9list.
What happens i both I'>02> , S$#02> is speci"ed ?
I'>02> is inored.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 41/83
When you speciy mutiple datasets in a I'>02> or S$#02> what actor
determines the order? - GS
he library with the larest bloc9 siQe should be the "rst one.
+ow to chane deault proclib ?
33!>* I*002> '%$%K($.5#%'*02>S5S1.#%'*02>)
he disp in the I*0 is ' and the proram opens the "le in '7#7 mode.
What
happens ? he disp in the I*0 is S+% and the pm opens the "le in $8$
mode.
What happens ?
%ecords will be written to end o "le (append) when a W%2$ is done in both
cases.
What are the /alid S'%G /alues ?
#S - =S! #' - #artitioned 2S - 2S!
What are the diferences between I$S6 , I$S; ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 42/83
I$S; allocates datasets or all the steps beore the Pob is scheduled. 2n I$S6
allocation o datasets reCuired by a step are done only Pust beore the step
executes.
????? *an anyone add more
>6
+ow would you "nd out the total number o rows in a table? - GS
7se S$0$* *'7() ...
+ow do you eliminate duplicate /alues in S$0$*? - GS
7se S$0$* 2S2* ...
+ow do you select a row usin indexes? - GS
Speciy the indexed columns in the W+$%$ clause.
What are areate unctions?
>ulit-in mathematical unctions or use in S$0$* clause.
+ow do you "nd the maximum /alue in a column? - GS
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 43/83
7se S$0$* !8(...
*an you use !8 on a *+!% column?
5$S.
y S=0 statement S$0$* !<G(S!0!%5) &%' $# yields inaccurate results.
Why?
>ecause S!0!%5 is not declared to ha/e 700s and the employees or whom the
salary is not 9nown are also counted.
+ow do you retrie/e the "rst H characters o &2%S!$ column o $# table?
S$0$* S7>S%(&2%S!$1H) &%' $#M
+ow do you concatenate the &2%S!$ and 0!S!$ rom $# table to i/e a
complete name?
S$0$* &2%S!$ UU J J UU 0!S!$ &%' $#M
What is the use o <!07$ unction?
1. !/id -/e S=0*'$s by handlin nulls and Qeroes in computations
6. Substitute a numeric /alue or any nulls used in computation
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 44/83
What is 72'72' !00? - GS
72' eliminates duplicates
72' !00 retains duplicates
>oth these are used to combine the results o diferent S$0$* statements.
Suppose 2 ha/e "/e S=0 S$0$* statements connected by 72'372' !00
how
many times should 2 speciy 72' to eliminate the duplicate rows? - GS
'nce.
What is the restriction on usin 72' in embedded S=0?
2t has to be in a *7%S'%.
2n the W+$%$ clause what is >$W$$ and 2? - GS
>$W$$ supplies a rane o /alues while 2 supplies a list o /alues.
2s >$W$$ inclusi/e o the rane /alues speci"ed? - GS
5es.
What is J024$J used or in W+$%$ clause? What are the wildcard characters? - GS
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 45/83
024$ is used or partial strin matches. JVJ ( or a strin o any character )
and JJ (or any sinle character ) are the two wild card characters.
When do you use a 024$ statement?
o do partial search e.. to search employee by name you need not speciy the
complete nameM usin 024$ you can search or partial strin matches.
What is the meanin o underscore ( JJ ) in the 024$ statement? - GS
atch or any sinle character.
What do you accomplish by G%'7# >5 ... +!<2G clause? - GS
G%'7# >5 partitions the selected rows on the distinct /alues o the column on
which you roup by.
+!<2G selects G%'7#s which match the criteria speci"ed
*onsider the employee table with column #%'I$* nullable. +ow can you et a
list o employees who are not assined to any proPect?
S$0$* $#'
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 46/83
&%' $#
W+$%$ #%'I$* 2S 700M
What is the result o this Cuery i no rows are selected
S$0$* S7(S!0!%5)
&%' $#
W+$%$ =7!0KJS*JM
700
Why S$0$* is not preerred in embedded S=0 prorams?
&or three reasons
2 the table structure is chaned ( a "eld is added ) the proram will ha/e
to be modi"ed
#roram miht retrie/e the columns which it miht not use leadin on 23' o/er
head.
he chance o an index only scan is lost.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 47/83
What are correlated subCueries? - GS! subCuery in which the inner ( nested )
Cuery reers bac9 to the table in the outer Cuery. *orrelated subCueries must
be e/aluated or each Cuali"ed row o the outer Cuery that is reerred to.
What are the issues related with correlated subCueries? - GS
???
What is a cursor? why should it be used? - GS
*ursor is a prorammin de/ice that allows the S$0$* to "nd a set o rows but
return them one at a time.
*ursor should be used because the host lanuae can deal with only one row at
a
time.
+ow would you retrie/e rows rom a >6 table in embedded S=0? - GS
$ither by usin the sinle row S$0$* statementsor by usin the *7%S'%.
!part rom cursor what other ways are a/ailable to you to retrie/e a row rom
a table in embedded S=0? - GS
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 48/83
Sinle row S$0$*s.
Where would you speciy the $*0!%$ *7%S'% statement? - GS
See answer to next Cuestion.
+ow do you speciy and use a cursor in a *'>'0 proram? - GS
7se $*0!%$ *7%S'% statement either in wor9in storae or in procedure
di/ision(beore open cursor) to speciy the S$0$* statement. hen use '#$
&$*+ rows in a loop and "nally *0'S$.
What happens when you say '#$ *7%S'%?
2 there is an '%$% >5 clause rows are etched sorted and made a/ailable or
the &$*+ statement. 'ther wise simply the cursor is placed on the "rst row.
2s $*0!%$ *7%S'% executable?
o.
*an you ha/e more than one cursor open at any one time in a proram ? - GS
5es.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 49/83
When you *'2 is the cursor closed?
5es.
+ow do you lea/e the cursor open ater issuin a *'2? ( or >6 6.; or
abo/e only )
7se W2+ +'0 option in $*0!%$ *7%S'% statement. >ut it has not efect in
psuedo-con/ersational *2*S prorams.
Gi/e the *'>'0 de"nition o a <!%*+!% "eld.
! <!%*+!% column %$!%4S would be de"ned as ollows
1F %$!%4S.
L@ %$!%4S-0$ #2* S@(L) 7S!G$ *'#.
L@ %$!%4S-$8 #2* 8(1@6F).
What is the physical storae lenth o each o the ollowin >6 data types
!$ 2$ 2$S!#?
!$ Lbytes
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 50/83
2$ ;bytes
2$S!# 1Fbytes
What is the *'>'0 picture clause o the ollowin >6 data types
!$ 2$ 2$S!#?
!$ #2* 8(1F)
2$ #2* 8(FD)
2$S!# #2* 8(6E)
What is the *'>'0 picture clause or a >6 column de"ned as $*2!0(116)? -
GS
#2* S@(@)<@@ *'#-;.
ote 2n $*2!0(116) 11 indicates the siQe o the data type and 6 indicates
the precision.
What is *0G$ ? - GS
e*0arations G$erator used to create the host lanuae copy boo9s or the
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 51/83
table de"nitions. !lso creates the $*0!%$ table.
What are the contents o a *0G$? - GS
1. $8$* S=0 $*0!%$ !>0$ statement which i/es the layout o the table3/iew
in
terms o >6 datatypes.
6. ! host lanuae copy boo9 that i/es the host /ariable de"nitions or the
column names.
2s it mandatory to use *0G$? 2 not why would you use it at all? - GS
2t is not mandatory to use *0G$.
7sin *0G$ helps detect wronly spelt column names etc. durin the pre-
compile stae itsel ( because o the $*0!%$ !>0$ ). *0G$ bein a tool
would enerate accurate host /ariable de"nitions or the table reducin
chances o error.
2s $*0!%$ !>0$ in *0G$ necessary? Why it used?
2t not necessary to ha/e $*0!%$ !>0$ statement in *0G$. his is used by
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 52/83
the pre-compiler to /alidate the table-name /iew-name column name etc.
durin pre-compile.
Will precompile o an >6-*'>'0 proram bomb i >6 is down?
o. >ecause the precompiler does not reer to the >6 cataloue tables.
+ow is a typical >6 batch pm executed ?
1. 7se S utility to run a >6 batch proram rom nati/e S'. !n example is
shown
S S5S$(S#;)
%7 #%'G%!($LBF>) #0!($LBF>) 02>(J$GSF1.'>I.0'!02>J)
$
6. 7se 24I$&F1 utility proram to run the abo/e S command in a I*0.
!ssumin that a siteJs standard is that pm name K plan name what is the
easiest way to "nd out which pms are afected by chane in a tableJs
structure ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 53/83
=uery the cataloue tables S5S#0!$# and S5S#!*4$#.
ame some "elds rom S=0*!.
S=0*'$ S=0$%% S=0$%%
+ow can you Cuic9ly "nd out the T o rows updated ater an update statement?
*hec9 the /alue stored in S=0$%%(;).
What is $8#0!2? - GS
$8#0!2 is used to display the access path as determined by the optimiQer or a
S=0 statement. 2t can be used in S#7&2 (or sinle S=0 statement ) or in >2
step (or embedded S=0 ).
What do you need to do beore you do $8#0!2?
a9e sure that the #0!!>0$ is created under the !7+2.
Where is the output o $8#0!2 stored? - GS
2n userid.#0!!>0$
$8#0!2 has output with !*+*'0S K F. What does it mean? - GS
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 54/83
a nonmatchin index scan i !**$SS5#$ K 2.
+ow do you do the $8#0!2 o a dynamic S=0 statement?
1. 7se S#7&2 or =& to $8#0!2 the dynamic S=0 statement
6. 2nclude $8#0!2 command in the embedded dynamic S=0 statements
+ow do you simulate the $8#0!2 o an embedded S=0 statement in S#7&23=&?
Gi/e
an example with a host /ariable in W+$%$ clause.)
7se a Cuestion mar9 in place o a host /ariable ( or an un9nown /alue ). e..
S$0$* $#!$
&%' $#
W+$%$ $#S!0!%5 O ?
What are the isolation le/els possible ? - GS
*S *ursor Stability
%% %epeatable %ead
What is the diference between *S and %% isolation le/els?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 55/83
*S %eleases the loc9 on a pae ater use
%% %etains all loc9s acCuired till end o transaction
Where do you speciy them ?
2S'0!2' 0$<$0 is a parameter or the bind process.
When do you speciy the isolation le/el? +ow?
urin the >2 process. 2S'0!2' ( *S3%% )...
2 use *S and update a pae. Will the loc9 be released ater 2 am done with
that pae?
o.
What are the /arious loc9in le/els a/ailable?
#!G$ !>0$ !>0$S#!*$
+ow does >6 determine what loc9-siQe to use?
1. >ased on the loc9-siQe i/en while creatin the tablespace
6. #rorammer can direct the >6 what loc9-siQe to use
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 56/83
;. 2 loc9-siQe !5 is speci"ed >6 usually choses a loc9-siQe o #!G$
What are the disad/antaes o #!G$ le/el loc9?
+i resource utiliQation i lare updates are to be done
What is loc9 escalation?
#romotin a #!G$ loc9-siQe to table or tablespace loc9-siQe when a transaction
has aCuired more loc9s than speci"ed in 704S. 0oc9s should be ta9en on
obPects in sinle tablespace or escalation to occur.
What are the /arious loc9s a/ailable?
S+!%$ $8*07S2<$ 7#!$
*an 2 use 0'*4 !>0$ on a /iew?
o. o loc9 a /iew ta9e loc9 on the underlyin tables.
What is !0$% ? - GS
S=0 command used to chane the de"nition o >6 obPects.
What is a >% #0! ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 57/83
>% ata>ase %eCuest odule has the S=0 statements extracted rom the
host
lanuae proram by the pre-compiler.
#0! ! result o the >2 process. 2t has the executable code or the S=0
statements in the >%.
What is !*=72%$3%$0$!S$ in >2?
etermine the point at which >6 acCuires or releases loc9s aainst table and
tablespaces includin intent loc9s.
What else is there in the #0! apart rom the access path? - GS
#0! has the executable code or the S=0 statements in the host proram
What happens to the #0! i index used by it is dropped?
#lan is mar9ed as in/alid. he next time the plan is accessed it is rebound.
What are #!*4!G$S ? - GS
hey contain executable code or S=0 statements or one >%.
What are the ad/antaes o usin a #!*4!G$?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 58/83
1. !/oid ha/in to bind a lare number o >% members into a plan
6. !/oid cost o a lare bind
;. !/oid the entire transaction bein una/ailable durin bind and automatic
rebind o a plan
L. inmiQe allbac9 complexities i chanes result in an error.
What is a collection?
a user de"ned name that is the anchor or pac9aes. 2t has not physical
existence. ain usae is to roup pac9aes.
2n S#7&2 suppose you want to select max. o 1FFF rows but the select returns
only 6FF rows. What are the 6 sClcodes that are returned? - GS
1FF ( or successul completion o the Cuery ) F (or successul *'2 i
!7'*'2 is set to 5es).
+ow would you print the output o an S=0 statement rom S#7&2? - GS
#rint the output dataset.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 59/83
+ow do you pull up a Cuery which was pre/iously sa/ed in =& ? - GS
??
0ot o updates ha/e been done on a table due to which indexes ha/e one
haywire. What do you do? - GS
0oo9s li9e index pae split has ocured. ' a %$'%G o the indexes.
What is dynamic S=0? - GS
ynamic S=0 is a S=0 statement created at proram execution time.
When is the access path determined or dynamic S=0? - GS
!t run time when the #%$#!%$ statement is issued.
Suppose 2 ha/e a proram which uses a dynamic S=0 and it has been perormin
well till now. 'f late 2 "nd that the perormance has deteriorated. What
happened? - GS
#robably %7 S!S is not done and the proram is usin a wron index due to
incorrect stats.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 60/83
#robably %7S!S is done and optimiQer has chosen a wron access path based
on
the latest statistics.
+ow does >6 store 700 physically?
as an extra-byte pre"x to the column /alue. physically the nul pre"x is +ex
JFFJ i the /alue is present and +ex J&&J i it is not.
+ow do you retrie/e the data rom a nullable column? - GS
7se null indicators. Syntax ... 2' +'S<!%7002
What is the picture clause o the null indicator /ariable? - GS
S@(L) *'#.
What does it mean i the null indicator has -1 F -6? - GS
-1 the "eld is null
F the "eld is not null
-6 the "eld /alue is truncated
+ow do you insert a record with a nullable column?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 61/83
o insert a 700 mo/e -1 to the null indicator
o insert a /alid /alue mo/e F to the null indicator
What is %7S!S? - GS
! >6 utility used to collect statistics about the data /alues in tables which
can be used by the optimiQer to decide the access path. 2t also collects
statistics used or space manaement. hese statistics are stored in >6
catalo tables.
When will you chose to run %7S!S?
!ter a load or ater mass updates inserts deletes or ater %$'%G.
Gi/e some example o statistics collected durin %7S!S?
T o rows in the table
#ercent o rows in clusterin seCuence
T o distinct /alues o indexed column
T o rows mo/ed to a nearby3arway pae due to row lenth increase
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 62/83
What is %$'%G? When is it used?
%$'%G reoraniQes data on physical storae to reclutser rows positionin
o/eRowed rows in their proper seCuence to reclaim space to restore ree
space. 2t is used ater hea/y updates inserts and delete acti/ity and ater
sements o a semented tablespace ha/e become raemented.
What is 2!G$*'#5 ? - GS
2t is ull bac9up o a >6 table which can be used in reco/ery.
When do you use the 2!G$*'#5? - GS
o ta9e routine bac9up o tables
!ter a 0'! with 0'G '
!ter %$'%G with 0'G '
What is *'#5 #$2G status?
! state in which an imae copy on a table needs to be ta9en 2n this status
the table is a/ailable only or Cueries. 5ou cannot update this table. o
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 63/83
remo/e the *'#5 #$2G status you ta9e an imae copy or use %$#!2% utility.
What is *+$*4 #$2G ?
When a table is 0'!ed with $&'%*$ ' option then the table is let in *+$*4
#$2G status. 2t means that the 0'! utility did not perorm constraint
chec9in.
What is =72$S*$?
! =72$S*$ Rushes all >6 bufers on to the dis9. his i/es a correct snapshot
o the database and should be used beore and ater any 2!G$*'#5 to maintain
consistency.
What is a clusterin index ? - GS
*auses the data rows to be stored in the order speci"ed in the index. !
mandatory index de"ned on a partitioned table space.
+ow many clusterin indexes can be de"ned or a table?
'nly one.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 64/83
What is the diference between primary 9ey , uniCue index ?
#rimary a relational database constraint. #rimary 9ey consists o one or
more columns that uniCuely identiy a row in the table. &or a normaliQed
relation there is one desinated primary 9ey.
7niCue index a physical obPect that stores only uniCue /alues. here can be
one or more uniCue indexes on a table.
What is sClcode -@66 ?
!uthoriQation ailure
What is sClcode -D11?
S$0$* statement has resulted in retrie/al o more than one row.
What does the sClcode o -D1D pertain to? - GS
his is enerated when the consistency to9ens in the >% and the load module
are diferent.
!re /iews updatable ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 65/83
ot all o them. Some /iews are updatable e.. sinle table /iew with all the
"elds or mandatory "elds. $xamples o non-updatable /iews are /iews which are
Poins /iews that contain areate unctions(such as 2) and /iews that ha/e
G%'7# >5 clause.
2 2 ha/e a /iew which is a Poin o two or more tables can this /iew be
updatable? - GS
o.
What are the L en/ironments which can access >6 ?
S' *2*S 2S and >!*+
What is an inner Poin and an outer Poin ?
2nner Ioin combine inormation rom two or more tables by comparin all
/alues that meet the search criteria in hte desinated column or columns o on
etable with all the calues in correspondin columns o the other table or
tables. his 9ind o Poin which in/ol/e a match in both columns are called
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 66/83
inner Poins.
'uter Poin is one in which you want both matchin and non matchin rows to be
returned. >6 has no speci"c operator or outer Poins it can be simulated by
combinin a Poin and a correlated sub Cuery with a 72'.
What is &%$$#!G$ and #*&%$$ in !>0$S#!*$ creation?
#*&%$$ percentae o each pae to be let ree
&%$$#!G$ umber o paes to be loaded with data between each ree pae
What are simple semented and partitioned table spaces ?
Simple ablespace
*an contain one or more tables
%ows rom multiple tables can be interlea/ed on a pae under the >!s control
and maintenance
Semented ablespace
*an contain one or more tables
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 67/83
ablespace is di/ided into sements o L to EL paes in increments o L paes.
$ach sement is dedicated to sinle table. ! table can occupy multiple
sements
#artitioned ablespace
*an contain one table
ablespace is di/ided into parts and each part is put in a separate <S!
dataset.
What is "lter actor?
one di/ided by the number o distinct /alues o a column.
What is index cardinality? - GS
he number o distinct /alues a column or columns contain.
What is a synonym ?
Synonym is an alternate name or a table or /iew used mainly to hide the
leadin Cuali"er o a table or /iew.. ! synonym is accessible only by the
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 68/83
creator.
What is the diference between S5'5 and !02!S?
S5'5 is dropped when the table or tablespace is dropped. Synonym is
a/ailable only to the creator.
!02!S is retained e/en i table or tablespace is dropped. !02!S can be
created e/en i the table does not exist. 2t is used mainly in distributed
en/ironment to hide the location ino rom prorams. !lias is a lobal obPect ,
is a/ailable to all.
What do you mean by ' 700 W2+ $&!70? When will you use it?
his column cannot ha/e nulls and while insertion i no /alue is supplied then
it wil ha/e Qeroes spaces or date3time dependin on whether it is numeric
character or date3time.
7se it when you do not want to ha/e nulls but at the same time cannot i/e
/alues all the time you insert this row.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 69/83
What do you mean by ' 700? When will you use it?
he column cannot ha/e nulls. 7se it or 9ey "elds.
When would you preer to use <!%*+!%?
When a column which contains lon text e.. remar9s notes may ha/e in most
cases less than HFV o the maximum lenth.
What are the disad/antaes o usin <!%*+!%?
1. *an lead to hih space utiliQation i most o the /alues are close to
maimum.
6. #ositionin o <!%*+!% column has to be done careully as it has perormance
implications.
;. %elocation o rows to diferent paes can lead to more 23's on retrie/al.
+ow do 2 create a table !!G$% ( $#T !!G$%) where !!G$% is a
orein 9ey
which reerences to $#T in the same table? Gi/e the exact 0.
&irst *%$!$ !!G$% table with $#T as the primary 9ey. hen !0$% it to
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 70/83
de"ne the orein 9ey.
When is the authoriQation chec9 on >6 obPects done - at >2 time or run time?
!t run time.
What is auditin?
%ecordin S=0 statements that access a table. Speci"ed at table creation time
or thru alter.
*2*S
+ow do you place the cursor on a particular position on the screen? - GS
o/e -1 to the lenth attribute o the "eld and use the *7%S'% option.
e"ne the "eld with 2* in the >S map.
7se *7%S'%(n m)??
What are the two outputs created as a result o eneration o a map? - GS
he map copyboo9 and the load module.
What is the diference between physical map and symbolic map? - GS
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 71/83
he physical map is the load module and the symbolic map is the data structure.
+ow do you protect a "eld rom bein o/erlaid? - GS
What is the attribute byte? - GS
e"nes the display3transmission o "eld. most cases is an output "eld rom
the proram.
+ow do you use extended attributes ?
e"ne $8!K5$S and the correct terminal type.
What are the ; wor9in storae "elds used or e/ery "eld on the map? - GS
0enth attribute and input3output "eld.
What is ? What are &S$ &%S$ ?
odi"ed ata a. >it in the attribute byte indicatin modi"cation o "eld
on screen. +appens on an input operation.
&S$. Sets on to ensure "eld is transmitted. +appens on an output
operation.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 72/83
&%S$. %esets . 7ntil this happens "eld continues to be sent.
What is the use o S$* parameter in >S?
2s the parameter to enerate a symbolic map.
o you recei/e the attribute byte in the symbolic map?
'n $'& yes.
+ow do you ma9e your >S maps case sensiti/e?
7se !S2S???
What is efect on %$*$2<$ !# when
#& 9ey is pressed? ata transmission may happen
#! 9ey is pressed? ata transmission will not happen.
What are S$ !# !#'05 , S$ !# !!'05 ?
What is the diference between a #& 9ey , a #! 9ey ?
#& 9eys wa9e up the tas9 and transmit modi"ed data #! 9eys only wa9e up the
tas9.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 73/83
ame the macros used to de"ne the ollowin
!# !#S$ &2$0
&+S &+2 &+&
*an you use '**7%S in a >S map? 2 you do what are the issues related with
its use?
5es. cannot use roup by clause???
*an you de"ne multiple maps in a >S mapset?
5es.
+ow is the storae determined in the symbolic map i you ha/e multiple maps?
Storae or maps rede"ne the "rst. his means larest map has to be the
"rst.
What is the meanin o >S lenth o "eld K F?
ata was not entered in the "eld
*an you simply chec9 i lenth K F or chec9in i a "eld was modi"ed?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 74/83
o not i $%!S$ $'& was used.
What do you do i you do not want characters entered by the user to be olded
to uppercase ?
7se !S2S option on %$*$2<$.
What does the >7&&$% option in %$*$2<$ mean ?
>rins the entire datastream rom the terminal bufer.
What are the steps you o throuh to a create a >S executable?
!ssemble to create *S$* and 0in9
When you compile a *2*S proram the (pre)compiler puts an extra chun9 o
code.
Where does it et included and that is it called? What is its lenth? - GS
&+$2>04 &+*'!%$!.
0ist all the *2*S tables and explain their contents. - GS
## S2
#* I*
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 75/83
&* S
* S%
%* *
2 ha/e written a *2*S proram. What tables should 2 setup to run this proram?
- GS
## #* (&* * %* (i needed)).
2n which table would you ma9e an entry or a >S map? - GS
##
What is the content o the ## entry? - GS
0enth Source 7se count 0an %es count &+%#0 number
&or a *2*S->6 proram how is the plan reerenced? - GS
7ses a %* table.
+ow is dynamic memory allocated within a *2*S application proram? - GS
7se a G$!2
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 76/83
What are the restrictions while usin G$!2 and &%$$!2? - GS
What is the use o a = S=? - GS
emporary data stores.
+ow do you read rom a S=? - GS
emp storae read command
2 2 create a S= rom one transaction can 2 read it rom another transaction?
- GS
5es. !s lon as they run in the same reion.
What are extra partition , intra partition =s?
$xtra partition =s are datasets used or communication bJn *2*S and other
*2*S3>atch reions. 2ntrapartition =s are Cueues or communication within
ren.
What is trier le/el in the context o =s?
&or intrapartition =s speciy the T records at which !2 happens. not
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 77/83
applicable or extra partition =s.
+ow do you "re a batch Pob rom a *2*S txn ?
e"ne an extrapartition = as an internal reader and write the I*0 to it.
erminate the I*0 with 3$'&.
What is !2? What 9ind o = can be used?
!utomatic as9 2nitiation. 2ntra partition =.
o you reCuire a table entry or a S=?
2 reco/ery is needed.
2s there any entry or S=s in *2*S tables?
5es in the &+S.
What is the use o *?
estination *ontrol able used to de"ne =s
What is $= $= ?
as9 control commands to ma9e resources serially reusable.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 78/83
2 ha/e S= with 1H items. 2 want to delete the 1Fth item. +ow do 2 do that?
*an you issue S=0 *'2 rom a *2*S proram? - GS
5es.
What is the other way o terminatin a transaction? - GS
$8$* *2*S S5*#'2. !ssumin it is a 07W. his will not end the 8n.
What is an !S%! abend ?
!ny data exception problem S'*B S'*L etc.
What is an !$5@ abend ?
>632S not up.
What are the situations under which $W*'#5 is reCuired ?
When a proram has been used in *2*S atleast once and then chaned and
recompiled.
What is 6 phase commit?
What is $8$* *2*S %$%2$<$ ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 79/83
7sed by S!%ed tas9s to et the parameters passed to them.
ame some important "elds in the $2> bloc9 ?
$2>%$S# $2>*!0$ $2>%%*$ $2>!S4 $2>!$ $2>2$
*an you use 5!2* calls in *2*S ?
5es the called routine must be de"ned in ## and the callin proram must use
*!00 identi"er..
+ow do you handle errors in *2*S pms ?
*hec9 $2>%$S# ater the call or use the +!0$ condition.
Suppose pm ! passes ;F bytes to pm > thru commarea and pm > has
de"ned its
&+*'!%$! to be HF bytes . 2s there a problem ?
5es i > tries to access bytes ;1-HF.
When an 8*0 is done does the tranid chane ? 2s a new tas9 created ? oes it
cause an
implicit S5*#'2 to be issued ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 80/83
o o 5es.
+ow do you execute a bac9round *2*S txn ?
With a S!% or !2.
*an a *2*S reion be attached to more than one >6 subsystem ?
What determines the >6 subsystem to which a particular *2*S reion is
attached
?
What is the S* transaction used or ?
+ow do you handle error in a *2*S proram?
Same as ;E.
What is the diference between S!% and 8*0 ?
S!% is used to start a new tas9. 2t is a inter/al control command. 8*0 is
used to pass control to a proram within the same tas9. 2t is a proram control
command.
What is the usae o lanuae in the ## entry?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 81/83
0anuae interace and call parameters???
*an you ha/e *2*S code in a copyboo9? 2 yes what happens durin
compilation?
5es. eeds to be preprocessed.
What is an !2*! abend?
%unaway as9.
+ow would you resol/e an !S%! abend?
2n *'>'0 22 start with *$>% and et the ofset3instruction.
2 in/o9e a transaction rom *2*S. he proram has a code '<$
&+*'!%$! '
WS-!%$!. What happens to this transaction? What happens to the other
transactions?
Iun9 may et mo/ed in. Will cause Storae /iolation. ????
+ow do 2 "nd the name o the *2*S reion inside my *'>'0 proram?
When you do a S!% what will the /alue o $2>*!0$?
Aero.
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 82/83
+ow are <S! "les %ead in *2*S pms? - GS
&ile *ontrol *ommands. %andom SeCuential orward and bac9ward.
+ow will you access a <S! "le usin an alternate index?
hru the path. e"ne path as an &* and use normal &ile control commands.
+ow do you rollbac9 data written to an $SS "le?
e"ne the "le as reco/erable. in cases where records ha/e been inserted into
the "le you may need to run a batch proram to loically delete the inserted
records.
2 ha/e done a S!% >%'WS$ on a <S! dataset. *an 2 do another S!%
>%'WS$
without doin an $ >%'WS$?
o.
*an you access =S! (seC ) "les rom *2*S ?
o.
*an you access $SS "les rom *2*S ?
7/23/2019 Mainframe Intreview Question
http://slidepdf.com/reader/full/mainframe-intreview-question 83/83
5es.
General
$xpect Cuestions about your pre/ious proPects - be clear about the
unctionality application siQe(no o tables no o transactions no o batch
Pobs) tech en/ironment(e.. was a Pob scheduler used ?) your role .
5ou should 9now what /ersions o sotware(>6 *2*S I$S <S) youJ/e wor9ed
with.
>e ready to i/e speci"c syntax i as9ed or. e.. i/e the condition code
statement in the I*0.
+a/e ull understandin o the role or which you are bein inter/iewed.