Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 34

Some Questionnaire for your Reference:

COBOL
1 Diff b/w Next sentence and continue with example
2 How to pass data to a COBOL program and how man was we can pass data to cobol
program!
" 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 senarios0
case stud! #ntax error0how will u define1 CO23 +ariable1 Difference between CO231. CO23
2 . CO23 "!
4! '(%H HOLD option in cursor
5! #6LCOD7 and #6L#%-%7 0 Difference
18! 'hat is Dnamic #6L 1
11! Difference between 3lan and 3ac9age
12! $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 Logic
1,! %hree file Comparision
14! 2ain 3rogram and #ub03rogram concepts
15! #tring ;ormatting in COBOL < (nspect. #tring. /nstring etc=
JCL
1! what is #B",.how we resol+e it
2! what is #8C&.#8C,1
"! what is the temp! dataset. what is the use
&! what are D(#3 parameters.DCB parameters1
)! how man tpes of procedures we ha+e1
*! how to restart a perticular step from >OB if that steps abended1
,! 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 what
we will
mention in step) to refer the ?D? <+ersion @1 or 8=
5! how to eleminate duplicates from a file1
18 what is #/2 ;(7LD A NON7 and B#/21
1 How to b pass the step in a >CL without using COND parameter
2 'hat is 2OD in >CL 1
" 'hat is the use of $epro!!1
&!2ain Cob cards option. sort utilit. other >CL utilit li9e (DC-2. CO23-$7. CO3D /titlit.
Different option li9e time : condition parameter!
DB2
1! #6L codes cursor related. 048".0411.048).058&.0511.0522.052,.0414.0148.@188
2! how we use cursor <declaration.open.fetch=
"! what cursor with hold option do1
&! what is meaning of O37N cursor1
)! isolation le+el1
*! where we define isolation le+el1
,! what is referential integrit1
1 'hat is 048) and 0414 sElcodes
2 'hat are steps in COBOL@DB2 Ccl and explain the procedure
" How to a+oid deadloc9 in DB2!1
& 'hat are Bind parameter !!1 and what is isolation le+el
) Diff b/w pac9age and plan
*!How do u compile a DB2 3rograme before execution! #6L Euerries in DB2!
1! '(%H HOLD option in cursor
2! #6LCOD7 and #6L#%-%7 0 Difference
"! 'hat is Dnamic #6L 1
&! Difference between 3lan and 3ac9age
)! $efrential integrit : ;oriegn 9es
*! Chec9 3ending status of a table and how it is remo+ed!
,! #ubselect and examples
4! Common #6L Codes
CICS
1! $ole of 7(BC-L7N
2! -#F%(27 and ;O$2-%%(27
"! Can 7#D# file be accessed $andoml 1
&! Can C(C# program be in+o9ed in Batch 1
)! Can %#6Gs be accessed randoml 1
*! Coding 3aging Logic in C(C# 3rograms!
,! How to pass data between C(C# 3rograms!
4! L(NF and BC%L etc!
5! %ransaction to browse %#6 < C7B$ =
18!2aster %ransactins li9e C72%. C7D-.C7B$ etc!
11!C(C# %ables < 3C%. 33%. ;C%.$C%.DC% etc=
1 'hat is Lin9 and BC%L
2 How to mo+e the cursor position dnamicall
" How to define a program in C(C#!1
& 'here we will 9eep the plan name in C(C#!
)!%seudo con+ersation. paging logic. cics option0 other few7(B cop boo9 option. 6Gs difference
between0 %#6 : %D6! where are the used. how do u use1
*! $ole of 7(BC-L7N
,! -#F%(27 and ;O$2-%%(27
4! Can 7#D# file be accessed $andoml 1
5! Can C(C# program be in+o9ed in Batch 1
18! Can %#6Gs be accessed randoml 1
11! Coding 3aging Logic in C(C# 3rograms!
12! How to pass data between C(C# 3rograms!
1"! L(NF and BC%L etc!
1&! %ransaction to browse %#6 < C7B$ =
1)!2aster %ransactins li9e C72%. C7D-.C7B$ etc!
1*!C(C# %ables < 3C%. 33%. ;C%.$C%.DC% etc=
MAINFRAME COBOL IN!ER"IE# Q$ES!IONS
%& Name t'e (i)isions in a COBOL *ro+ram&
(D7N%(;(C-%(ON D(H(#(ON. 7NH($ON27N% D(H(#(ON. D-%- D(H(#(ON.
3$OC7D/$7 D(H(#(ON!
2& #'at are t'e (ifferent (ata ty*es a)ai,a-,e in COBOL.
-lpha0numeric <B=. alphabetic <-= and numeric <5=!
/& #'at (oes t'e INI!IALI0E )er- (o. 123
-lphabetic. -lphanumeric fields : alphanumeric edited items are set to #3-C7#!
Numeric. Numeric edited items set to I7$O!
;(LL7$ . OCC/$# D737ND(N? ON items left untouched!
4& #'at is 55 ,e)e, use( for .
7lementar le+el item! Cannot be subdi+isions of other items <cannot be Eualified=. nor
can the be subdi+ided themsel+es!
6& #'at is 77 ,e)e, use( for .
;or condition names!
8& #'at is ,e)e, 88 use( for .
;or $7N-27# clause!
5& #'at (oes t'e IS N$MERIC c,ause esta-,is' .
(# N/27$(C can be used on alphanumeric items. signed numeric : pac9ed decimal
items and usigned numeric : pac9ed decimal items! (# N/27$(C returns %$/7 if the
item onl consists of 805! Howe+er. if the item being tested is a signed item. then it ma
contain 805. @ and 0 !
7& 9o: (o you (efine a ta-,e;array in COBOL.
81 -$$-D#!
8) -$$-D1 3(C B<5= OCC/$# 18 %(27#!
8) -$$-D2 3(C B<*= OCC/$# 28 %(27# (ND7B7D BD '#0(ND7B!
<& Can t'e OCC$RS c,ause -e at t'e =% ,e)e,.
No!
%=& #'at is t'e (ifference -et:een in(e> an( su-scri*t.
#ubscript refers to the arra occurrence while index is the displacement <in no of btes=
from the beginning of the arra! -n index can onl be modified using 37$;O$2.
#7-$CH : #7%!
Need to ha+e index for a table in order to use #7-$CH. #7-$CH -LL!
%%& #'at is t'e (ifference -et:een SEARC9 an( SEARC9 ALL.
#7-$CH 0 is a serial search!
#7-$CH -LL 0 is a binar search : the table must be sorted
< -#C7ND(N?/D7#C7ND(N? F7D clause to be used : data loaded in this order= before
using #7-$CH -LL!
%2& #'at s'ou,( -e t'e sortin+ or(er for SEARC9 ALL.
(t can be either -#C7ND(N? or D7#C7ND(N?! -#C7ND(N? is default! (f ou want the
search to be done on an arra sorted in descending order. then while defining the arra.
ou should gi+e D7#C7ND(N? F7D clause! <Dou must load the table in the specified
order=!
%/& #'at is -inary searc'.
#earch on a sorted arra! Compare the item to be searched with the item at the center! (f
it matches. fine else repeat the process with the left half or the right half depending on
where the item lies!
14. My *ro+ram 'as an array (efine( to 'a)e %= items& Due to a -u+? I fin( t'at e)en if
t'e *ro+ram access t'e %%t' item in t'is array? t'e *ro+ram (oes not a-en(& #'at
is :ron+ :it' it.
2ust use compiler option ##$-N?7 if ou want arra bounds chec9ing! Default is
NO##$-N?7!
%6& 9o: (o you sort in a COBOL *ro+ram. @i)e sort fi,e (efinition? sort statement
synta> an( meanin+&
#ntaxJ
#O$% file01 ON -#C7ND(N?/D7#C7ND(N? F7D 9e!!!!
/#(N? file02
?(H(N? file0"!
/#(N? can be substituted b (N3/% 3$OC7D/$7 (# para01 %H$/ para02
?(H(N? can be substituted b O/%3/% 3$OC7D/$7 (# para01 %H$/ para02!
file01 is the sort wor9file and must be described using #D entr in ;(L7 #7C%(ON!
file02 is the input file for the #O$% and must be described using an ;D entr in ;(L7
#7C%(ON and #7L7C% clause in ;(L7 CON%$OL!
file0" is the outfile from the #O$% and must be described using an ;D entr in ;(L7
#7C%(ON and #7L7C% clause in ;(L7 CON%$OL!
file01. file02 : file0" should not be opened explicitl!
(N3/% 3$OC7D/$7 is executed before the sort and records must be $7L7-#7d to the
sort wor9 file from the input procedure!
O/%3/% 3$OC7D/$7 is executed after all records ha+e been sorted! $ecords from the
sort wor9 file must be $7%/$Ned one at a time to the output procedure!
%8& 9o: (o you (efine a sort fi,e in JCL t'at runs t'e COBOL *ro+ram.
/se the #O$%'F81. #O$%'F82.!!!!! dd names in the step! Number of sort datasets
depends on the +olume of data being sorted. but a minimum of " is reEuired!
%5& #'at are t'e t:o :ays of (oin+ sortin+ in a COBOL *ro+ram. @i)e t'e formats&
#ee Euestion 1*!
%7& @i)e t'e format of $SIN@ an( @I"IN@ in SOR! statement& #'at are t'e restrictions
:it' it.
#ee Euestion 1*! $estrictions 0 Cannot massage records. canot select records to be
sorted!
%<& #'at is t'e (ifference -et:een *erformin+ a SEC!ION an( a AARA@RAA9.
3erforming a #7C%(ON will cause all the paragraphs that are part of the section. to be
performed!
3erforming a 3-$-?$-3H will cause onl that paragraph to be performed!
2=& #'at is t'e use of E"AL$A!E statement.
7+aluate is li9e a case statement and can be used to replace nested (fs! %he difference
between 7H-L/-%7 and case is that no Gbrea9G is reEuired for 7H-L/-%7 i!e! control
comes out of the 7H-L/-%7 as soon as one match is made!
2%& #'at are t'e (ifferent forms of E"AL$A!E statement.
7H-L/-%7 7H-L/-%7 #6LCOD7 -L#O ;(L70#%-%/#
'H7N -AB -ND CAD 'H7N 188 -L#O G88G
imperati+e stmt imperati+e stmt
'H7N <D@B=/D A & 'H7N 0"8) -L#O G"2G
imperati+e stmt imperati+e stmt
'H7N O%H7$ 'H7N O%H7$
imperati+e stmt imperati+e stmt
7ND07H-L/-%7 7ND07H-L/-%7
7H-L/-%7 #6LCOD7 -L#O -AB 7H-L/-%7 #6LCOD7 -L#O %$/7
'H7N 188 -L#O %$/7 'H7N 188 -L#O -AB
imperati+e stmt imperati+e stmt
'H7N 0"8) -L#O ;-L#7 'H7N 0"8) -L#O <-/CA&=
imperati+e stmt imperati+e stmt
7ND07H-L/-%7 7ND07H-L/-%7
22& 9o: (o you come out of an E"AL$A!E statement.
-fter the execution of one of the when clauses. the control is automaticall passed on to
the next sentence after the 7H-L/-%7 statement! %here is no need of an extra code!
2/& In an E"AL$A!E statement? can I +i)e a com*,e> con(ition on a :'en c,ause.
Des!
24& #'at is a sco*e terminator. @i)e e>am*,es&
#cope terminator is used to mar9 the end of a +erb e!g! 7H-L/-%7. 7ND07H-L/-%7K (;.
7ND0(;!
26& 9o: (o you (o in,ine AERFORM.
37$;O$2 !!! !!!
7ND 37$;O$2
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 the
perform is a generic tpe of code <used from +arious other places in the program=. it
would be better to put the code in a separate para and use 37$;O$2 paraname rather
than in0line perform!
25& #'at is t'e (ifference -et:een CON!IN$E B NEC! SEN!ENCE .
CON%(N/7 is li9e a null statement <do nothing= . while N7B% #7N%7NC7
transfers control to the next sentence <LL= <- sentence is terminated b a period=
27& #'at (oes ECI! (o .
Does nothing L (f used. must be the onl sentence within a paragraph!
2<& Can I re(efine an CD%==E fie,( :it' a fie,( of CD2==E.
Des! $edefines Cust causes both fields to start at the same location! ;or exampleJ
81 '#0%O3 3(C B<1=
81 '#0%O30$7D $7D7;(N7# '#0%O3 3(C B<2=!
(f ou 2OH7 G12G to '#0%O30$7D.
D(#3L-D '#0%O3 will show 1 while
D(#3L-D '#0%O30$7D will show 12!
/=& Can I re(efine an CD2==E fie,( :it' a fie,( of CD%==E .
Des!
"1! #'at (o you (o to reso,)e SOC5 error.
Basicall ou need to correcting the offending data!
2an times the reason for #OC, is an un0initialiMed numeric item! 7xamine that
possibilit first!
2an installations pro+ide ou a dump for run time abends < it can be generated also b
calling some subroutines or O# ser+ices thru assembl language=! %hese dumps pro+ide
the offset of the last instruction at which the abend occurred! 7xamine the compilation
output B$7; listing to get the +erb and the line number of the source code at this offset!
%hen ou can loo9 at the source code to find the bug! %o get capture the runtime dumps.
ou will ha+e to define some datasets <#D#-BO/% etc = in the >CL!
(f none of these are helpful. use Cudgement and D(#3L-D to localiMe the source of error!
#ome installtion might ha+e batch program debugging tools! /se them!
/2& 9o: is si+n store( in AacFe( Decima, fie,(s an( 0one( Decima, fie,(s.
3ac9ed Decimal fieldsJ #ign is stored as a hex +alue in the last nibble <& bits = of the
storage!
Ioned Decimal fieldsJ -s a default. sign is o+er punched with the numeric +alue stored in
the last bite!
//& 9o: is si+n store( in a com*/ fie,(.
(t is stored in the last nibble! ;or example if our number is @188. it stores hex 8C in the
last bte. hex 1C if our number is 181. hex 2C if our number is 182. hex 1D if the
number is 0181. hex 2D if the number is 0182 etc!!!
/4& 9o: is si+n store( in a COMA fie,( .
(n the most significant bit! Bit is on if 0+e. off if @+e!
/6& #'at is t'e (ifference -et:een COMA B COMA/ .
CO23 is a binar storage format while CO230" is pac9ed decimal format!
/8& #'at is COMA%. COMA2.
CO2301 0 #ingle precision floating point! /ses & btes!
CO2302 0 Double precision floating point! /ses 4 btes!
/5& 9o: (o you (efine a )aria-,e of COMA%. COMA2.
No picture clause to be gi+en! 7xample 81 '#0H-$ /#-?7 CO2301!
/7& 9o: many -ytes (oes a S<D5E COMA/ fie,( occu*y .
'ill ta9e & btes! #ign is stored as hex +alue in the last nibble!
?eneral formula is (N%<<n/2= @ 1==. where nA, in this example!
/<& 9o: many -ytes (oes a S<D5E SI@N !RAILIN@ SEAARA!E fie,( occu*y .
'ill occup 4 btes <one extra bte for sign=!
4=& 9o: many -ytes :i,, a S<D7E COMA fie,( occu*y .
& btes!
4%& #'at is t'e ma>imum )a,ue t'at can -e store( in S<D7E COMA.
55555555
42& #'at is COMA SGNC.
Causes the item to be aligned on natural boundaries! Can be #DNCH$ON(I7D L7;% or
$(?H%!
;or binar data items. the address resolution is faster if the are located at word
boundaries in the memor! ;or example. on main frame the memor word siMe is & btes!
%his means that each word will start from an address di+isible b &! (f m first +ariable is
x<"= and next
one is s5<&= comp. then if ou do not specif the #DNC clause. #5<&= CO23 will start
from bte " < assuming that it starts from 8 =! (f ou specif #DNC. then the binar data
item will start from address &! Dou might see some wastage of memor. but the access to
this
computational field is faster!
4/& #'at is t'e ma>imum 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,,o:in+ fi,e formats from COBOL *ro+rams:
;ixed Bloc9 ;ile 0 /se O$?-N(#-%(ON (# #76/7N%(-L! /se $7CO$D(N? 2OD7 (#
;. BLOCF CON%-(N# 8 !
;ixed /nbloc9ed 0 /se O$?-N(#-%(ON (# #76/7N%(-L! /se $7CO$D(N? 2OD7 (#
;. do not use BLOCF CON%-(N#
Hariable Bloc9 ;ile 0 /se O$?-N(#-%(ON (# #76/7N%(-L! /se $7CO$D(N? 2OD7
(# H. BLOCF CON%-(N# 8! Do not code the & btes for record length in ;D ie >CL rec
length will be max rec length in pgm @ &
Hariable /nbloc9ed 0 /se O$?-N(#-%(ON (# #76/7N%(-L! /se $7CO$D(N? 2OD7
(# H. do not use BLOCF CON%-(N#! Do not code & btes for record length in ;D ie >CL
rec length will be max rec length in pgm @ &!
7#D# H#-2 file 0 /se O$?-N(#-%(ON (# #76/7N%(-L!
F#D# H#-2 file 0 /se O$?-N(#-%(ON (# (ND7B7D. $7CO$D F7D (#. -L%7$N-%7
$7CO$D F7D (#
$$D# ;ile 0 /se O$?-N(#-%(ON (# $7L-%(H7. $7L-%(H7 F7D (#
3rinter ;ile 0 /se O$?-N(#-%(ON (# #76/7N%(-L! /se $7CO$D(N? 2OD7 (# ;.
BLOCF CON%-(N# 8! </se $7C;2A;B- in >CL DCB=!
46& #'at are (ifferent fi,e OAEN mo(es a)ai,a-,e in COBOL.
Open for (N3/%. O/%3/%. (0O. 7B%7ND!
48& #'at is t'e mo(e in :'ic' you :i,, OAEN a fi,e for :ritin+.
O/%3/%. 7B%7ND
45& In t'e JCL? 'o: (o you (efine t'e fi,es referre( to in a su-routine .
#uppl the DD cards Cust 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 rewrite<record length must be same=. but not delete!
4<& #'at is fi,e status <2.
Logic error! e!g!. a file is opened for input and an attempt is made to write to it!
6=& #'at is fi,e status /< .
2ismatch in L$7CL or BLOCF#(I7 or $7C;2 between our COBOL pgm : the >CL <or
the dataset label=! Dou will get file status "5 on an O37N!
6%& #'at is Static?Dynamic ,inFin+ .
(n static lin9ing. the called subroutine is lin90edited into the calling program . while in
dnamic lin9ing. the subroutine : the main program will exist as separate load modules!
Dou choose static/dnamic lin9ing b choosing either the DDN-2 or NODDN-2 lin9 edit
option! <7+en if ou choose NODDN-2. a C-LL identifier <as opposed to a C-LL literal=.
will translate to a DDN-2(C call=!
- staticall called subroutine will not be in its initial state the next time it is called unless
ou explicitl use (N(%(-L or ou do a C-NC7L! - dnamicall called routine will alwas
be in its initial state!
62& #'at is AMODED24E? AMODED/%E? RMODED24E an( RMODEDANGE. D a**,ica-,e to
on,y
M"S;ESA Enter*rise Ser)erE&
%hese are compile/lin9 edit options!
-2OD7 0 -ddressing mode! $2OD7 0 $esidenc mode!
-2OD7<2&= 0 2& bit addressing! -2OD7<"1= 0 "1 bit addressing! -2OD7<-ND= 0
7ither 2& bit or "1 bit addressing depending on $2OD7!
$2OD7<2&= 0 $esides in +irtual storage below 1* 2eg line! /se this for "1 bit
programs that call 2& bit programs! <O#/H# Cobol pgms use 2& bit addresses
onl=!
$2OD7<-ND= 0 Can reside abo+e or below 1* 2eg line!
6/& #'at com*i,er o*tion :ou,( you use for (ynamic ,inFin+.
DDN-2!
64& #'at is SSRAN@E? NOSSRAN@E .
%hese are compiler options w!r!t subscript out of range chec9ing! NO##$-N?7 is the
default and if chosen. no run time error will be flagged if our index or subscript goes out
of the permissible range!
66& 9o: (o you set a return co(e to t'e JCL from a COBOL *ro+ram.
2o+e a +alue to $7%/$N0COD7 register! $7%/$N0COD7 should not be declared in
our program!
68& 9o: can you su-mit a Io- from COBOL *ro+rams.
'rite >CL cards to a dataset with
//xxxxxxx #D#O/%A<-.(N%$D$= where G-G is output class. and dataset should be opened
for output in the program! Define a 48 bte record laout for the file!
65& #'at are t'e (ifferences -et:een OS "S COBOL an( "S COBOL II.
O#/H# Cobol pgms can onl run in 2& bit addressing mode. H# Cobol (( pgms can run
either in 2& bit or "1 bit addressing modes!
$eport writer is supported onl in O#/H# Cobol!
/#-?7 (# 3O(N%7$ is supported onl in H# COBOL ((!
$eference modification egJ '#0H-$<1J2= is supported onl in H# COBOL ((!
7H-L/-%7 is supported onl in H# COBOL ((!
#cope terminators are supported onl in H# COBOL ((!
O#/H# Cobol follows -N#( ,& stds while H# COBOL (( follows -N#( 4) stds!
/nder C(C# Calls between H# COBOL (( programs are supported!
67& #'at are t'e ste*s you +o t'rou+' :'i,e creatin+ a COBOL *ro+ram e>ecuta-,e.

DB2 precompiler <if embedded sEl used=. C(C# translator <if C(C# pgm=. Cobol compiler.
Lin9 editor!
(f DB2 program. create plan b binding the DB$2s!
6<& Can you ca,, an OS "S COBOL *+m from a "S COBOL II *+m .
(n non0C(C# en+ironment. it is possible! (n C(C#. this is not possible!

#'at is t'e function of DD DISA *arameter. JCL
<1= %ells the sstem what to do with the dataset following normal termination of the step
<2= Describes the status of the dataset
<"= %ells the sstem what to do with the dataset following abnormal termination of the step
D4E A,, of t'e a-o)e
2E 9o: is t'e recor( format of an out*ut (ataset s*ecifie(.
<1= $7CO$? parameter
<2= #%O$CL-# parameter
D/E RECFM *arameter
<&= None of the abo+e
/E #'at is t'e *ur*ose of DD J statement in JCL.
<1= Begins an input data prompt at the sstem console
D2E Be+ins an instream (ataset
<"= 2ar9s the end of a command stream
<&= (ncludes all datasets within a naming pattern
4E A DD statement 'as 2 ty*es of *arameters& Name t'em .
D%E Aositiona,? Key:or(
<2= Feword. Control
<"= Dnamic. #tatic
<&= Named. Dnamic
6E #'at is t'e function of JOB statement in JCL .
<1= 2ar9s the end of a Cob
<2= 2ar9s the beginning of an instream procedure
D/E MarFs t'e -e+innin+ of a Io- B assi+ns a name to t'e Io-
<&= -ssigns an execution priorit to a Cob
8E 9o: can a Io- sen( a status messa+e to a !SO user at t'e com*,etion of a Io- .
<1= #%-%/#
D2E NO!IFG
<"= 7ND2#?
<&= /#7$
5E #'at is t'e function of a DD statement .
D%E I(entifies B (escri-es a (ataset
<2= Delimits a DO loop
<"= 2ar9s the start of a declarati+e section
<&= Delimits the start of an inline include section
7E #'en out*ut (ataset s*ace is reLuire(? :'at Luantity cate+ories are use( .
D%E Arimary? Secon(ary? Directory
<2= -ddress. /nits. CON%(? or -L#
<"= Displacement and length
<&= 2egabtes. Filobtes and Btes
<E #'at statement marFs t'e -e+innin+ of a Io- ste*M assi+ns a name to t'e ste*M
i(entifies t'e *ro+ram or cata,o+ue( or instream *roce(ure to -e e>ecute( in t'e ste* .
<1= #%-$%
<2= $/N
D/E ECEC
&! ?O
%=E 9o: can unuse( s*ace a,,ocation -e returne( to t'e system :'en a (ataset is c,ose( .
<1= $7%/$N
D2E RLSE
<"= CON%(?
<&= CLO#7
%%E Can an in(i)i(ua, ste* -e restricte( from usin+ a,, t'e Io-123s a,,o:e( CA$ time .
D%E Ges
<2= No
<"= Onl in Catalogued 3rocedure
<&= %hrough the #%73%(27 parameter
%2E #'ere can *ro+ram c'ecF*oints -e store( for use in a restart .
<1= CHCF3O(N% DD statement
D2E SGSC9K DD statement
<"= CHFO/% DD statement
<&= CH7CF or DD statement
%/E 9o: can t'e (is*osition of sysout (atasets -e set for an entire Io-stream .
D%E SGSO$! *arameter
<2= O/%3/% parameter
<"= D7;-/L% parameter
<&= D7#% 9eword
%4E #'at statement marFs t'e en( of an instream or Cata,o+ue( *roce(ure .
<1= #%$7-2
<2= #7%
<"= 3$OC
D4E AEND
%6E #'at is t'e function of DD name *arameter :it' a 2 *art structureM Au(it&Re*ort .
<1= O+erride the -udit DD statement in the report
D2E O)erri(e t'e Re*ort DD statement in t'e Au(it *roce(ure
<"= Concatenate a dataset onto a DD statement in a called module
<&= Delete the -udit DD statement in the $eport
%8E #'ic' DD *arameters are reLuire( .
D%E A,, *arameters B Key:or(s are o*tiona,
<2= Dsname. #3-C7. $7C;2
<"= Dsname. #3-C7. /N(%
<&= Dsname. D(#3. #3-C7
%5E 9o: can an instream (ataset -e terminate(.
<1= //
<2= //N
D/E ;J
<&= None of the abo+e
%7E #'at is t'e function of t'e DD DCB Fey:or(.
D%E Be+ins t'e su-*arameters of t'e DCB
<2= Begins the D-#D control bloc9
<"= 2ar9s the close of the DCB
<&= 2odifies the record tpe parameters
%<E #'at is t'e ma>imum ,en+t' of a sin+,e ,ine of JCL .
D%E 5% -ytes
<2= *8 btes
<"= )) btes
<& = 48 btes
2=E #'at is t'e *ur*ose of DD D$MMG statement .
<1= 2ar9s a deleted DD statement
<2= Begins an interpreted command stream
D/E S*ecifies no s*ace a,,ocation B no (is*osition *rocessin+
<&= #uppress command processing
2%E Many JCL statements contain s*ecific )a,ues (esi+ne( to (irect B contro, t'e
e>ecution of t'e statement& #'at are t'ese fie,(s ca,,e( .
<1= Lin9age Hariables
D2E Aarameters
<"= Control Libraries
<&= (ncludes
22E #'en s*ace is a,,ocate( for an out*ut (ataset? :'at units can -e use(.
<1= Dis9s
<2= 2egabtes
D/E Cy,in(ers? !racFs? B,ocFs
<&= Btes
2/E #'at is t'e format of comment statement .
<1= //
D2E ;;J
<"= /N
<& = None of the abo+e
24E A DD statement consists of 4 fie,(s& Name t'em :
<1= Name. DD. #pace. De+ice
<2= ;ormat. Name. DD. #pace
<"= DD. parameter. de+ice. format
D4E Name? DD? *arameter? comments
26E #'at DD statement is use( to su**,y t'e name of a (ataset .
<1= Name
D2E Dsname
<"= Label
<&= ;ile
28& #'at is t'e *ur*ose of t'e 123DD KEGLEN123 *arameter.
<1= #pecif the length of a data set 9e in btes
<2= O+erride the 9e length of an #2# defined H#-2 dataset
<"= O+erride the 9e length specified in the dataset label
A,, of t'e a-o)e
25& #'at is t'e function of t'e S!EALIB DD statement.
<1= (dentif a librar to be searched for programs named in the 7B7C statement
<2= (dentif a librar containing executable Cob steps
<"= O+erride the sstem step librar within a Cob stream
D4E A,, of t'e a-o)e
27& 9o: can return co(es -e teste( -efore e>ecution of a Io- ste*.
<1= %hrough the $C 9eword
<2= %hrough the COD7 9eword
D/E !'rou+' t'e COND Fey:or(
<&= %hrough the $7%/$NCD 9eword
2<& #'at is concatenatin+.
<1= O+erriding or adding procedures
D2E Lo+ica,,y connectin+ in*ut (atasets
<"= O+erriding a called 3$OC dsname
<&= -ll of the abo+e
/=& 9o: can )a,ues -e *asse( from t'e Io- stream to an e>ecuta-,e *ro+ram.
D%E !'rou+' t'e AARM Fey:or(
<2= %hrough the H-L/7 parameter
<"= %hrough the 3?2 parameter
<&= -ll of the abo+e
/%& Must ta*e (ataset (efinitions inc,u(e "OLNSER s*ecifications.
<1= Des
<2= No
D/E On,y for uncata,o+e( (atasets
<&= Onl for cataloged datasets
/2& #'at is t'e function of ;;JCLLIB statement.
<1= (dentifies the source of the >CL commands
<2= 3oints to the sstem software librar
<"= 2ar9s the beginning of the in0stream >CL
D4E I(entifies t'e ,i-raries t'at t'e system :i,, searc' for inc,u(e +rou*s or *roce(ures
name( in ECEC statements
//& #'at *arameter of t'e Io- statement is use( to ,imit t'e CA$ time consume( -y t'e
Io-.
<1= $/N%(27
D2E !IME
<"= L(2(%
<& = 7B7C2-B
/4& #'at statement marFs t'e -e+innin+ of an instream or cata,o+e( *roce(ure in JCL
an( assi+ns (efau,t
+alues to parameters defined in the procedure
<1= #%$7-2
<2= #7%
D/E AROC
<&= 37ND
/6& 9o: can a sto**e( Io- -e starte( a+ain. JCL
<1= %hrough the $7%/$N parameter
<2= %hrough the #%-$%/3 parameter
D/E !'rou+' t'e RES!AR! *arameter
<&= %hrough the CH7CF3N% 9eword
/8& In or(er to continue a Io- after a return co(e of %2 in ste*%? :'at t'e ste*2 ECEC
statement inc,u(e.
<1= CON%(N/7
D2E COND N D%2?NEE
<"= COND A <12.?7=
<&= COND A <12.76=
/5& In SMS (atasets? :'at is t'e function of t'e 123DD M@M!CLAS123 Fey:or(.
D%E S*ecify a mana+ement c,ass for a ne: (ataset
<2= Loo9up a storage profile from the class librar
<"= Begin a storage class definition bloc9
<&= -lters the default storage profile for the dataset
/7& 9o: can t'e su-mittin+ user123s RACF aut'ority -e o)erri((en in a Io- stream.
<1= %hrough the /#7$ parameter
D2E !'rou+' t'e $SER an( AASS#ORD *arameter
<"= B notifing the console operation to o+erride the authorit
<&= %hrough the $-C; parameter
/<& #'at *arameters can -e use( to ,imit t'e num-er of recor(s :ritten to a SGSO$!
(ataset .
<1= L(2(%
D2E O$!LIM
<"= #(I7
<&= 2-B
4=& #'at statement can -e use( to sen( (ata to anot'er M"S JES/ no(e .
<1= L(NF
<2= CONN7C%
D/E CMI!
<&= #7ND
4%& #'at *arameter (irects t'e out*ut of t'e Io- ,o+ (ataset .
<1= >OBLO?
D2E MS@CLASS
<"= 2#?L7H7L
<&= #D#LO?
42& 9o: can a Io-123s e>ecution *riority -e mo(ifie( .
<1= 3$(6%D parameter
D2E AR!G *arameter
<"= >OBCL-## parameter
<&= $/N%(27 parameter
4/& 9o: can t'e attri-utes of one SMS (ataset -e co*ie( to anot'er (ataset .
D%E $sin+ DD ,iFe *arameter
<2= /sing DD Cop parameter
<"= /sing DD $efer parameter
<&= -ttributes cannot be copied within #2# datasets
44& #'at is t'e function of ;;CN!L statement .
D%E MarFs t'e -e+innin+ of one or more *ro+ram contro, statements
<2= (dentifies the control card librar
<"= Delimits the 3$OC control statements
<&= None of the abo+e
46& If a DO%E +eneration (ataset is create( in t'e first ste* of a Io-? 'o: can it -e
reference( in ,ater ste*s of t'e same Io- for in*ut.
<1= -s the <8= generation
D2E As t'e DO%E +eneration
<"= -s the <01= generation
<&= 'ithout the generation number
48& In SMS (atasets? :'at is t'e function of t'e DD A"@REC Fey:or( .
<1= #pecifies a+erage length of records in a file
D2E S*ecifies t'e mu,ti*,ier to -e use( for *rimary B secon(ary s*ace a,,ocation
<"= Directs the sstem to allocate space based on a+erage record length
<&= #pecifies word bloc9ing factor
45& 9o: can a JES/ o*erator comman( -e entere( t'rou+' t'e Io-stream.
<1= %hrough the O37$-%O$ statement
<2= %hrough the CO22-ND statement
D/E !'rou+' t'e ;;JJ statement
<&= %hrough the console statement
47& !o connect EBCDIC recor(s to ASCII (urin+ :rite *rocess? :'at DCB su-
*arameter is use( .
<1= 7BCD(C A NON7 <2= -#C(( A -LL <"= %$-N#L-%7 A -LL <&= OA!CODE N Q
4<& If a +eneration (ata set is s*ecifie( as in*ut :it'out t'e +eneration num-er? :'at
:i,, t'e in*ut to t'e DD .
<1= the most recent generation created
<2= the earliest generation created
D/E a concatenation of a,, t'e cata,o+e( +enerations
&! a Ccl error will be returned to the Cob
/6& 9o: can -uffers -e assi+ne( to a DCB .
<1= %hrough the B/;2-B subparameter
<2= %hrough the B/;O/% subparameter
<"= %hrough the B/; subparameter
4& !'rou+' t'e B$FNO su-*arameter
/6& #'at is t'e function of t'e 123DD MODIFG123 *arameter .
<1= o+errides the L$7CL of a cataloged dataset
D2E s*ecify a co*ymo(ification mo(u,e to format a *rinte( (ataset
<"= o+errides the bloc9siMe of a cataloged dataset
<&= add records to an existing dataset
/8& #'at is t'e *refi> c'aracter for sym-o,ic *arameter .
<1= O D2E B <"= P <&= QR
/5& #'at is t'e *ur*ose of RE@ION Fey :or( .
<1= specifies the amount of space reEuired b a step
<2= specifies the amount of space reEuired b a Cob
D/E -ot' of t'e a-o)e
<&= none of the abo+e
/7& #'at is a system (ata set cata,o+ .
<1= a reference to the naming standards for datasets
<2= a list of 2H# reference libraries
D/E a ,ist of (atasets a)ai,a-,e to M"S a,on+ :it' t'e ,ocation (ata
<&= the original installation datasets for >CL
/<& If -ot' t'e JOBCA! B S!EACA! statements are co(e( in a ste*? :'ic' :i,, -e
e>ecute(.
<1= >OBC-%
D2E S!EACA!
"! the one coded first in the >CL stream
<&= both the statements will be executed in seEuence
DB2 IN!ER"IE# Q$ES!IONS AND ANS#ERS

%E 9o: :ou,( you fin( out t'e tota, num-er of ro:s in a DB2 ta-,e.
/se #7L7C% CO/N%<N= !!! in db2 Euer
DB2 IN!ER"IE# Q$ES!IONS
DB2 SQL IN!ER"IE# Questions
2E 9o: (o you e,iminate (u*,icate )a,ues in DB2 SELEC! .
/se #7L7C% D(#%(NC% !!! in db2 Euer
/E 9o: (o you se,ect a ro: usin+ in(e>es in DB2.
#pecif the indexed columns in the 'H7$7 clause of db2 Euer!
4E 9o: (o you fin( t'e ma>imum )a,ue in a co,umn in (-2.
/se #7L7C% 2-B<!!!= !! in db2 Euer
6E 9o: (o you retrie)e t'e first 6 c'aracters of FIRS!NAME co,umn of
DB2 ta-,e EMA .
#6L 6uer J #7L7C% #/B#%$<;($#%N-27.1.)= ;$O2 723K
8E #'at are a++re+ate functions.
Bulit0in mathematical functions for use in #7L7C% clause!
5E Can you use MAC on a C9AR co,umn.
D7#!
7E My SQL statement SELEC! A"@DSALARGE FROM EMA yie,(s
inaccurate resu,ts& #'y.
Because #-L-$D is not declared to ha+e N/LLs and the emploees for
whom the salar is not 9nown are also counted!
<E 9o: (o you concatenate t'e FIRS!NAME an( LAS!NAME from EMA
ta-,e to +i)e a com*,ete name.
#7L7C% ;($#%N-27 SS TUV TUV SS L-#%N-27 ;$O2 723K
%=E #'at is t'e use of "AL$E function.
1! -+oid 0+e #6LCOD7s b handling nulls and Meroes in computations
2! #ubstitute a numeric +alue for an nulls used in computation
%%E #'at is $NION?$NION ALL. 123
/N(ON J eliminates duplicates
/N(ON -LLJ retains duplicates
Both these are used to combine the results of different #7L7C% statements!
#uppose ( ha+e fi+e #6L #7L7C% statements connected b /N(ON//N(ON
-LL. how man times should ( specif /N(ON to eliminate the duplicate
rows1 0
Once!
%2E #'at is t'e restriction on usin+ $NION in em-e((e( SQL.
(t has to be in a C/$#O$!
%/E In t'e #9ERE c,ause :'at is BE!#EEN an( IN. 123
B7%'77N supplies a range of +alues while (N supplies a list of +alues!
%4E Is BE!#EEN inc,usi)e of t'e ran+e )a,ues s*ecifie(. 123
Des!
%6E #'at is PLIKEP use( for in #9ERE c,ause. #'at are t'e :i,(car(
c'aracters. 123
L(F7 is used for partial string matches! TUVOTUV < for a string of an
character = and TUVWTUV <for an single character = are the two wild card
characters!
%8E #'en (o you use a LIKE statement.
%o do partial search e!g! to search emploee b name. ou need not specif
the complete nameK using L(F7. ou can search for partial string matches!
%5E #'at is t'e meanin+ of un(erscore D 123Q123 E in t'e LIKE
statement. 123
2atch for an single character!
%7E #'at (o you accom*,is' -y @RO$A BG &&& 9A"IN@ c,ause. 123
?$O/3 BD partitions the selected rows on the distinct +alues of the column
on which ou group b!
H-H(N? selects ?$O/3s which match the criteria specified
%<E Consi(er t'e em*,oyee ta-,e :it' co,umn AROJEC! nu,,a-,e& 9o:
can you +et a ,ist of em*,oyees :'o are not assi+ne( to any *roIect.
#7L7C% 723NO
;$O2 723
'H7$7 3$O>7C% (# N/LLK
2=E #'at is t'e resu,t of t'is Luery if no ro:s are se,ecte(:
#7L7C% #/2<#-L-$D=
;$O2 723
'H7$7 6/-LATUV2#CTUVK
N/LL
2%E #'y SELEC! J is not *referre( in em-e((e( SQL *ro+rams.
;or three reasonsJ
(f the table structure is changed < a field is added =. the program will ha+e to
be modified
3rogram might retrie+e the columns which it might not use. leading on (/O
o+er head!
%he chance of an index onl scan is lost!
'hat are correlated subEueries1 0
- subEuer in which the inner < nested = Euer refers bac9 to the table in the
outer Euer! Correlated subEueries must be e+aluated for each Eualified row
of the outer Euer that is referred to!
22E #'at are t'e issues re,ate( :it' corre,ate( su-Lueries. 123
111
DB2 Inter)ie: Questions AAR! II
2/E #'at is a cursor. :'y s'ou,( it -e use(. 123
Cursor is a programming de+ice that allows the #7L7C% to find a set of rows
but return them one at a time!
Cursor should be used because the host language can deal with onl one
row at a time!
24E 9o: :ou,( you retrie)e ro:s from a DB2 ta-,e in em-e((e( SQL.
123
7ither b using the single row #7L7C% statements. or b using the
C/$#O$!
-part from cursor. what other was are a+ailable to ou to retrie+e a row from
a table in embedded #6L1 0
#ingle row #7L7C%s!
26E #'ere :ou,( you s*ecify t'e DECLARE C$RSOR statement. 123
#ee answer to next Euestion!
28E 9o: (o you s*ecify an( use a cursor in a COBOL *ro+ram. 123
/se D7CL-$7 C/$#O$ statement either in wor9ing storage or in procedure
di+ision<before open cursor=. to specif the #7L7C% statement! %hen use
O37N. ;7%CH rows in a loop and finall CLO#7!
25E #'at 'a**ens :'en you say OAEN C$RSOR.
(f there is an O$D7$ BD clause. rows are fetched. sorted and made
a+ailable for the ;7%CH statement! Other wise simpl the cursor is placed on
the first row!
27E Is DECLARE C$RSOR e>ecuta-,e.
No!
2<E Can you 'a)e more t'an one cursor o*en at any one time in a
*ro+ram . 123
Des!
/=E #'en you COMMI!? is t'e cursor c,ose(. (rona (-2 inter)ie:
Luestions
Des!
/%E 9o: (o you ,ea)e t'e cursor o*en after issuin+ a COMMI!. D for
DB2 2&/ or a-o)e on,y E
/se '(%H HOLD option in D7CL-$7 C/$#O$ statement! But. it has not
effect in psuedo0con+ersational C(C# programs!
/2E @i)e t'e COBOL (efinition of a "ARC9AR fie,(&
A "ARC9AR co,umn REMARKS :ou,( -e (efine( as fo,,o:s:
!!!
18 $72-$F#!
&5 $72-$F#0L7N 3(C #5<&= /#-?7 CO23!
&5 $72-$F#0%7B% 3(C B<1528=!
//E #'at is t'e *'ysica, stora+e ,en+t' of eac' of t'e fo,,o:in+ DB2
(ata ty*es:
DA!E? !IME? !IMES!AMA.
D-%7J &btes
%(27J "btes
%(27#%-23J 18btes
/4E #'at is t'e COBOL *icture c,ause of t'e fo,,o:in+ DB2 (ata ty*es:
DA!E? !IME? !IMES!AMA.
D-%7J 3(C B<18=
%(27 J 3(C B<84=
%(27#%-23J 3(C B<2*=
/6E #'at is t'e COBOL *icture c,ause for a DB2 co,umn (efine( as
DECIMALD%%?2E. Rames'
3(C #5<5=H55 CO230"!
NoteJ (n D7C(2-L<11.2=. 11 indicates the siMe of the data tpe and 2
indicates the precision!
/8E #'at is DCL@EN .
DeCLarations ?7NeratorJ used to create the host language cop boo9s for
the table definitions! -lso creates the D7CL-$7 table!
/5E #'at are t'e contents of a DCL@EN.
1! 7B7C #6L D7CL-$7 %-BL7 statement which gi+es the laout of the
table/+iew in terms of DB2 datatpes!
2! - host language cop boo9 that gi+es the host +ariable definitions for the
column names!
/7E 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 the
pre0compile stage itself < because of the D7CL-$7 %-BL7 =! DCL?7N being
a tool. would generate accurate host +ariable definitions for the table
reducing chances of error!
/<E Is DECLARE !ABLE in DCL@EN necessary. #'y it use(.
(t not necessar to ha+e D7CL-$7 %-BL7 statement in DCL?7N! %his is
used b the pre0compiler to +alidate the table0name. +iew0name. column
name etc!. during pre0compile!
4=E #i,, *recom*i,e of an DB2COBOL *ro+ram -om-? if DB2 is (o:n.
No! Because the precompiler does not refer to the DB2 catalogue tables!
4%E 9o: is a ty*ica, DB2 -atc' *+m e>ecute( .
1! /se D#N utilit to run a DB2 batch program from nati+e %#O! -n example
is shownJ
D#N #D#%72<D#3"=
$/N 3$O?$-2<7DD&,8BD= 3L-N<7DD&,8BD= L(B<G7D
81%!OB>!LO-DL(BG=
7ND
2! /se (F>7;%81 utilit program to run the abo+e D#N command in a >CL!
-ssuming that a siteTUVs standard is that pgm name A plan name. what is
the easiest wa to find out which pgms are affected b change in a tableTUVs
structure 1
6uer the catalogue tables #D#3L-ND73 and #D#3-CFD73!
42E Name some fie,(s from SQLCA&
#6LCOD7. #6L7$$2. #6L7$$D
4/E 9o: can you LuicF,y fin( out t'e R of ro:s u*(ate( after an u*(ate
statement.
Chec9 the +alue stored in #6L7$$D<"=!
44E #'at is ECALAIN. 123 (rona Luestions
7B3L-(N is used to displa the access path as determined b the optimiMer
for a #6L statement! (t can be used in #3/;( <for single #6L statement = or
in B(ND step <for embedded #6L =!
46E #'at (o you nee( to (o -efore you (o ECALAIN.
2a9e sure that the 3L-NW%-BL7 is created under the -/%H(D!
48E #'ere is t'e out*ut of ECALAIN store(. 123
(n userid!3L-NW%-BL7
45E ECALAIN 'as out*ut :it' MA!C9COLS N =& #'at (oes it mean. 123
a nonmatching index scan if -CC7##%D37 A (!
47E 9o: (o you (o t'e ECALAIN of a (ynamic SQL statement.
1! /se #3/;( or 62; to 7B3L-(N the dnamic #6L statement
2! (nclude 7B3L-(N command in the embedded dnamic #6L statements
4<E 9o: (o you simu,ate t'e ECALAIN of an em-e((e( SQL statement
in SA$FI;QMF. @i)e an e>am*,e :it' a 'ost )aria-,e in #9ERE c,ause&E
/se a Euestion mar9 in place of a host +ariable < or an un9nown +alue =! e!g!
#7L7C% 723WN-27
;$O2 723
'H7$7 723W#-L-$D X 1
DB2 Inter)ie: Questions AAR! III :::&mainframe+uruFu,&com
6=E #'at are t'e iso,ation ,e)e,s *ossi-,e . 123
C#J Cursor #tabilit
$$J $epeatable $ead
6%E #'at is t'e (ifference -et:een 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 transaction
62E #'ere (o you s*ecify t'em .
(#OL-%(ON L7H7L is a parameter for the bind process!
6/E #'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 with
that page1
No!
64E #'at are t'e )arious ,ocFin+ ,e)e,s a)ai,a-,e.
3-?7. %-BL7. %-BL7#3-C7
66E 9o: (oes DB2 (etermine :'at ,ocFsiHe 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 -ND is specified. DB2 usuall chooses a loc90siMe of 3-?7
68E #'at are t'e (isa()anta+es of AA@E ,e)e, ,ocF. RAMES9
:::&mainframetutoria,s&com
High resource utiliMation if large updates are to be done
65E #'at is ,ocF esca,ation.
3romoting a 3-?7 loc90siMe to table or tablespace loc90siMe when a
transaction has acEuired more loc9s than specified in N/2LF%#! Loc9s
should be ta9en on obCects in single tablespace for escalation to occur!

67E #'at are t'e )arious ,ocFs a)ai,a-,e.
#H-$7. 7BCL/#(H7. /3D-%7
6<E Can I use LOCK !ABLE on a )ie:.
No! %o loc9 a +iew. ta9e loc9 on the underling tables!
8=E #'at is AL!ER . 123
#6L command used to change the definition of DB2 obCects!
*1= 'hat is a DB$2. 3L-N 1
DB$2J DataBase $eEuest 2odule. has the #6L statements extracted from
the host language program b the pre0compiler!
3L-NJ - result of the B(ND process! (t has the executable code for the #6L
statements in the DB$2!
82E #'at is ACQ$IRE;RELEASE in BIND.
Determine the point at which DB2 acEuires or releases loc9s against table
and tablespaces. including intent loc9s!
8/E #'at e,se is t'ere in t'e ALAN a*art from t'e access *at'. 123
3L-N has the executable code for the #6L statements in the host program
84E #'at 'a**ens to t'e ALAN if in(e> use( -y it is (ro**e(.
3lan is mar9ed as in+alid! %he next time the plan is accessed. it is rebound!
86E #'at are AACKA@ES . 123
%he contain executable code for #6L statements for one DB$2!
88E #'at are t'e a()anta+es of usin+ a AACKA@E.
1! -+oid ha+ing to bind a large number of DB$2 members into a plan
2! -+oid cost of a large bind
"! -+oid the entire transaction being una+ailable during bind and automatic
rebind of a plan
&! 2inimiMe fallbac9 complexities if changes result in an error!
85E #'at is a co,,ection.
a user defined name that is the anchor for pac9ages! (t has not phsical
existence! 2ain usage is to group pac9ages!
(n #3/;( suppose ou want to select max! of 1888 rows . but the select
returns onl 288 rows!
87E #'at are t'e 2 sL,co(es t'at are returne(. 123
188 < for successful completion of the Euer =. 8 <for successful CO22(% if
-/%OCO22(% is set to Des=!
8<E 9o: :ou,( you *rint t'e out*ut of an SQL statement from SA$FI.
123
3rint the output dataset!
5=E 9o: (o you *u,, u* a Luery :'ic' :as *re)ious,y sa)e( in QMF .
123
11
5%E Lot of u*(ates 'a)e -een (one on a ta-,e (ue to :'ic' in(e>es
'a)e +one 'ay:ire& #'at (o you (o. 123
Loo9s li9e index page split has occurred! DO a $7O$? of the indexes!
52E #'at is (ynamic SQL. 123
Dnamic #6L is a #6L statement created at program execution time!

5/E #'en is t'e access *at' (etermine( for (ynamic SQL. 123
-t run time. when the 3$73-$7 statement is issued!
54E 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(. 123
3robabl $/N #%-%# is not done and the program is using a wrong index
due to incorrect stats!
3robabl $/N#%-%# is done and optimiMer has chosen a wrong access path
based on the latest statistics!
DB2 (nter+iew 6uestions 0 3-$% (H www!mainframeguru9ul!com
56E 9o: (oes DB2 store N$LL *'ysica,,y.
as an extra0bte prefix to the column +alue! phsicall. the nul prefix is Hex
TUV88TUV if the +alue is present and Hex TUV;;TUV if it is not!
58E 9o: (o you retrie)e t'e (ata from a nu,,a-,e co,umn. 123
/se null indicators! #ntax !!! (N%O JHO#%H-$JN/LL(ND
55E #'at is t'e *icture c,ause of t'e nu,, in(icator )aria-,e. 123
#5<&= CO23!
57E #'at (oes it mean if t'e nu,, in(icator 'as %? =? 2. 123
01 J the field is null
8 J the field is not null
02 J the field +alue is truncated
5<E 9o: (o you insert a recor( :it' a nu,,a-,e co,umn.
%o insert a N/LL. mo+e 01 to the null indicator
%o insert a +alid +alue. mo+e 8 to the null indicator
7=E #'at is R$NS!A!S. 123
- DB2 utilit used to collect statistics about the data +alues in tables which
can be used b the optimiMer to decide the access path! (t also collects
statistics used for space management! %hese statistics are stored in DB2
catalog tables!
7%E #'en :i,, you c'ose to run R$NS!A!S.
-fter a load. or after mass updates. inserts. deletes. or after $7O$?!
72E @i)e some e>am*,e of statistics co,,ecte( (urin+ R$NS!A!S.
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/E #'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 free
space! (t is used after hea+ updates. inserts and delete acti+it and after
segments of a segmented tablespace ha+e become fragmented!
74E #'at is IMA@ECOAG . 123
(t is full bac9up of a DB2 table which can be used in reco+er!
76E #'en (o you use t'e IMA@ECOAG. 123
%o ta9e routine bac9up of tables
-fter a LO-D with LO? NO
-fter $7O$? with LO? NO
78E #'at is COAG AENDIN@ 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! Dou cannot update this table! %o
remo+e the CO3D 37ND(N? status. ou ta9e an image cop or use $73-($
utilit!
75E #'at is C9ECK AENDIN@ .
'hen a table is LO-Ded with 7N;O$C7 NO option. then the table is left in
CH7CF 37ND(N? status! (t means that the LO-D utilit did not perform
constraint chec9ing!
77E #'at is Q$IESCE.
- 6/(7#C7 flushes all DB2 buffers on to the dis9! %his gi+es a correct
snapshot of the database and should be used before and after an
(2-?7CO3D to maintain consistenc!
7<E #'at is a c,usterin+ in(e> . 123
Causes the data rows to be stored in the order specified in the index! -
mandator index defined on a partitioned table space!
<=E 9o: many c,usterin+ in(e>es can -e (efine( for a ta-,e.
Onl one!
<%E #'at is t'e (ifference -et:een *rimary Fey B uniLue in(e> .
3rimar J a relational database constraint! 3rimar 9e consists of one or
more columns that uniEuel identif a row in the table! ;or a normaliMed
relation. there is one designated primar 9e!
/niEue indexJ a phsical obCect that stores onl uniEue +alues! %here can be
one or more uniEue indexes on a table!
<2E #'at is sL,co(e <22 .
-uthoriMation failure
</E #'at is sL,co(e 7%%.
#7L7C% statement has resulted in retrie+al of more than one row!
<4E #'at (oes t'e sL,co(e of 7%7 *ertain to. 123
%his is generated when the consistenc to9ens in the DB$2 and the load
module are different!
<6E Are )ie:s u*(atea-,e .
Not all of them! #ome +iews are updateable e!g! single table +iew with all the
fields or mandator fields! 7xamples of non0updateable +iews are +iews
which are Coins. +iews that contain aggregate functions<such as 2(N=. and
+iews that ha+e ?$O/3 BD clause!
<8E If I 'a)e a )ie: :'ic' is a Ioin of t:o or more ta-,es? can t'is )ie:
-e u*(atea-,e. 123
No!
<5E #'at are t'e 4 en)ironments :'ic' can access DB2 .
%#O. C(C#. (2# and B-%CH
<7E #'at is an inner Ioin? an( an outer Ioin .
(nner >oinJ combine information from two or more tables b comparing all
+alues that meet the search criteria in the designated column or columns of
on e table with all the clause in corresponding columns of the other table or
tables! %his 9ind of Coin which in+ol+e a match in both columns are called
inner Coins!
Outer Coin is one in which ou want both matching and non matching rows to
be returned! DB2 has no specific operator for outer Coins. it can be simulated
b combining a Coin and a correlated sub Euer with a /N(ON!
<<E #'at is FREEAA@E an( AC!FREE in !ABLESAACE creation.
3C%;$77J percentage of each page to be left free
;$773-?7J Number of pages to be loaded with data between each free
page
%==E #'at are sim*,e? se+mente( an( *artitione( ta-,e s*aces .
#imple %ablespaceJ
Can contain one or more tables
$ows from multiple tables can be interlea+ed on a page under the DB-s
control and maintenance
#egmented %ablespaceJ
Can contain one or more tables
%ablespace is di+ided into segments of & to *& pages in increments of &
pages! 7ach segment is dedicated to single table! - table can occup
multiple segments
3artitioned %ablespaceJ
Can contain one table
%ablespace is di+ided into parts and each part is put in a separate H#-2
dataset!
%=%E #'at is fi,ter factor.
one di+ided b the number of distinct +alues of a column!
%=2E #'at is in(e> car(ina,ity. 123
%he number of distinct +alues a column or columns contain!
%=/E #'at is a synonym .
#nonm is an alternate name for a table or +iew used mainl to hide the
leading Eualifier of a table or +iew!! - snonm is accessible onl b the
creator!
%=4E #'at is t'e (ifference -et:een SGNONGM an( ALIAS.
#DNOND2J is dropped when the table or tablespace is dropped! #nonm is
a+ailable onl to the creator!
-L(-#J is retained e+en if table or tablespace is dropped! -L(-# can be
created e+en if the table does not exist! (t is used mainl in distributed
en+ironment to hide the location info from programs! -lias is a global obCect :
is a+ailable to all!
%=6E #'at (o you mean -y NO! N$LL #I!9 DEFA$L!. #'en :i,, you
use it.
%his column cannot ha+e nulls and while insertion. if no +alue is supplied
then it wil ha+e Meroes. spaces or date/time depending on whether it is
numeric. character or date/time!
/se it when ou do not want to ha+e nulls but at the same time cannot gi+e
+alues all the time ou insert this row!
%=8E #'at (o you mean -y NO! N$LL. #'en :i,, you use it.
%he column cannot ha+e nulls! /se it for 9e fields!
%=5E #'en :ou,( you *refer to use "ARC9AR.
'hen a column which contains long text. e!g! remar9s. notes. ma ha+e in
most cases less than )8O of the maximum length!
%=7E #'at are t'e (isa()anta+es of usin+ "ARC9AR.
1! Can lead to high space utiliMation if most of the +alues are close to
maximum!
2! 3ositioning of H-$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!
%=<E 9o: (o I create a ta-,e MANA@ER D EMAR? MANA@ERE :'ere
MANA@ER is a forei+n Fey :'ic' references to EMAR in t'e same
ta-,e. @i)e t'e e>act DDL&
;irst C$7-%7 2-N-?7$ table with 723Y as the primar 9e! %hen -L%7$
it to define the foreign 9e!
'hen is the authoriMation chec9 on DB2 obCects done 0 at B(ND time or run
time1
-t run time!
%%=E #'at is au(itin+.
$ecording #6L statements that access a table! #pecified at table creation
time or through alter!
"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-2# is the -ccess 2ethod #er+ices program! Dou run the (DC-2# program and suppl -2#
commands thru #D#(N! <examples of -2# commands are D7L7%7. D7;(N7. $73$O etc!!=!
/& Can AMS comman(s -e run from t'e !SO *rom*t .
Des
4& Synta> of AMS mo(a, comman(s .
NoteJ these can be used onl under (DC-2# and not from the %#O prompt!
(; L-#%CC<or 2-BCC= X<or Z.A etc!!= +alue 0
%H7N 0
DO 0
command set <such as D7L7%7. D7;(N7 etc!!=
7L#7 0
DO 0
command set
L-#%CC 0 Condition code from the last function<such as delete= executed
2-BCC 0 2ax condition code that was returned b an of the pre+ functions
#7% is also a +alid -2# command! #7% L-#%CC <or 2-BCC= A +alue
%he maximum condition code is 1*! - cond code of & indicates a warning! - cond code of 4 is
usuall encountered on a D7L7%7 of a dataset that is not present!
6& $n(er IDCAMS ? mu,ti*,e functions can -e e>ecute(? eac' of :'ic' returns a con( co(e&
#'at :i,, -e t'e con(ition co(e returne( to t'e o*eratin+ system .
%he maximum condition code generated is returned as the condition code of the (DC-2# step!
8& #'at is Contro, Inter)a,? Contro, Area .
Control (nter+al is analogous to a phsical bloc9 for 6#-2 files! (t is the unit of i/o! 2ust be
between )12 btes to "2 9! /suall either 2F or &F! - larger control inter+al increases
performance for seEuential processing while the re+erse is true for random access! /nder C(C#
when a record is loc9ed. the entire C( gets loc9ed!
Control area is a group of control inter+als! C- is used during allocation! C- siMe is calculated
based on the allocation tpe <cl. trac9s or records= and can be max of 1 clinder
5& #'at is FREESAACE .
Coded in the D7;(N7 as ;$77#3-C7<ci ca= where ci is the percentage of each control inter+al
to be left free for insertions. ca is the percentage of control inter+als in each control area to be left
empt!
7& 9o: (o you (eci(e on o*timum )a,ues for CI? FREESAACE etc&&.
C( siMe should be based on record length. tpe of processing! /suall C( is &F! (f record length is
larger<X1F=. chose *F or 4F!
;$77#3-C7 should be large if more number of insertions are en+isaged! /sual +alues are <28
28= when hea+ updates are expected! C( siMe can be calculated!
<& #ou,( you s*ecify FREESAACE for an ESDS.
No! Because ou cannot insert records in an 7#D#. also when ou rewrite a record. it must be of
the same length! %hus putting an +alue for freespace does not ma9e an sense!
%=& #'at is S9AREOA!S .
#H-$7O3%# is a parameter in the D7;(N7 and specifies how an obCect can be shared among
users! (t is coded as #H-$7O3%#<a b=. where a is the cross region share option ie how two or
more Cobs on a single sstem can share the file. while b is the cross sstem share option ie how
two or more Cobs on different 2H#es can share the file! /sual +alue is <2 "=!
%%& #'at is t'e meanin+ of eac' of t'e )a,ues in S9AREOA!SD2 /E.
Halue of 2 for cross region means that the file can be processed simultaneousl b multiple users
pro+ided onl one of them is an updater! Halue of " for cross sstem means that an number of
Cobs can process the file for input or output <H#-2 does nothing to ensure integrit=!
%2& 9o: (o you (efine a KSDS .
D7;(N7 CL/#%7$<cluster name= with the (ND7B7D parameter! -lso specif the ds name for the
D-%- component : the ds (ND7B component! Other important parms are $7CO$D#(I7. F7D#.
#H-$7O3%(ON#!
%/& 9o: (o you (efine an AL!INDC . 9o: (o you use AL!INDCs in -atc'? CICS *+ms .
D7;(N7 -L%7$N-%7(ND7B! (mportant paramters are $7L-%7 where ou specif the base
cluster name. F7D#. $7CO$D#(I7.#H-$7O3%(ON#./N(6/7F7D<or NON/N(6/7F7D=.
D-%-<ds name for the data component=. (ND7B<ds name for the index component=!
%hen D7;(N7 3-%H! (mportant paramters are N-27 <ds name for the path=. 3-%H7N%$D <ds
name of the alternate index name=. /3D-%7<or NO/3D-%7= which specifies whether an alt
index is updated when a update to the base cluster ta9es place!
%hen BLD(ND7B! 3arameters are (ND-%-#7%<ds name of base cluster=. O/%D-%-#7%<ds
name of -(B=!
/sing alternate indexes in batch pgmsJ
(n the >CL. ou must ha+e DD stmts for the cluster and for the path<s=! (n the cobol pgm. #7L7C%
!! -##(?N %O ddname for base cluster $7CO$D F7D (#!!! -L%7$N-%7 $7CO$D F7D (#!!
/sing alternate indexes in C(C# pgmsJ
;C% entries must be created for both base cluster : the path! %o read using the alternate index.
use the dd name of the path in C(C# file control commands!
%4& #'at 'a**ens :'en you o*en an em*ty "SAM fi,e in a COBOL *ro+ram for in*ut.
- H#-2 file that has ne+er contained a record is treated as una+ailable! -ttempting to open for
input will fail! -n empt file can be opened for output onl! 'hen ou open for output. COBOL will
write a dumm record to the file : then delete it out!
%6& 9o: (o you initia,iHe a "SAM fi,e -efore any o*eration. a "SAM :it' a,ternate in(e>.
Can write a dumm program that Cust opens the file for output : then closes it!
%8& #'at (oes a fi,e status of =2 on a "SAM in(icate.
Duplicate alternate 9e ! Happens on both input and output operation
%5& 9o: (o you ca,cu,ate recor( siHe of an a,ternate c,uster. @i)e your )a,ues for -ot'
uniLue an( nonuniLue&
/niEue CaseJ ) @ < alt09e0length @ primar09e =
NonuniEue CaseJ ) @ < alt09e0length @ n N primar09e =
where n A Y of duplicate records for the alternate 9e
1111-n one who 9nows 0 can ou explain 1
%7& #'at is t'e (ifference -et:een seLuentia, fi,es an( ESDS fi,es.
#eEuential<6#-2= files can be created on tape while 7#D# files cannot!
-lso. ou can ha+e -L%(ND7B for an 7#D# while no such facilit exists for 6#-2 files!
%<& 9o: (o you ,oa( a "SAM (ata set :it' recor(s .
/sing the $73$O command!
2=& 9o: (o you (efine a @D@ .
/se the D7;(N7 ?7N7$-%(OND-%-?$O/3 command! (n the same (DC-2# step. another
dataset must be defined whose DCB parameters are used when new generations of the ?D? are
created! %his dataset is 9nown as the model dataset! %he ds name of this model dataset must be
the same as that of the ?D?. so use a disp of 9eep rather than catlg and also specif
spaceA<tr9.8=
2%& Do a,, )ersions of t'e @D@ 'a)e to -e of t'e same recor( ,en+t' .
No. the DCB of the model dataset can be o+erridden when ou allocate new +ersions!
22& 9o: are (ifferent )ersions of @D@ name( .
base0file0name!?nnnnnH88 where nnnnA generation number <upto 2))=!
nnnn will be 8888 for the 1st generation!
2/& Su**ose / +enerations of a @D@ e>ist& 9o: :ou,( you reference t'e % st +eneration in
t'e JCL.
/se ?D? name<02=!
24& Su**ose a +eneration of @D@ +ets create( in a *articu,ar ste* of a *roc& 9o: :ou,(
you refer t'e current +eneration in a su-seLuent ste*. #'at :ou,( -e t'e (is*osition of
t'is +eneration no:.
$elati+e generation numbers are updated onl at the end of the Cob. not at the end of a step! %o
allocate a new generation. we would be using <@1= with a D(#3 of <N7'.C-%L?.D7L7%7=! %o
refer to this in a subseEuent step in the same Cob. we would again use <@1= but with a D(#3 of
#H$ or OLD!
26& #'at more info you s'ou,( +i)e in t'e DD statement :'i,e (efinin+ t'e ne>t +eneration
of a @D@.
?i+e <@1= as the generation number. gi+e <new.catlg= for disp. gi+e space parameter. can gi+e the
dcb parameter if ou want to o+erride the dcb of the model dataset!
28& Assumin+ t'at t'e DEFINE Ic, is not a)ai,a-,e? 'o: (o you +et info a-out a "SAM
fi,e123s or+anisation .
/se the L(#%C-% command!
25& Durin+ *rocessin+ of a "SAM fi,e? some system error occurs an( it is su-seLuent,y
unusa-,e & #'at (o you (o .
$un H7$(;D!
CICS IN!ER"IE# Q$ES!IONS
%& 9o: (o you *,ace t'e cursor on a *articu,ar *osition on t'e screen. 123
2o+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$<n m=11
/& #'at are t'e t:o out*uts create( as a resu,t of +eneration of a ma*. 123
%he map copboo9 and the load module!
4& #'at is t'e (ifference -et:een *'ysica, ma* an( sym-o,ic ma*. 123
%he phsical map is the load module and the smbolic map is the data structure!
6& 9o: (o you *rotect a fie,( from -ein+ o)er,ai(.
#'at is t'e attri-ute -yte. 123
Defines the displa/transmission of field! most cases is an output field from the program!
8& 9o: (o you use e>ten(e( attri-utes .
Define 7B%-%%AD7# and the correct terminal tpe!
5& #'at are t'e / :orFin+ stora+e fie,(s use( for e)ery fie,( on t'e ma*. 123
Length. attribute and input/output field!
7& #'at is MD!. #'at are FSE!? FRSE! .
2odified Data %ag! Bit in the attribute bte indicating modification of field on screen!
Happens on an input operation!
;#7%! #ets 2D% on to ensure field is transmitted! Happens on an output operation!
;$#7%! $esets 2D%! /ntil this happens. field continues to be sent!
<& #'at is t'e use of DSEC! *arameter in BMS.
(s the parameter to generate a smbolic map!
%=& Do you recei)e t'e attri-ute -yte in t'e sym-o,ic ma*.
On 7O; es!

%%& 9o: (o you maFe your BMS ma*s case sensiti)e.
/se -#(#111

%2& #'at is effect on RECEI"E MAA :'en
3; 9e is pressed1 Data transmission ma happen.
3- 9e is pressed1 Data transmission will not happen!
%/& #'at are SEND MAA MAAONLG B SEND MAA DA!AONLG .
2-3ONLD 0 to send the map alone. without an data! 7gJ used for sending 2enu
screens!
D-%-ONLD 0 to send data alone. without sending the screen laout again! 7gJ used for
refreshing the screen data!
%4& #'at is t'e (ifference -et:een a AF Fey B a AA Fey .
3; 9es wa9e up the tas9 and transmit modified data. 3- 9es onl wa9e up the tas9!
%6& Name t'e macros use( to (efine t'e fo,,o:in+:
2-3 2-3#7% ;(7LD
D;H2#D D;H2D( D;H2D;
%8& Can you use OCC$RS in a BMS ma*. If you (o? :'at are t'e issues re,ate( :it' its
use.
Des! cannot use group b clause111
%5& Can you (efine mu,ti*,e ma*s in a BMS ma*set.
Des!
%7& 9o: is t'e stora+e (etermine( in t'e sym-o,ic ma*? if you 'a)e mu,ti*,e ma*s.
#torage for maps redefine the first! %his means largest map has to be the first!
%<& #'at is t'e meanin+ of BMS ,en+t' of fie,( N =.
Data was not entered in the field
2=& Can you sim*,y c'ecF if ,en+t' N = for c'ecFin+ if a fie,( :as mo(ifie(.
No. not if 7$-#7 7O; was used!
2%& #'at (o you (o if you (o not :ant c'aracters entere( -y t'e user to -e fo,(e( to
u**ercase .
/se -#(# option on $7C7(H7!
22& #'at (oes t'e B$FFER o*tion in RECEI"E mean .
Brings the entire datastream from the terminal buffer!
2/& #'at are t'e ste*s you +o t'rou+' to a create a BMS e>ecuta-,e.
-ssemble to create C#7C% and Lin9
24& #'en you com*i,e a CICS *ro+ram? t'e D*reEcom*i,er *uts an e>tra c'unF of co(e&
#'ere (oes it +et inc,u(e( an( t'at is it ca,,e(. #'at is its ,en+t'.
D;H7(BLF. D;HCO22-$7-!
26& List a,, t'e CICS ta-,es an( e>*,ain t'eir contents& 123
33% #(%
3C% >C%
;C% #N%
DC% #$%
$C% %C%
28& I 'a)e :ritten a CICS *ro+ram& #'at ta-,es s'ou,( I setu* to run t'is *ro+ram. 123
33%. 3C%. <;C%. DC%. $C% <if needed==!
25& In :'ic' ta-,e :ou,( you maFe an entry for a BMS ma*. 123
33%
27& #'at is t'e content of t'e AA! entry. 123
Length. #ource. /se count. Lang. $es count D;H$3L number
2<& For a CICSDB2 *ro+ram? 'o: is t'e *,an reference(. 123
/ses a $C% table!
/=& 9o: is (ynamic memory a,,ocate( :it'in a CICS a**,ication *ro+ram. 123
/se a ?7%2-(N
/%& #'at are t'e restrictions :'i,e usin+ @E!MAIN an( FREEMAIN. 123
.....................

/2& #'at is t'e use of a !DQ? !SQ. 123
%emporar data stores!
//& 9o: (o you rea( from a !SQ. 123
%emp storage read command
/4& If I create a !SQ from one transaction? can I rea( it from anot'er transaction. 123
Des! -s long as the run in the same region!
/6& #'at are e>tra *artition B intra *artition !DQs.
7xtra partition %D6s are datasets used for communication bTUVn C(C# and other
C(C#/Batch regions! (ntrapartition %D6s are Eueues for communication within regn!
/8& #'at is tri++er ,e)e, in t'e conte>t of !DQs.
;or intrapartition %D6s specif the Y records at which -%( happens! not applicable for
extra partition %D6s!
/5E 9o: (o you fire a -atc' Io- from a CICS t>n .
Define an extrapartition %D6 as an internal reader and write the >CL to it! %erminate the
>CL with /N7O;!
/5& #'at is A!I. #'at Fin( of !DQ can -e use(.
-utomatic %as9 (nitiation! (ntra partition %D6!
/7& Do you reLuire a ta-,e entry for a !SQ.
(f reco+er is needed!
/<& Is t'ere any entry for !SQs in CICS ta-,es.
Des in the D;H%#%!
4=& #'at is t'e use of DC!.
Destination Control %able used to define %D6s
4%& #'at is ENQ? DEQ .
%as9 control commands to ma9e resources seriall reusable!
42& I 'a)e !SQ :it' %6 items& I :ant to (e,ete t'e %=t' item& 9o: (o I (o t'at.
11111111111111111111111111

4/& Can you issue SQL COMMI! from a CICS *ro+ram. 123
Des!
44& #'at is t'e ot'er :ay of terminatin+ a transaction. 123
7B7C C(C# #DNC3O(N%! -ssuming it is a L/'! %his will not end the Bn!
46& #'at is an ASRA a-en( .
-n data exception problem #OC,. #OC& etc!
48& #'at is an AEG< a-en( .
DB2/(D2# not up!
45& #'at are t'e situations un(er :'ic' NE#COAG is reLuire( .
'hen a program has been used in C(C# atleast once and then changed and recompiled!
47& #'at is 2 *'ase commit.
'hat is 7B7C C(C# $7%$(7H7 1
/sed b #%-$%ed tas9s to get the parameters passed to them!
4<& Name some im*ortant fie,(s in t'e EIB -,ocF .
7(B$7#3. 7(BC-L7N. 7(B$$CD7. 7(B%-#F. 7(BD-%7. 7(B%(27
6=& Can you use DGNAMIC ca,,s in CICS .
Des. the called routine must be defined in 33% and the calling program must use C-LL
identifier!!
6%& 9o: (o you 'an(,e errors in CICS *+ms .
Chec9 7(B$7#3 after the call or use the H-NDL7 condition!
62& Su**ose *+m A *asses /= -ytes to *+m B t'ru commarea an( *+m B 'as (efine(
its DF9COMMAREA to -e 6= -ytes & Is t'ere a *ro-,em .
Des. if B tries to access btes "10)8!
6/E #'en an CC!L is (one? (oes t'e trani( c'an+e . Is a ne: tasF create( . Does it cause
an
im*,icit SGNCAOIN! to -e issue( .
No. No. Des!
64& 9o: (o you e>ecute a -acF+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 is
attac'e( .
1111111111111111111111111111111
65& #'at is t'e DSNC transaction use( for .
.................................
67& 9o: (o you 'an(,e error in a CICS *ro+ram.
#ame as "*!
6<& #'at is t'e (ifference -et:een S!AR! an( CC!L .
#%-$% is used to start a new tas9! (t is a inter+al control command! BC%L is used to pass
control to a program within the same tas9! (t is a program control command!
8=& #'at is t'e usa+e of ,an+ua+e in t'e AA! entry.
Language interface and call parameters111
8%& Can you 'a)e CICS co(e in a co*y-ooF. If yes? :'at 'a**ens (urin+ com*i,ation.
Des! Needs to be preprocessed!
82& #'at is an AICA a-en(.
$unawa %as9!
8/& 9o: :ou,( you reso,)e an ASRA a-en(.
(n COBOL (( start with C7B$. and get the offset/instruction!
84E I in)oFe a transaction from CICS& !'e *ro+ram 'as a co(e: MO"E DF9COMMAREA !O
#SAREA& #'at 'a**ens to t'is transaction. #'at 'a**ens to t'e ot'er transactions.
JunF 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. 123
;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<& 9o: (o you ro,,-acF (ata :ritten to an ESDS fi,e.
Define the file as reco+erable! in cases where records ha+e been inserted into the file.
ou ma need to run a batch program to logicall delete the inserted records!
5=& I 'a)e (one a S!AR! BRO#SE on a "SAM (ataset& Can I (o anot'er S!AR!
BRO#SE :it'out (oin+ an END BRO#SE.
No!
5%& Can you access QSAM DseL E fi,es from CICS .
No!
52& Can you access ESDS fi,es from CICS .
Des!
0000
5/& #'at is CICS .
C(C# 0 Customer (nformation Control #stem
C(C# is a telecommunications monitor software product from (B2! %he (B2 mainframe
operating sstems are batch and time0sharing! C(C# supports the de+elopment and
execution of online applications! (t does this b
0 communicating with terminals
0 sending and recei+ing fomatted data
0 accessing files and database
C(C# itself is batch Cob running on the operating sstem with high priorit! C(C# does
scheduling of programs that run under the C(C# region!
54& #'at is Aseu(o con)erstiona, mo(e .
..................................
56& #'at is a Ma* .
.....................................
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 -et:een *rimary an( secon(ary a,,ocations for a
(ataset.
#econdar allocation is done when more space is reEuired than what has alread
been allocated!
/&9o: many e>tents are *ossi-,e for a seLuentia, fi,e . For a "SAM fi,e .
1* extents on a +olume for a seEuential file and 12" for a H#-2 file!
4& #'at (oes a (is*osition of DNE#?CA!L@?DELE!EE mean.
%hat this is a new dataset and needs to be allocated. to C-%L? the dataset if the
step is successful and to delete the dataset if the step abends!
6& #'at (oes a (is*osition of DNE#?CA!L@?KEEAE 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 need
to 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 KEEA.
Need to suppl +olume serial no! HOLA#7$Axxxx!
5& #'at (oes a (is*osition of DMOD?DELE!E?DELE!EE mean .
%he 2OD will cause the dataset to be created <if it does not exist=. and then the
two D7L7%7s will cause the dataset to be deleted whether the step abends or not!
%his disposition is used to clear out a dataset at the beginning of a Cob!
7& #'at is t'e DD statement for a out*ut fi,e.
/nless allocated earlier. will ha+e the foll parametersJ
D(#3A<N7'.C-%L?.D7L7%7=. /N(% . #3-C7 : DCB !
<& #'at (o you (o if you (o not :ant to Fee* a,, t'e s*ace a,,ocate( to a
(ataset.
#pecif the parameter $L#7 < release = in the #3-C7 e!g! #3-C7A<CDL.
<)8.)8=.$L#7=
%=& #'at is DISANDNE#?AASS?DELE!EE.
%his is a new file and create it. if the step terminates normall. pass it to the
subseEuent steps and if step abends. delete it! %his dataset will not exist beond
the >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-27 or b
specifing the temporar file indicator as in D#NA::%723!
'e use them to carr the output of one step to another step in the same Cob! %he
dataset will not be retained once the Cob completes!
%2& 9o: (o you restart a *roc from a *articu,ar ste*.
(n Cob card. specif $7#%-$%Aprocstep!stepname
where procstep A name of the Ccl step that in+o9ed the proc
and stepname A name of the proc step where ou want execution to start
%/& 9o: (o you sFi* a *articu,ar ste* in a *roc;JOB.
Can use either condition codes or use the Ccl control statement (; <onl in 7#-
>CL=
%/a& A AROC 'as fi)e ste*s& Ste* / 'as a con(ition co(e& 9o: can you
o)erri(e;nu,,ify t'is con(ition co(e.
3ro+ide the o+erride on the 7B7C stmt in the >CL as followsJ
//#%73881 7B7C procname.COND!stepnameA+alue
-ll parameters on an 7B7C stmt in the proc such as COND. 3-$2 ha+e to be
o+erridden li9e this!
%4& 9o: (o you o)erri(e a s*ecific DDNAME;SGSIN in AROC from a JCL.
//Zstepname!ddX D#NA!!!
%6& #'at is NO!CA! 2 .
%his is an 2H# message indicating that a duplicate catalog entr exists! 7!g!. if
ou alread ha+e a dataset with dsn A TUVxxxx!TUV and u tr to create one
with disp new.catlg. ou would get this error! the program open and write would go
through and at the end of the step the sstem would tr to put it in the sstem
catalog! at this point since an entr alread exists the catlg would fail and gi+e this
message! ou can fix the problem b deleting/uncataloging the first data set and
going to the +olume where the new dataset exists<this info is in the msglog of the
Cob= and cataloging it!
%8& #'at is PS=C5P a-en(.
Caused b in+alid data in a numeric field!
%5& #'at is a S=C4 error .
#torage +iolation error 0 can be due to +arious reasons! e!g!J $7-D(N? a file that
is not open. in+alid address referenced due to subscript error!
%7& #'at are SD/5? SB/5? SE/5 a-en(s.
-ll indicate dataset out of space! #D", 0 no secondar allocation was specified!
#B", 0 end of +ol! and no further +olumes specified! #7", 0 2ax! of 1* extents
alread allocated!
%<& #'at is S/22 a-en( .
(ndicates a time out abend! Dour program has ta9en more C3/ time than the
default limit for the Cob class! Could indicate an infinite loop!
2=& #'y (o you :ant to s*ecify t'e RE@ION *arameter in a JCL ste*.
%o o+erride the $7?(ON defined at the >OB card le+el!
$7?(ON specifies the max region siMe! $7?(ONA8F or 82 or omitting $7?(ON
means no limit will be applied!
2%& #'at (oes t'e !IME *arameter si+nify . #'at (oes !IMEN%44= mean .
%(27 parameter can be used to o+ercome #"22 abends for programs that
genuinel need more C3/ time! %(27A1&&8 means no C3/ time limit is to be
applied to this step!
22& #'at is CONDNE"EN .
2eans execute this step e+en if an of the pre+ious steps. terminated abnormall!
2/& #'at is CONDNONLG .
2eans execute this step onl if an of the pre+ious steps. terminated abnormall!
24& 9o: (o you c'ecF t'e synta> of a JCL :it'out runnin+ it.
%D37$/NA#C-N on the >OB card or use >#C-N!
26& #'at (oes IEB@ENER (o.
/sed to cop one 6#-2 file to another! #ource dataset should be described using
#D#/%1 ddname! Destination dataset should be decribed using #D#/%2!
(7B?7N$ can also do some reformatting of data b suppling control cards +ia
#D#(N!
28& 9o: (o you sen( t'e out*ut of a COBOL *ro+ram to a mem-er of a
ADS.
Code the D#N as pds<member= with a D(#3 of #H$! %he disp applies to the pds
and not to a specific member!
25& I 'a)e mu,ti*,e Io-s D JCLs :it' se)era, JOB car(s E in a mem-er& #'at
'a**ens if I su-mit it.
2ultiple Cobs are submitted <as man Cobs as the number of >OB cards=!
27& I 'a)e a COBOL *ro+ram t'at ACCEA!s some in*ut (ata& 9o: (o you
co(e t'e JCL statment for t'is. D 9o: (o you co(e instream (ata in a JCL. E
//#D#(N DDN
input data
input data
/N
2<& Can you co(e instream (ata in a AROC .
No!
/=& 9o: (o you o)ercome t'is ,imitation .
One wa is to code #D#(N DD D/22D in the 3$OC. and then o+erride this from
the >CL with instream data!
/%& 9o: (o you run a COBOL -atc' *ro+ram from a JCL. 9o: (o you run a
COBOL;DB2 *ro+ram.
%o run a non DB2 program.
//#%73881 7B7C 3?2A2D3$O?
%o run a DB2 program.
//#%73881 7B7C 3?2A(F>7;%81
//#D#%#(N DD N
D#N #D#%72<!!!!=
$/N 3$O?$-2<2D3$O?=
3L-N<!!!!!= L(B<!!!!= 3-$2#<!!!=
/N
/2& #'at is S!EALIB? JOBLIB. #'at is it use( for.
#pecifies that the pri+ate librar <or libraries= specified should be searched before
the default sstem libraries in order to locate a program to be executed!
#%73L(B applies onl to the particular step. >OBL(B to all steps in the Cob!
//& #'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 sstem
libraries such as #D#1!L(NFL(B! %he sstem libraries are specified in the lin9list!
/4& #'at 'a**ens if -ot' JOBLIB B S!EALIB is s*ecifie( .
>OBL(B is ignored!
/6& #'en you s*ecify muti*,e (atasets in a JOBLIB or S!EALIB? :'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$A<27!2D3$OCL(B.#D#1!3$OCL(B=
/5& !'e (is* in t'e JCL is MOD an( t'e *ro+ram o*ens t'e fi,e in O$!A$!
mo(e& #'at 'a**ens .
%he disp in the >CL is #H$ and the pgm opens the file in 7B%7ND mode! 'hat
happens 1
$ecords will be written to end of file <append= when a '$(%7 is done in both
cases!
/7& #'at are t'e )a,i( DSOR@ )a,ues .
3# 0 6#-2. 3O 0 3artitioned. (# 0 (#-2

/<& #'at are t'e (ifferences -et:een JES2 B JES/ .
>7#" allocates datasets for all the steps before the Cob is scheduled! (n >7#2.
allocation of datasets reEuired b a step are done onl Cust before the step
executes!
..... Can anyone a(( more

You might also like