Sunteți pe pagina 1din 119

// I dont know who is the Author of this wonderful IQ.

If you know the author, Please let it know me. I want to mention his Good name in my site and need his permission to correct some errors.

COBOL & COBOL II


Q1) Name the divisions in a COBOL program ?. A1) I !"#I$I%A#I&" I'I(I&", !"'I)&"*!"# I'I(I&". I'I(I&", A#A I'I(I&", P)&%! +)!

Q2) What are the different data types avai a! e in COBOL? A,) Alpha-numeric ./), alpha0etic .A) and numeric .1). Q") What does the INI#I$LI%& ver! do? ' () A2) Alpha0etic, Alphanumeric fields 3 alphanumeric edited items are set to (PA%!(. "umeric, "umeric edited items set to 4!)&. $I55!) , &%%+)( !P!" I"G &" items left untouched. Q*) What is ++ eve ,sed for ? A6) !lementary le7el item. %annot 0e su0di7isions of other items .cannot 0e 8ualified), nor can they 0e su0di7ided themsel7es. Q-) What is .. eve ,sed for ? A9) $or condition names. Q/) What is eve // ,sed for ? A:) $or )!"A*!( clause. Q+) What does the I) N01&2IC 3 a,se esta! ish ? A;) I( "+*!)I% can 0e used on alphanumeric items, si<ned numeric 3 packed decimal items and unsi<ned numeric 3 packed decimal items. I( "+*!)I% returns #)+! if the item only consists of =-1. >owe7er, if the item 0ein< tested is a si<ned item, then it may contain =-1, ? and - . Q.) 4o5 do yo, define a ta! e6array in COBOL? A@) A))AA(. =9 A))AA1 PI% /.1) &%%+)( 1= #I*!(. =9 A))AA, PI% /.:) &%%+)( ,= #I*!( I" !/! Q7) Can the OCC02) 3 a,se !e at the 81 eve ? A1) "o. Q18) What is the differen3e !et5een inde9 and s,!s3ript? ' () A1=) (u0script refers to the array occurrence while indeD is the displacement .in no of 0ytes) from the 0e<innin< of the array. An indeD can only 0e modified usin< P!)$&)*, (!A)%> 3 (!#. "eed to ha7e indeD for a ta0le in order to use (!A)%>, (!A)%> A55. Q11) What is the differen3e !et5een )&$2C4 and )&$2C4 $LL? ' () A11) (!A)%> - is a serial search. (!A)%> A55 - is a 0inary search 3 the ta0le must 0e sorted . A(%!" I"G/ !(%!" I"G E!A clause to 0e used 3 data loaded in this order) 0efore usin< (!A)%> A55. Q12) What sho, d !e the sorting order for )&$2C4 $LL? ' () A1,) It can 0e either A(%!" I"G or !(%!" I"G. A(%!" I"G is default. If you want the search to 0e done on an array sorted in descendin< order, then while definin< the array, you should <i7e !(%!" I"G E!A clause. .Aou

BA C(-I" !/.

must load the ta0le in the specified order). Q1") What is !inary sear3h? A12) (earch on a sorted array. %ompare the item to 0e searched with the item at the center. If it matches, fine else repeat the process with the left half or the ri<ht half dependin< on where the item lies. Q1*) 1y program has an array defined to have 18 items. :,e to a !,g; I find that even if the program a33ess the 11th item in this array; the program does not a!end. What is 5rong 5ith it? A16) *ust use compiler option (()A"G! if you want array 0ounds checkin<. efault is "&(()A"G!. Q1-) 4o5 do yo, sort in a COBOL program? (ive sort fi e definition; sort statement synta9 and meaning. ' () A19) (yntaDF (&)# file-1 &" A(%!" I"G/ !(%!" I"G E!A key.... +(I"G file-, GI'I"G file-2. +(I"G can 0e su0stituted 0y I"P+# P)&%! +)! I( para-1 #>)+ para-, GI'I"G can 0e su0stituted 0y &+#P+# P)&%! +)! I( para-1 #>)+ para-,. file-1 is the sort .work) file and must 0e descri0ed usin< ( entry in $I5! (!%#I&". file-, is the input file for the (&)# and must 0e descri0ed usin< an $ entry in $I5! (!%#I&" and (!5!%# clause in $I5! %&"#)&5. file-2 is the out file from the (&)# and must 0e descri0ed usin< an $ entry in $I5! (!%#I&" and (!5!%# clause in $I5! %&"#)&5. file-1, file-, 3 file-2 should not 0e opened eDplicitly. I"P+# P)&%! +)! is eDecuted 0efore the sort and records must 0e )!5!A(!d to the sort work file from the input procedure. &+#P+# P)&%! +)! is eDecuted after all records ha7e 0een sorted. )ecords from the sort work file must 0e )!#+)"ed one at a time to the output procedure. Q1/) 4o5 do yo, define a sort fi e in <CL that r,ns the COBOL program? A1:) +se the (&)#CE=1, (&)#CE=,,..... dd names in the step. "um0er of sort datasets depends on the 7olume of data 0ein< sorted, 0ut a minimum of 2 is re8uired. Q1+) What is the differen3e !et5een performing a )&C#ION and a =$2$(2$=4? ' () A1;) Performin< a (!%#I&" will cause all the para<raphs that are part of the section, to 0e performed. Performin< a PA)AG)AP> will cause only that para<raph to 0e performed. Q1.) What is the ,se of &>$L0$#& statement? ' () A1@) !7aluate is like a case statement and can 0e used to replace nested Ifs. #he difference 0etween !'A5+A#! and case is that no G0reakG is re8uired for !'A5+A#! i.e. control comes out of the !'A5+A#! as soon as one match is made. Q17) What are the different forms of &>$L0$#& statement? A11) !'A5+A#! !'A5+A#! (Q5%& ! A5(& $I5!-(#A#+( C>!" AHB A" %H C>!" 1== A5(& G==G imperati7e stmt imperati7e stmt C>!" . ?/)/A H 6 C>!" -2=9 A5(& G2,G imperati7e stmt imperati7e stmt C>!" &#>!) C>!" &#>!) imperati7e stmt imperati7e stmt

!" -!'A5+A#! !'A5+A#! (Q5%& ! A5(& AHB C>!" 1== A5(& #)+! imperati7e stmt C>!" -2=9 A5(& $A5(! imperati7e stmt !" -!'A5+A#!

!" -!'A5+A#! !'A5+A#! (Q5%& ! A5(& #)+! C>!" 1== A5(& AHB imperati7e stmt C>!" -2=9 A5(& .A/%H6) imperati7e stmt !" -!'A5+A#!

Q28) 4o5 do yo, 3ome o,t of an &>$L0$#& statement? ' () A,=) After the eDecution of one of the when clauses, the control is automatically passed on to the neDt sentence after the !'A5+A#! statement. #here is no need of any eDtra code. Q21) In an &>$L0$#& statement; 3an I give a 3omp e9 3ondition on a 5hen 3 a,se? A,1) Aes. Q22) What is a s3ope terminator? (ive e9amp es. A,,) (cope terminator is used to mark the end of a 7er0 e.<. !'A5+A#!, !" -!'A5+A#!I I$, !" I$. Q2") 4o5 do yo, do in' ine =&2?O21? ' () A,2) P!)$&)* ... J+"#I5K ... JsentencesK !" -P!)$&)* Q2*) When 5o, d yo, ,se in' ine perform? A,6) Chen the 0ody of the perform will not 0e used in other para<raphs. If the 0ody of the perform is a <eneric type of code .used from 7arious other places in the pro<ram), it would 0e 0etter to put the code in a separate Para and use P!)$&)* Para name rather than in-line perform. Q2-) What is the differen3e !et5een CON#IN0& & N&@# )&N#&NC& ? A,9) #hey appear to 0e similar, that is, the control <oes to the neDt sentence in the para<raph. But, "eDt (entence would take the control to the sentence after it finds a full stop ..). %heck out 0y writin< the followin< code eDample, one if sentence followed 0y 2 display statements .sorry they appear one line here 0ecause of formattin< restrictions) If 1 K = then neDt sentence end if display Gline 1G display Gline ,G. display Gline 2G. LLL "ote- there is a dot ..) only at the end of the last , statements, see the effect 0y replacin< "eDt (entence with %ontinue LLL Q2/) What does &@I# do ? A,:) oes nothin< M If used, must 0e the only sentence within a para<raph. Q2+) Can I redefine an @A188) fie d 5ith a fie d of @A288)? A,;) Aes. )edefines Nust causes 0oth fields to start at the same location. $or eDampleF =1 C(-#&P PI% /.1) =1 C(-#&P-)! )! !$I"!( C(-#&P PI% /.,). If you *&'! G1,G to C(-#&P-)! , I(P5AA C(-#&P will show 1 while I(P5AA C(-#&P-)! will show 1,. $2.) Can I redefine an @A288) fie d 5ith a fie d of @A188) ? Q21)1 Aes.

Q"1)2What do yo, do to reso ve )OC'+ error? ' () Q21) Basically you need to correctin< the offendin< data. *any times the reason for (&%; is an uninitialiOed numeric item. !Damine that possi0ility first. *any installations pro7ide you a dump for run time a0ends . it can 0e <enerated also 0y callin< some su0routines or &( ser7ices thru assem0ly lan<ua<e). #hese dumps pro7ide the offset of the last instruction at which the a0end occurred. !Damine the compilation output /)!$ listin< to <et the 7er0 and the line num0er of the source code at this offset. #hen you can look at the source code to find the 0u<. #o <et capture the runtime dumps, you will ha7e to define some datasets .(A(AB&+# etc ) in the P%5. If none of these are helpful, use Nud<ement and I(P5AA to localiOe the source of error. (ome installation mi<ht ha7e 0atch pro<ram de0u<<in< tools. +se them. Q"2) 4o5 is sign stored in =a3Bed :e3ima fie ds and %oned :e3ima fie ds? Q2,) Packed ecimal fieldsF (i<n is stored as a heD 7alue in the last ni00le .6 0its ) of the stora<e. 4oned ecimal fieldsF As a default, si<n is o7er punched with the numeric 7alue stored in the last 0ite. Q"") 4o5 is sign stored in a 3omp'" fie d? ' () Q22) It is stored in the last ni00le. $or eDample if your num0er is ?1==, it stores heD =% in the last 0yte, heD 1% if your num0er is 1=1, heD ,% if your num0er is 1=,, heD 1 if the num0er is -1=1, heD , if the num0er is -1=, etc... Q"*) 4o5 is sign stored in a CO1= fie d ? ' () Q26) In the most si<nificant 0it. Bit is &" if -7e, &$$ if ?7e. Q"-) What is the differen3e !et5een CO1= & CO1='" ? Q29) %&*P is a 0inary stora<e format while %&*P-2 is packed decimal format. Q"/) What is CO1='1? CO1='2? Q2:) %&*P-1 - (in<le precision floatin< point. +ses 6 0ytes. %&*P-, - ou0le precision floatin< point. +ses @ 0ytes. Q"+) 4o5 do yo, define a varia! e of CO1='1? CO1='2? Q2;) "o picture clause to 0e <i7en. !Dample =1 C(-'A) +(AG! %&*P-1. Q".) 4o5 many !ytes does a )7A+) CO1='" fie d o33,py ? Q2@) Cill take 6 0ytes. (i<n is stored as heD 7alue in the last ni00le. General formula is I"#..n/,) ? 1)), where nH; in this eDample. Q"7) 4o5 many !ytes does a )7A+) )I(N #2$ILIN( )&=$2$#& fie d o33,py ? Q21) Cill occupy @ 0ytes .one eDtra 0yte for si<n). Q*8) 4o5 many !ytes 5i a )7A.) CO1= fie d o33,py ? Q6=) 6 0ytes. Q*1) What is the ma9im,m va ,e that 3an !e stored in )7A.) CO1=? Q61) 11111111 Q*2) What is CO1= )CNC?

Q6,) %auses the item to 0e ali<ned on natural 0oundaries. %an 0e (A"%>)&"I4! 5!$# or )IG>#. $or 0inary data items, the address resolution is faster if they are located at word 0oundaries in the memory. $or eDample, on main frame the memory word siOe is 6 0ytes. #his means that each word will start from an address di7isi0le 0y 6. If my first 7aria0le is D.2) and neDt one is s1.6) comp, then if you do not specify the (A"% clause, (1.6) %&*P will start from 0yte 2 . assumin< that it starts from = ). If you specify (A"%, then the 0inary data item will start from address 6. Aou mi<ht see some wasta<e of memory, 0ut the access to this computational field is faster. Q*") What is the ma9im,m siDe of a 81 eve item in COBOL I? in COBOL II? Q62) In %&B&5 IIF 1:;;;,19 Q**) 4o5 do yo, referen3e the fo o5ing fi e formats from COBOL programsE Q66) $iDed Block $ile +se &)GA"I(A#I&" I( (!Q+!"#IA5. +se )!%&) I"G *& ! I( $, B5&%E %&"#AI"( = . $iDed +n0locked +se &)GA"I(A#I&" I( (!Q+!"#IA5. +se )!%&) I"G *& ! I( $, do not use B5&%E %&"#AI"( 'aria0le Block $ile +se &)GA"I(A#I&" I( (!Q+!"#IA5. +se )!%&) I"G *& ! I( ', B5&%E %&"#AI"( =. o not code the 6 0ytes for record len<th in $ ie P%5 rec len<th will 0e maD rec len<th in p<m ? 6 'aria0le +n0locked +se &)GA"I(A#I&" I( (!Q+!"#IA5. +se )!%&) I"G *& ! I( ', do not use B5&%E %&"#AI"(. o not code 6 0ytes for record len<th in $ ie P%5 rec len<th will 0e maD rec len<th in p<m ? 6. !( ( '(A* file +se &)GA"I(A#I&" I( (!Q+!"#IA5. E( ( '(A* file +se &)GA"I(A#I&" I( I" !/! , )!%&) E!A I(, A5#!)"A#! )!%&) E!A I( )) ( $ile +se &)GA"I(A#I&" I( )!5A#I'!, )!5A#I'! E!A I( Printer $ile +se &)GA"I(A#I&" I( (!Q+!"#IA5. +se )!%&) I"G *& ! I( $, B5&%E %&"#AI"( =. .+se )!%$*H$BA in P%5 %B). Q*-) What are different fi e O=&N modes avai a! e in COBOL? Q69) &pen for I"P+#, &+#P+#, I-&, !/#!" . Q*/) What is the mode in 5hi3h yo, 5i O=&N a fi e for 5riting? ' () Q6:) &+#P+#, !/#!" Q*+) In the <CL; ho5 do yo, define the fi es referred to in a s,!ro,tine ? Q6;) (upply the cards Nust as you would for files referred to in the main pro<ram. Q*.) Can yo, 2&W2I#& a re3ord in an &):) fi e? Can yo, :&L&#& a re3ord from it? Q6@) %an rewrite .record len<th must 0e same), 0ut not delete. Q*7) What is fi e stat,s 72? ' () Q61) 5o<ic error. e.<., a file is opened for input and an attempt is made to write to it. Q-8) What is fi e stat,s "7 ? Q9=) *ismatch in 5)!%5 or B5&%E(I4! or )!%$* 0etween your %&B&5 p<m 3 the P%5 .or the dataset la0el). Aou

will <et file status 21 on an &P!". Q-1) What is )tati3 and :ynami3 inBing ? Q91) In static linkin<, the called su0routine is link-edited into the callin< pro<ram , while in dynamic linkin<, the su0routine 3 the main pro<ram will eDist as separate load modules. Aou choose static/dynamic linkin< 0y choosin< either the A"A* or "& A"A* link edit option. .!7en if you choose "& A"A*, a %A55 identifier .as opposed to a %A55 literal), will translate to a A"A*I% call).A statically called su0routine will not 0e in its initial state the neDt time it is called unless you eDplicitly use I"I#IA5 or you do a %A"%!5. A dynamically called routine will always 0e in its initial state. Q-2) What is $1O:&A2*); $1O:&A"1); 21O:&A2*) and 21O:&A$NC)? Aapp i3a! e to on y 1>)6&)$ &nterprise )erver). Q9,) #hese are compile/link edit options. Basically A*& ! stands for Addressin< mode and )*& ! for )esidency mode. A*& !.,6) - ,6 0it addressin<I A*& !.21) - 21 0it addressin< A*& !.A"A) - !ither ,6 0it or 21 0it addressin< dependin< on )*& !. )*& !.,6) - )esides in 7irtual stora<e 0elow 1: *e< line. +se this for 21 0it pro<rams that call ,6 0it pro<rams. .&(/'( %o0ol p<ms use ,6 0it addresses only). )*& !.A"A) - %an reside a0o7e or 0elow 1: *e< line. Q-") What 3ompi er option 5o, d yo, ,se for dynami3 inBing? Q92) A"A*. Q-*) What is ))2$N(&; NO))2$N(& ? Q96) #hese are compiler options with respect to su0script out of ran<e checkin<. "&(()A"G! is the default and if chosen, no run time error will 0e fla<<ed if your indeD or su0script <oes out of the permissi0le ran<e. Q--) 4o5 do yo, set a ret,rn 3ode to the <CL from a COBOL program? Q99) *o7e a 7alue to )!#+)"-%& ! re<ister. )!#+)"-%& ! should not 0e declared in your pro<ram. Q-/) 4o5 3an yo, s,!mit a Fo! from COBOL programs? Q9:) Crite P%5 cards to a dataset with //DDDDDDD (A(&+#H .A,I"#) )) where GAG is output class, and dataset should 0e opened for output in the pro<ram. efine a @= 0yte record layout for the file. Q-+) What are the differen3es !et5een O) >) COBOL and >) COBOL II? Q9;) &(/'( %o0ol p<ms can only run in ,6 0it addressin< mode, '( %o0ol II p<ms can run either in ,6 0it or 21 0it addressin< modes. I. )eport writer is supported only in &(/'( %o0ol. II. +(AG! I( P&I"#!) is supported only in '( %&B&5 II. III. )eference modification e.<.F C(-'A).1F,) is supported only in '( %&B&5 II. I'. !'A5+A#! is supported only in '( %&B&5 II. '. (cope terminators are supported only in '( %&B&5 II. 'I. &(/'( %o0ol follows A"(I ;6 stds while '( %&B&5 II follows A"(I @9 stds. 'II. +nder %I%( %alls 0etween '( %&B&5 II pro<rams are supported. Q-.) What are the steps yo, go thro,gh 5hi e 3reating a COBOL program e9e3,ta! e?

Q9@) B, precompiler .if em0edded (Q5 used), %I%( translator .if %I%( p<m), %o0ol compiler, 5ink editor. If B, pro<ram, create plan 0y 0indin< the B)*s. Q-7) Can yo, 3a an O) >) COBOL pgm from a >) COBOL II pgm ? Q91) In non-%I%( en7ironment, it is possi0le. In %I%(, this is not possi0le. Q/8) What are the differen3es !et5een COBOL and COBOL II? A:=) #here are at least fi7e differencesF %&B&5 II supports structured pro<rammin< 0y usin< in line Performs and eDplicit scope terminators, It introduces new features .!'A5+A#!, (!#. #& #)+!, %A55. BA %&"#!/#, etc) It permits pro<rams to 0e loaded and addressed a0o7e the 1:-me<a0yte line It does not support many old features .)!A A #)A%!, )!P&)#-C)I#!), I(A*, !tc.), and It offers enhanced %I%( support. Q/1) What is an e9p i3it s3ope terminator? A:1) A scope terminator 0rackets its precedin< 7er0, e.<. I$ .. !" -I$, so that all statements 0etween the 7er0 and its scope terminator are <rouped to<ether. &ther common %&B&5 II 7er0s are )!A , P!)$&)*, !'A5+A#!, (!A)%> and (#)I"G. Q/2) What is an in ine =&2?O21? When 5o, d yo, ,se it? $nything e se to say a!o,t it? A:,) #he P!)$&)* and !" -P!)$&)* statements 0racket all %&B&5 II statements 0etween them. #he %&B&5 e8ui7alent is to P!)$&)* or P!)$&)* #>)+ a para<raph. In line P!)$&)*s work as lon< as there are no internal G& #&s, not e7en to an eDit. #he in line P!)$&)* for reada0ility should not eDceed a pa<e len<th - often it will reference other P!)$&)* para<raphs. Q/") What is the differen3e !et5een N&@# )&N#&NC& and CON#IN0&? A:2) "!/# (!"#!"%! <i7es control to the 7er0 followin< the neDt period. %&"#I"+! <i7es control to the neDt 7er0 after the eDplicit scope terminator. .#his is not one of %&B&5 IIGs finer implementations). ItGs safest to use %&"#I"+! rather than "!/# (!"#!"%! in %&B&5 II. Q/*) What COBOL 3onstr,3t is the COBOL II &>$L0$#& meant to rep a3e? A:6) !'A5+A#! can 0e used in place of the nested I$ #>!" !5(! statements. Q/-) What is the signifi3an3e of Ga!ove the ineG and G!e o5 the ineG? A:9) Before IB* introduced *'(//A architecture in the 11@=Gs a pro<ramGs 7irtual stora<e was limited to 1: me<s. Pro<rams compiled with a ,6 0it mode can only address 1: *0 of space, as thou<h they were kept under an ima<inary stora<e line. Cith %&B&5 II a pro<ram compiled with a 21 0it mode can 0e Ga0o7e the 1: *0 line. .#his G0elow the lineG, Ga0o7e the lineG ima<ery confuses most mainframe pro<rammers, who tend to 0e a literal minded <roup.) Q//) What 5as removed from COBOL in the COBOL II imp ementation? A::) Partial listF )!*A)E(, "&*I"A5 E!A, PAG!-%&+"#!), %+))!"#- AA, #I*!-&$AA, (#A#!, $5&C, %&+"#, !/A*I"!, !/>IBI#, )!A A #)A%! and )!(!# #)A%!. Q/+) &9p ain 3a !y 3onte9t !y 3omparing it to other 3a s. A:;) #he parameters passed in a call 0y conteDt are protected from modification 0y the called pro<ram. In a normal call they are a0le to 0e modified. Q/.) What is the inBage se3tion? A:@) #he linka<e section is part of a called pro<ram that GlinksG or maps to data items in the callin< pro<ramGs workin< stora<e. It is the part of the called pro<ram where these share items are defined. Q/7) What is the differen3e !et5een a s,!s3ript and an inde9 in a ta! e definition? A:1) A su0script is a workin< stora<e data definition item, typically a PI% .111) where a 7alue must 0e mo7ed to the su0script and then incremented or decrements 0y A #& and (+B#)A%# $)&*

statements. An indeD is a re<ister item that eDists outside the pro<ramGs workin< stora<e. Aou (!# an indeD to a 7alue and (!# it +P BA 7alue and &C" BA 7alue. Q+8) If yo, 5ere passing a ta! e via inBage; 5hi3h is prefera! e ' a s,!s3ript or an inde9? A;=) Cake up - you ha7enGt 0een payin< attentionM ItGs not possi0le to pass an indeD 7ia linka<e. #he indeD is not part of the callin< pro<rams workin< stora<e. #hose of us whoG7e made this mistake, appreciate the lesson more than others. Q+1) &9p ain the differen3e !et5een an interna and an e9terna sort; the pros and 3ons; interna sort synta9 et3. A;1) An eDternal sort is not %&B&5I it is performed throu<h P%5 and PG*H(&)#. It is understanda0le without any code reference. An internal sort can use two different syntaDsF 1.) +(I"G, GI'I"G sorts are compara0le to eDternal sorts with no eDtra file processin<I ,) I"P+# P)&%! +)!, &+#P+# P)&%! +)! sorts allow for data manipulation 0efore and/or after the sort. Q+2) What is the differen3e !et5een 3omp and 3omp'" ,sage? &9p ain other COBOL ,sageHs. A;,) %omp is a 0inary usa<e, while comp-2 indicates packed decimal. #he other common usa<es are 0inary and display. isplay is the default. Q+") When is a s3ope terminator mandatory? A;2) (cope terminators are mandatory for in-line P!)$&)*( and !'A5+A#! statements. $or reada0ility, itGs recommended codin< practice to always make scope terminators eDplicit. Q+*) In a COBOL II =&2?O21 statement; 5hen is the 3onditiona tested; !efore or after the perform e9e3,tion? A;6) In %&B&5 II the optional clause CI#> #!(# B!$&)! or CI#> #!(# A$#!) can 0e added to all perform statements. By default the test is performed 0efore the perform. Q+-) In an &>$L0#& statement is the order of the W4&N 3 a,ses signifi3ant? A;9) A0solutely. !7aluation of the C>!" clauses proceeds from top to 0ottom and their se8uence can determine results. Q+/) What is the defa, t va ,eAs) for an INI#I$LI%& and 5hat Bey5ord a o5s for an override of the defa, t. A;:) I"I#IA5I4! mo7es spaces to alpha0etic fields and Oeros to alphanumeric fields. #he )!P5A%I"G option can 0e used to o7erride these defaults. Q++) What is )&# #O #20& a a!o,t; any5ay? A;;) In %&B&5 II the @@ le7els can 0e set rather than mo7in< their associated 7alues to the related data item. .Ce0 noteF #his chan<e is not one of %&B&5 IIGs 0etter specifications.) Q+.) What is L&N(#4 in COBOL II? A;@) 5!"G#> acts like a special re<ister to tell the len<th of a <roup or elementary item. Q+7) What is the differen3e !et5een a !inary sear3h and a seI,entia sear3h? What are the pertinent COBOL 3ommands? A;1) In a 0inary search the ta0le element key 7alues must 0e in ascendin< or descendin< se8uence. #he ta0le is Ghal7edG to search for e8ual to, <reater than or less than conditions until the element is found. In a se8uential search the ta0le is searched from top to 0ottom, so .ironically) the elements do not ha7e to 0e in a specific se8uence. #he 0inary search is much faster for lar<er ta0les, while se8uential works well with smaller ones. (!A)%> A55 is used for 0inary searchesI (!A)%> for se8uential. Q.8) What is the point of the 2&=L$CIN( option of a 3opy statement? A@=) )!P5A%I"G allows for the same copy to 0e used more than once in the same code 0y chan<in< the replace 7alue.

Q.1) What 5i happen if yo, 3ode (O B$CJ instead of )#O= 20N in a stand a one COBOL program i.e. a program 5hi3h is not 3a ing any other program. A@1) #he pro<ram will <o in an infinite loop. Q.2) 4o5 3an I te if a mod, e is !eing 3a ed :CN$1IC$LLC or )#$#IC$LLC? A@,) #he &"5A way is to look at the output of the linka<e editor .I!C5)or the load module itself. If the module is 0ein< called A"A*I%A55A then it will not eDist in the main module, if it is 0ein< called (#A#I%A55A then it will 0e seen in the load module. %allin< a workin< stora<e 7aria0le, containin< a pro<ram name, does not make a A"A*I% call. #his type of callin< is known as I*P5I%I#! callin< as the name of the module is implied 0y the contents of the workin< stora<e 7aria0le. %allin< a pro<ram name literal .%A55 Q.") What is the differen3e !et5een a :CN$1IC and )#$#IC 3a in COBOL. A@2) #o correct an earlier answerF All called modules cannot run standalone if they re8uire pro<ram 7aria0les passed to them 7ia the 5I"EAG! section. A"A*I%ally called modules are those that are not 0ound with the callin< pro<ram at link edit time .I!C5 for IB*) and so are loaded from the pro<ram li0rary .No0li0 or stepli0) associated with the No0. $or A"A*I% callin< of a module the A"A* compiler option must 0e chosen, else the linka<e editor will not <enerate an eDecuta0le as it will eDpect u address resolution of all called modules. A (#A#I%ally called module is one that is 0ound with the callin< module at link edit, and therefore 0ecomes part of the eDecuta0le load module. Q.*) 4o5 may divisions are there in <CL'COBOL? A@6) (I/ Q.-) What is the p,rpose of Identifi3ation :ivision? A@9) ocumentation. Q./) What is the differen3e !et5een =IC 7.77 and 7v77? A@:) PI% 1.11 is a $&+)-P&(I#I&" field that actually contains a decimal point where as PI% 1711 is #>)!!- P&(I#I&" numeric field with implied or assumed decimal position. Q.+) 5hat is =i3 7v77 Indi3ates? A@;) PI%#+)! 1711 is a three position "umeric field with an implied or assumed decimal point after the first positionI the 7 means an implied decimal point. Q..) What g,ide ines sho, d !e fo o5ed to 5rite a str,3t,red Co!o prgGm? A@@) 1) use Ge7aluateG stmt for constructin< cases. ,) use scope terminators for nestin<. 2) use in line perform stmt for writin< Gdo G constructions. 6) use test 0efore and test after in the perform stmt for writin< do-while constructions. Q.7) 2ead the fo o5ing 3ode. 81 5s'n pi3 7A2) va ,e Dero. a'para move - to 5s'n. perform !'para 5s'n times. !'para. move 18 to 5s'n. ho5 many times 5i !'para !e e9e3,ted ? A@1) 9 times only. it will not take the 7alue 1= that is initialiOed in the loop. Q78) What is the differen3e !et5een )&$2C4 and )&$2C4 $LL? What is more effi3ient? A1=) (!A)%> is a se8uential search from the 0e<innin< of the ta0le. (!A)%> A55 is a 0inary search, continually di7idin< the ta0le in two hal7es until a match is found. (!A)%> A55 is more efficient for ta0les lar<er than ;= items. Q71) What are some e9amp es of 3ommand terminators? A11) !" -I$, !" -!'A5+A#!

Q72) What 3are has to !e taBen to for3e program to e9e3,te a!ove 1/ 1eg ine? A1,) *ake sure that link option is A*& !H21 and )*& !HA"A. %ompile option should ne7er ha7e (I4!.*A/). B+$(I4! can 0e ,E, efficient enou<h. Q7") 4o5 do yo, s,!mit <CL via a Co!o program? A12) +se a file //dd1 sysoutH.L, intrdr)write your P%5 to this file. Pl some on try this out. Q7*) 4o5 to e9e3,te a set of <CL statements from a COBOL program A16) +sin< !/!% %I%( (P&&5 C)I#!.7ar-name) !" -!/!% command. 7ar-name is a %&B&5 host structure containin< P%5 statements. Q7-) (ive some advantages of 2&:&?IN&) 3 a,se. A19) 1. Aou can )! !$I"! a 'aria0le from one PI%#+)! class to another PI%#+)! class 0y usin< the same memory location. ,. By )! !$I"!( we can I"I#IA5I(! the 7aria0le in C&)EI"G-(#&)AG! (ection itself. 2. Ce can )! !$I"! a (in<le 'aria0le into so many su0 7aria0les. .#his facility is 7ery useful in sol7in< A,=== Pro0lem.) Q7/) What is the differen3e !et5een stati3 3a & :ynami3 3a A1:) In the case of (tatic call, the called pro<ram is a stand-alone pro<ram, it is an eDecuta0le pro<ram. urin< run time we can call it in our called pro<ram. As a0out ynamic call, the called pro<ram is not an eDecuta0le pro<ram it can eDecuted throu<h the called pro<ram Q7+) What do yo, fee maBes a good program? A1;) A pro<ram that follows a top down approach. It is also one that other pro<rammers or users can follow lo<ically and is easy to read and understand. Q7.) 4o5 do yo, 3ode Co!o to a33ess a parameter that has !een defined in <CL? $nd do yo, 3ode the =$21 parameter on the &@&C ine in <CL? $7.) 1) usin< P%5 with sysin. //sysin dd Lhere u code the parameters.7alue) to pass in to co0ol pro<ram /L and in pro<ram you use accept 7aria0le name.one accept will read one row)/.another way. ,) in Ncl usin< parm statement eDF in eDec statement parmHGNohnG,Gda7idG in co0ol p<m u ha7e to code linka<e section in that for first 7alue you code len<th 7aria0le and 7aria0le name say, a0c pic D.6).it will take Nohn inside to read neDt 7alue u ha7e to code another 7aria0le in the same way a0o7e mentioned. Q77) Why do 5e 3ode )7A*) 3omp. Inspite of Bno5ing 3omp'" 5i o33,py ess spa3e. A11) >ere s1.6)comp is small inte<er ,so two words e8ual to 1 0yte so totally it will occupy , 0ytes.6 words).here in s1.6) comp-2 as one word is e8ual to 1/, 0yte.6 words e8ual to , 0ytes and si<n will occupy 1/, 0yte so totally it will occupy 2 0ytes. Q188) #he ma9im,m n,m!er of dimensions that an array 3an have in COBOL'.- is ''''''''''' ? A1==) (!'!" in %&B&5 - @9 and #>)!! in %&B&5 - @6 Q181) 4o5 do yo, de3 are a host varia! e Ain COBOL) for an attri!,te named &mp'Name of type >$2C4$2A2-) ? $181) =1 !*P-G)P. 61 !-5!" PI% (1.6) %&*P. 61 !-"A*! PI% /.,9). Q182) What is Comm? A1=,) %&** - >A5$ C&) BI"A)A

Q18") :ifferentiate COBOL and COBOL'II. A1ost of o,r programs are 5ritten in COBOLII; so; it is good to Bno5; ho5; this is different from COBOL) A1=2) #he followin< features are a7aila0le with '( %&B&5 IIF 1. *'(//A and *'(/!(A support #he compiler and the o0Nect pro<rams it produces can 0e run in either ,6- or 21-0it addressin< mode. ,. '*//A and '*/!(A support #he compiler and the o0Nect pro<rams it produces can 0e run in either ,6- or 21-0it addressin< mode. 2. '(!/!(A support #he compiler and the o0Nect pro<rams it produces can 0e run under '(!/!(A. Q18*) A1=6) What is =&2?O21 ? What is >$2CIN( ? A1ore detai s a!o,t these 3 a,ses) #he P!)$&)* statement is a P)&%! +)! I'I(I&" statement which transfers control to one or more specified procedures and controls as specified the num0er of times the procedures are eDecuted. After eDecution of the specified procedures is completed .i.e., for the appropriate num0er of times or until some specified condition is met), control is transferred to the neDt eDecuta0le statement followin< the P!)$&)* statement. #here are 9 types of P!)$&)* statementsF a) 0) c) d) e) Basic P!)$&)* P!)$&)* #I*!( P!)$&)* +"#I5 P!)$&)* 'A)AI"G I"-5I"! P!)$&)*

Q18-) 4o5 many se3tions are there in data division?. A1=9) (I/ (!%#I&"( 1.$I5! (!%#I&" ,.C&)EI"G-(#&)AG! (!%#I&" 2. 5&%A5-(#&)AG! (!%#I&" 6.(%)!!" (!%#I&" 9.)!P&)# (!%#I&" :. 5I"EAG! (!%#I&" Q18/) What is 2edefines 3 a,se? A1=:) )edefines clause is used to allow the same stora<e allocation to 0e referenced 0y different data names . Q18+) 4o5 many !ytes does a s7A*)3omp'" fie d o33,py? A1=;) 2Bytes .formula F n/, ? 1)) Q18.) What is the different !et5een inde9 and s,!s3ript? A1=@) (u0script refers to the array of occurrence , where as IndeD represents an occurrence of a ta0le element. An indeD can only modified usin< perform, search 3 set. "eed to ha7e an indeD for a ta0le in order to use (!A)%> and (!A)%> All. Q187) What is the differen3e !et5een )tr,3t,red COBOL =rogramming and O!Fe3t Oriented COBOL programming? A1=1) (tructured pro<rammin< is a 5o<ical way of pro<rammin<, you di7ide the functionalities into modules and code lo<ically. &&P is a "atural way of pro<rammin<I you identify the o0Nects first, and then write functions, procedures around the o0Nects. (orry, this may not 0e an ade8uate answer, 0ut they are two different pro<rammin< paradi<ms, which is difficult to put in a sentence or two. Q118) What divisions; se3tions and paragraphs are mandatory for a COBOL program? A11=) I !"#I$I%A#I&" I'I(I&" and P)&G)A*-I para<raph are mandatory for a compilation error free %&B&5 pro<ram.

Q111) Can <0)#I?I&: !e ,sed for a the data types? A111) "o, it can 0e used only with alpha0etic and alphanumeric data types. Q112) What happens 5hen 5e move a 3omp'" fie d to an edited Asay D A7). %%') A11,) the editin< characters r to 0e used with data items with usa<e clause as display which is the default. Chen u tries displayin< a data item with usa<e as computational it does not <i7e the desired display format 0ecause the data item is stored as packed decimal. (o if u want this particular data item to 0e edited u ha7e to mo7e it into a data item whose usa<e is display and then ha7e that particular data item edited in the format desired. Q11") What 5i happen if yo, 3ode (O B$CJ instead of )#O= 20N in a stand'a one COBOL program i.e. a program 5hi3h is not 3a ing any other program ? A112) Both <i7e the same results when a pro<ram is not callin< any other pro<ram. G& BA%E will <i7e the control to the system e7en thou<h it is a sin<le pro<ram. Q11*) 5hat is the differen3e !et5een e9terna and g o!a varia! es? A116) Glo0al 7aria0les are accessi0le only to the 0atch pro<ram whereas eDternal 7aria0les can 0e referenced from any 0atch pro<ram residin< in the same system li0rary. Q11-) Co, are 5riting report program 5ith * eve s of tota sE 3ity; state; region and 3o,ntry. #he 3odes !eing ,sed 3an !e the same over the different eve s; meaning a 3ity 3ode of 81 3an !e in any n,m!er of states; and the same app ies to state and region 3ode so ho5 do yo, do yo,r 3he3Bing for !reaBs and ho5 do yo, do add to ea3h eve ? A119) Always compare on the hi<hest-le7el first, 0ecause if you ha7e a 0reak at a hi<hest le7el, each le7el 0eneath it must also 0reak. Add to the lowest le7el for each record 0ut add to the hi<her le7el only on a 0reak. Q11/) What is differen3e !et5een COBOL and >) COBOL II?. A11:) In usin< %&B&5 on P% we ha7e only flat files and the pro<rams can access only limited stora<e, whereas in '( %&B&5 II on */$ the pro<rams can access up to 1:*B or ,GB dependin< on the addressin< and can use '(A* files to make I/& operations faster. Q11+) Why o33,rs 3an not !e ,sed in 81 eve ? A11;) Because, &ccurs clause is there to repeat fields with same format, not the records. Q11.) What is report'item? A11@) A )eport-Item Is A $ield #o Be Printed #hat %ontains !dit (ym0ols Q117) :ifferen3e !et5een ne9t and 3ontin,e 3 a,se A111) #he difference 0etween the neDt and continue 7er0 is that in the continue 7er0 it is used for a situation where there in no !&$ condition that is the records are to 0e accessed a<ain and a<ain in an file, whereas in the neDt 7er0 the indeDed file is accessed se8uentially, read neDt record command is used. Q128) What is the Importan3e of (LOB$L 3 a,se $33ording to ne5 standards of COBOL A1,=) Chen any data name, file-name, )ecord-name, condition name or IndeD defined in an Includin< Pro<ram can 0e referenced 0y a directly or indirectly in an included pro<ram, Pro7ided the said name has 0een declared to 0e a <lo0al name 0y G5&BA5 $ormat of Glo0al %lause is=1 data-1 pic 1.9) I( G5&BA5. Q121) What is the =,rpose of =OIN#&2 =hrase in )#2IN( 3ommand A1,1) #he Purpose of P&I"#!) phrase is to specify the leftmost position within recei7in< field where the first transferred character will 0e stored Q122) 4o5 do 5e get 3,rrent date from system 5ith 3ent,ry? A1,,) By usin< Intrinsic function, $+"%#I&" %+))!"#- A#!

Q12") What is the ma9im,m ength of a fie d yo, 3an define ,sing CO1='"? A1,2) 1= Bytes .(1.1@) %&*P-2). Q12*) Why do 5e 3ode s7 A*) 3omp? In spite of Bno5ing 3omp'" 5i o33,py ess spa3e? A1,6) >ere s1.6)comp is small inte<er, so two words e8ual to 1 0yte so totally it will occupy , 0ytes.6 words).here in s1.6) comp-2 as one word is e8ual to 1/, 0yte.6 words e8ual to , 0ytes and si<n will occupy 1/, 0yte so totally it will occupy 2 0ytes. Q12-) What is the LINJ$(& )&C#ION ,sed for? A1,9) #he linka<e section is used to pass data from one pro<ram to another pro<ram or to pass data from a P)&% to a pro<ram. Q12/) :es3ri!e the differen3e !et5een s,!s3ripting and inde9ing ? A1,:) IndeDin< uses 0inary displacement. (u0scripts use the 7alue of the occurrence. 1. ,. 2. 6. 9. :. ;. @. 1. 1=. 11. 1,. 12. 16. 19. 1:. Chat ) , of the common forms of the !'A5+A#! (#A#!*!"# Q Chat does the initialiOe statement do Q Chat is the reference modification. "ame some of the eDamples of %&B&l 11Q Chat are '( %&B&5 11 special featuresQ Chat are options ha7e 0een remo7ed in %&B&5 11Q Chat is the file or<aniOation clause Q Chat is a su0script Q Chat is an indeD for ta0lesQ Chat are the two search techni8ues Q Chat is an in-line perform Q Chat is %A55 statement in %&B&5Q Chen can the +(I"G phrase 0e included in the call statement Q In !B% I%, how would the num0er 1,26 0e storedQ >ow would the num0er ?1,26 0e stored if a PI% clause of PI%#+)!s1.6) comp-2 were usedQ Chat is Alternate IndeD Q >ow is it different from re<ular indeD Q

C,stomer Information Contro )ystemACIC))


IB*s %ustomer Information %ontrol (ystem .%I%() is an on-line teleprocessin< system de7eloped 0y IB*. By pro7idin< a sophisticated control and ser7ice data0ase/data communication system, the application de7eloper can concentrate on fulfillin< specific 0usiness needs rather than on communication and internal system details. %I%( allows data to 0e transmitted from the terminal to the host computer, ha7e the data processed, access files/data0ases, and then ha7e data to 0e transmitted from the terminal to the host computer, ha7e the data processed, access files/data0ases, and then ha7e data transmitted 0ack to the terminal. #o accomplish that, %I%( uses a telecommunication packa<e such as '#A* or #%A* and 7arious file access methodsF '(A*, 5/1, B,, etc. #he latest release %I%(/!(A is )elease 2.2. (ome of the new functionality includesF 1. ,. 2. 6. $unctionality %I%( pro7ides the followin< supportF Data Communications An interface 0etween the terminal and printers with %I%( 7ia a telecommunication access method .#%A* or '#A*). *ulti )e<ion &peration.*)&), throu<h which more than one %I%( re<ion of a system can communicate Intersystem %ommunication .I(%), throu<h which one %I%( re<ion of a system can communicate with other %I%( re<ions in other systems Application Programming Interfaces with pro<rammin< lan<ua<es such as %&B&5 and Assem0ler %ommand le7el translator An !Decution ia<nostic $acility .! $) !Dpanded features for the system pro<rammer Impro7ed a0o7e the line stora<e utiliOation "ew options for many %I%( commands Impro7ed cross-platform communication facilities

A %ommand Interpreter Data Handling An interface with data0ase access methods such as B,, 5/1, and '(A* An interface with error checkin< and reportin< facilities #ermino ogyE %I%( has its own lan<ua<e. (ome of the lan<ua<e a00re7iations of %I%( areF (I# (ystem InitialiOation #a0le

%#

P%# PP# #%# $%# #%P #%#+A # Q !IP $%P I%P E%# P%P (%P #%A #%##! #(Q #CA AI %CA *)& QI

Pro<ram %ontrol #a0le Pro<ram Processin< #a0le #erminal %ontrol #a0le $ile %ontrol #a0le #erminal %ontrol Pro<ram #erminal %ontrol #erminal +ser Area estination %ontrol #a0le #ransient ata Queue !Decution Interface Pro<ram $ile %ontrol Pro<ram Inter7al %ontrol Pro<ram #ask %ontrol Pro<ram Pro<ram %ontrol Pro<ram (tora<e %ontrol Pro<ram #ask %ontrol Area #erminal %ontrol #a0le #erminal !ntry #emporary (tora<e Queue #ask Cork Area Attention Identifier %ommon Cork Area *ulti )e<ion &peration Queue Identifier

Q1) What are the si9 different types of arg,ment va ,es in COBOL that 3an !e p a3ed in vario,s options of a CIC) 3ommand? A1) :ata >a ,e - !/ .5iteral @ or ;; E!A5!" PI% (1.6) %&*P 'A5+! @.) :ata $rea - !/ .=1 )!%&) -A)!A. =9 $I!5 1 PI% /.9). ) =ointer'2ef - !/ .=9 P&I"#!)-I PI% (1.@) %&*P. ) Name - !/ .=9 $I5!-"A*! PI% /.9) 'A5+! R$I5!A. ) La!e - %o0ol para<raph name 4411)) - !/ .;; #I*!'A5 PI% (1.;) %&*P2. ) Q2) Jind y spe3ify the =IC 3 a,se for the fo o5ing Any B55 %ell, ata type of 5en<th &ption field, >>**(( type of data fields A,) Any B55 %ell - )7A.) CO1= ata type of 5en<th &ption field - )7A*) CO1= >>**(( type of data fields ' )7A+) CO1=" Q") )pe3ify CIC) transa3tion initiation pro3ess. A?rom the perspe3tive of CIC) 3ontro programs and 3ontro ta! es.) A2) #%P places data in #I&A and correspondin< entry into #%#. E%P ac8uires the transaction identifier from #I&A and 7erifies if it is present in P%#. (%P ac8uires (tora<e in #ask %ontrol Area .#%A), in which E%P prepares control data for the task. E%P then loads the application pro<rams mentioned in P%# 0y lookin< for it in PP#. If resident - real stora<e memory location is not present in the PP# the control is passed to P%P that loads the application pro<rams from the physical stora<e location address <i7en in PP#. #he control is then passed to the application pro<ram .5&A module). Q*) List the seI,en3e of steps ,sed to a3hieve K1odifi3ation in )Bip )eI,entia 1ode.L A6) I. )!A "!/# command II. Issue the !" B) command III. Issue the )!A command with + #A! option. I'. *anipulate the record . !5!#! or )!C)I#! command) '. Issue (#A)# command

'I. Issue two )!A "!/# commands .&ne for dummy skip) 'II. Go to step two. Q-) )pe3ify the reI,irements for $,tomati3 #asB Initiation. A1ention the 3ontro ta! e; itHs entries and the 3orresponding =ro3ed,re division CIC) 3ommand). A9) $> %# #AP!HI"#)A, !(#I H*(G(, #)A"(I H*(C1, #)IG5!'H1=== !/!% %I%( C)I#!Q # Q+!+!.R*(G(), $)&*. A#A-A)!A), 5!"G#>.*(GS5!") !" -!/!%. Q/) What are the 3ommands ,sed to gain e93 ,sive 3ontro over a reso,r3e Afor &9 a #emporary storage I,e,e.)? A:) !/!% %I%( !"Q !/!% %I%( !Q )!(&+)%!.QI ) )!(&+)%!.QI ) !" -!/!% !" -!/!% Q+) What is the &IB parameter and the CIC) 3ommand ,sed to imp ement =se,do'Conversationa te3hniI,e ,sing sing e =C# ' )ing e ==# entry? A;) !IB%A5!" - #o check if %&**A)!A has 0een passed in terurn command. !/!% %I%( )!#+)" #)A"(I .data-name) %&**A)!A.data-area) 5!"G#>.data-7alue) !" -!/!% Q.) 1ention the - fie ds avai a! e in the sym!o i3 map for every MN$1&:H fie d in the :?41:I ma3ro? (ive a !rief des3ription of these fie ds ANot e93eeding a ine). A@) $I!5 ?5 - )eturn the len<th of teDt entered .or for dymanic cursor positioin<) $I!5 ?$ - )eturns /.@=) if data entered 0ut erased. $I!5 ?A - +sed for attri0utes readin< and settin< $I!5 ?I - +sed for readin< the teDt entered while recei7in< the map. $I!5 ?& - +sed for sendin< information on to the *AP. Q7) What are the t5o 5ays of !reaBing a C=0 !o,nd pro3ess to a o5 other tasBs to gain a33ess to C=0. A1) !/!% %I%( !5AA !/!% %I%( !5AA I"#!)'A5.hhmmss) #I*!.hhmmss) !" -!/!% !" -!/!% P&(# and CAI# commands also achie7e the same result. Q18) 4o5 do yo, initiate another transa3tion? #he transa3tion initiated sho, d !e in a position to retrieve information pertaining to 5hi3h transa3tion has initiated it and from 5hi3h termina . ACode the reI,ired CIC) 3ommands) A1=) !/!% %I%( (#A)# I"#!)'A5.hhmmss)/#I*!.hhmmss) #)A"(I .R#)A") #!)*I .R#)*1) ?2O1Adata'area) L&N(#4Adata'va ,e)

2#2$N)I:A&IB#2NI:) 2#&21I:A&IB#21I:) !" -!/!% !/!% %I%( )!#)I!'! I"#&.data-area) 5!"G#>.data-7alue) )#)A"(I .data-name) )#!)*I .data-name) !" -!/!% Q11) 1ention the option Aa ong 5ith arg,ment type) ,sed in a CIC) 3ommand to retrieve the response 3ode after e9e3,tion of the 3ommand. A11) )!(P. (1.@) %&*.) Q12) WhatHs the CIC) 3ommand ,sed to a33ess 3,rrent date and time? A1,) A(E#I*!. Q1") Into 5hat fie ds 5i the date and time va ,es !e moved after e9e3,tion of the a!ove 3ommand? A12) !IB A#! 3 !IB#I*!. Q1*) 4o5 do yo, terminate an a ready iss,ed :&L$C 3ommand? A16) !/!% %I%( %A"%!5 )!QI .id) !" -!/!% Q1-) 4o5 do yo, dynami3a y set the C02)O2 position to a spe3ifi3 fie d? A19) *&'! -1 to $I!5 ?5 field. *ention %+)(&) option in the (!" command. Q1/) Whi3h option of the =C# entry is ,sed to spe3ify the =? Bey to !e pressed for initiating a transa3tion? A1:) #A(E)!QHP$1 Q1+) )pe3ify the CIC) 3ommand ,sed to read a >)$1 re3ord starting 5ith prefi9 K?L. Code a the re evant options. A1;) !/!% %I%( )!A A#A(!#.R$I5!"A*!) I"#&.data-area) )I $5 .data-area) E!A5!"G#>.1) G!"!)I% 5!"G#>.CE-5!") !" -!/!%. Q1.) 1ention the option ,sed in the CIC) 2&$: 3ommand to gain a33essi!i ity dire3t y to the fi e I6O area. A$ss,me COBOL'II). A1@) (!#.A )!(( &$ 5I"EAG!-A)!A). Q17) Whi3h 3ommand is ,sed to re ease a re3ord on 5hi3h e93 ,sive 3ontro is gained? A11) !/!% %I%( +"5&%E !" -!/!%. Q28) 4o5 do yo, esta! ish a starting position in a !ro5se operation? A,=) !/!% %I%( (#A)#B)---------- !" -!/!%.

Q21) What is the option spe3ified in the read operation to gain m, tip e 3on3,rrent operations on the same dataset? A,1) )!QI .7alue). Q22) What is the CIC) 3ommand that gives the ength of #W$ area? A,,) !/!% %I%( A((IG" #CA5!"G.data-7alue) !" -!/!%. Q2") What are the attri!,te va ,es of )Bipper and )topper fie ds? A,2) A(EIP, P)&#. Q2*) 4o5 do yo, set the 1:# option to MONH stat,s; even if data is not entered? A,6) *ention $(!# option in $>* $ or set it dynamically in the pro<ram usin< $I!5 ?A attri0ute field. Q2-) What option is spe3ified in the )&N: 3ommand to send on y the ,nnamed fie ds on to the s3reen? A,9) *AP&"5ASSSSSSSSSSSSSSS. Q2/) Whi3h CIC) servi3e transa3tion is ,sed to gain a33essi!i ity to CIC) 3ontro ta! es? 1ention the one that has the highest priority. A,:) %! A Q2+) What is the most 3ommon 5ay of !,i ding I,e,e'id of a #)Q? AName the 3onstit,ents of the Q,e,e I:). A,;) #!)*I ?#)A"(A%#I&"-I . Q2.) Into 5hi3h ta! e is the termina id registered? A,@) #%#. Q27) 4o5 and 5here is the #W$ siDe set? . A,1) #CA(I4!H2== in P%# ta0le. Q"8) Whi3h transient data I,e,e s,pports $#I? A2=) I"#)A-PA)#I#I&" ata 8ueue. Q"1) Code the re ated portions of CIC)6COBOL'I programs to gain addressa!i ity to #W$ area assigned to a parti3, ar tasB. $ss,me that the siDe of #W$ area is "88 !ytes. What are the advantages if COBOL'II is ,sed in the p a3e of COBOL? Code the a!ove reI,irement in COBOL'II. A21) %&B&5- II P)&G)A* 5I"EAG! (!%#I&". =1 PA)*5I(#. =, $I55!) PI% (1.@) %&*P. =, #CA-P#) (.1@) %&*P. =1 #CA- A#A-5AA&+#. =, A#A-A)!A P)&%! +)! I'I(I&". TTT. !/!% %I%( A )!(( #CA.#CA-P#)) PI% /.2==).

!" -!/!% (!)'I(! )!5&A #CA- A#A-5AA&+#. %&B&5- II P)&G)A* 5I"EAG! (!%#I&". =1 #CA- A#A-5AA&+#. =9 A#A-A)!A PI% /.2==). P)&%! +)! I'I(I&". TTT. !/!% %I%( A )!(( #CA.A )!(( &$ #CA- A#A-5AA&+#) !" -!/!% TTT Q"2) Code a program meeting the fo o5ing reI,irements. M&1=)H is a transa3tion ,sed to ret,rn information pertaining to an emp oyee 5hen the K&1=I:L is entered on the s3reen. #he information pertaining to an emp oyee is present in a >)$16J):) dataset registered in ?C# as K&1=IN?O2L. #he map and the 5orBing storage se3tion of the emp'info are given for referen3e. If the emp oyee id is fo,nd the information has to !e sent to the s3reen A)tat,s fie d) 5ith the message K&mp IdE @@@ fo,nd.L. If the emp'id Bey is not fo,nd then stat,s fie d sho, d array the message KJey not fo,nd.L and the M&1= I:L fie d sho, d !e set to !right. If the &9it option is set to KCL then the tasB has to terminated. 0se pse,do'3onversation te3hniI,e three A)ing e =C# and ==#). !*P5&A!! I"$&)*A#I&" $&)* !*P I F /// !*P "A*! F UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU !*P !(IG F UUUUU (!/ F U !PA)#*!"# F UUUUUUUUUU (A5A)A F VVVVVVV (#A#+( !/I# F / / - Input $ield U - &utput field .Alphanumeric) V - &utput field ."umeric) *apname - !*P$&)* *apsetname - !*P$&)* 5a0el <i7en to 7arious Rnamed fields on the $>* $ macro while definin< the map shown a0o7e. !*PI , !*P"A*!, !*P !(IG, !PA)#, (!/, (A5A)A, (#A#+( and !/I#I"P. (tructure of the '(A*/E( ( file. Corkin<-(tora<e (ection. =1 !*P-I&A)!A. =9 !*P-)!%. 1= !*P-E!A PI% ///. 1= !*P-"A*! PI% /.2,). 1= !*P-(!/ PI% /. 1= !*P- !P# PI% /.1=) F UUUUUUUUUUUUUUUUUUUU

1= !*P- !(IG PI% /.9). 1= !*P-(A5 PI% 1.;). A2,) %&B&5-II P)&G)A*. C&)EI"G-(#&)AG! (!%#I&". ;; 5!"G#>-&$-A)!A PI% (1.6) %&*P. ;; C(-)%& ! PI% (1.@) %&*P. =1 (#A#+(. =, "&)*A5. =9 $I55!) PI% /.@) 'A5+! R!*P I F R. =9 !*P-I PI% /.2). =9 $I55!) PI% /.:) 'A5+! R$&+" . =, AB"&)*A5 )! !$I"!( "&)*A5. =9 AB*(G PI% /.1;).

=1 !*P-I&A)!A. =9 !*P-)!%. 1= 1= 1= 1= 1= 1= 5I"EAG! (!%#I&". =1 $>%&**A)!A. =9 I"P'A5 P)&%! +)! I'I(I&". TTT.. I$ !IB%A5!"H=

!*P-E!A !*P-"A*! !*P-(!/ !*P- !P# !*P- !(IG !*P-(A5

PI% ///. PI% /.2,). PI% /. PI% /.1=) PI% /.9). PI% 1.;).

PI% /.2).

!/!% %I%( (!" *AP.R!*P$&)*) *AP(!#.R!*P$&)*) !)A(! !" -!/!%. *&'! 2 #& 5!"G#>-&$-A)!A !/!% %I%( )!#+)" #)A"(I .R!*P() %&**A)!A.R(!%) 5!"G#>. A#A-'A5+!) !" -!/!%. !5(! I$I"P'A5 H (!% !/!% %I%( )!%!I'! *AP.R!*P$&)*) *AP(!#.R!*P$&)*) !" -!/!%. !/!% %I%( )!A A#A(!#.R!*PI"$&)) I"#&.!*P-I&A)!A) )I $5 .!*PI I)

5!"G#>.5!"G#>-&$-A)!A) )!(P.C(-)%& !) !" -!/!%. I$ C(-)%& ! "&# H $>)!(P."&)*A5) *&'! RE!A "&# $&+" #& AB*(G *&'! $>B*B)A #& !*PI A !5(! *&'! !*P-"A*! #& !*P"A*!& *&'! !*P-(!/ #& (!/& *&'! !*P- !(IG #& !*P !(IG& *&'! !*P-(A5 #& (A5A)A *&'! !*P- !P# #& !PA)#& *&'! !*P-E!A #& !*P-I *&'! (#A#+( #& (#A#+(&. &@&C CIC) )&N: *AP.R!*P$&)*) *AP(!#.R!*P$&)*) !)A(! !" -!/!%. *&'! 2 #& 5!"G#>-&$-A)!A !/!% %I%( )!#+)" #)A"(I .R!*P() %&**A)!A.R(!%) 5!"G#>.5!"G#>-&$-A)!A) !" -!/!%. !/!% %I%( )!#+)" !" -!/!%. !5(! I$ .!/I#I"PI "&# H RA) !/!% %I%( )!#+)" !" -!/!%. The following are most frequently asked questions (FAQS): Q"") What does K=se,do Conversationa L mean? A22) #he pro<rammin< techni8ue in which the task will not wait for the end-user replies on the terminal. #erminatin< the task e7ery time the application needs a response from the user and specifyin< the neDt transaction to 0e started when the end user press any attention key .!nter, P$1 throu<h P$,6, PA1,PA, and %lear) is pseudocon7ersational processin<. Q"*) &9p ain the means of s,pporting pse,do 3onversation programming. A&.g. )toring and restoring of states; 3ontro f o5; error hand ing) A26) Chen we send a map usin< (!" *AP command. Immediately we release the pro<ram 0y usin< !/!% %I%( )!#+)" command. In this command we mention the #)A"(A%#I&" I which is to 0e eDecuted after recei7in< the map. In this command we also specify the data that should 0e stored in

%&**+"I%A#I&" A)!A for later use. Chen this command is eDecuted the correspondin< pro<ram is released from the memory. After recei7in< the response from the terminal the pro<ram is a<ain loaded and this time the data which we stored in communication area will 0e copied into the workin< stora<e section. And the map will 0e recei7ed with )!%!I'! *AP command. #he 7aria0le !IB%A5!" in !IB holds the len<th of communication area. In procedure di7ision we checks the 7alue of !IB%A5!" If it is Oero, we first send the map followed 0y )!#+)" command. &therwise, that is if !IB%A5!" is not Oero, we know that this transaction is not runnin< first time and we recei7e the map 0y usin< )!%!I'! *AP command. Q"-) What is the f,n3tion of the CIC) trans ator? A29) #he %I%( translator con7erts the !/!% %I%( commands into call statements for a specific pro<rammin< lan<ua<e. #here are %I%( translators for Assem0ler, %&B&5, and P5/1. Q"/) 4o5 3an yo, start a CIC) transa3tion other than !y Beying the #ransa3tion I: at the termina ? A2:) By codin< an !/!% %I%( (#A)# in the application pro<ram 1. By codin< the trans id and a tri<<er le7el on the %# ta0le ,. By codin< the trans id in the !/!% %I%( )!#+)" command 2. By associatin< an attention key with the Pro<ram %ontrol #a0le 6. By em0eddin< the #)A"(I in the first four positions of a screen sent to the terminal. 9. By usin< the Pro<ram 5ist #a0le Q"+) What is the p,rpose of the =rogram List #a! e? A2;) #he Pro<ram 5ist #a0le records the set of applications pro<rams that will 0e eDecuted automatically at %I%( start-up time. Q".) What are the differen3es !et5een and &@&C CIC) @C#L and an &@&C CIC) )#$2# 3ommand? A2@) #he /%#5 command transfer control to another application .ha7in< the same #ransaction I ), while the (#A)# command initiates a new transaction I .therefore a new task num0er). #he /%#5 continues task on the same terminal. (#A)# can initiate a task on another terminal. Q"7) What are the differen3es !et5een an &@&C CIC) @C#L and an &@&C CIC) LINJ 3ommand. A21) #he /%#5 command transfer control to an application pro<ram at the same lo<ical le7el .do not eDpect to control 0ack), while the 5I"E command passes control to an application pro<ram at the neDt lo<ical le7el and eDpects control 0ack. Q*8) What happens to reso,r3es s,pp ied to a transa3tion 5hen an @C#L 3ommand is e9e3,ted? A6=) Cith an /%#5, the workin< stora<e and the procedure di7ision of the pro<ram issuin< the /%#5 are released. #he I/& areas, the G!#*AI" areas, and the chained 5inka<e (ection areas .%ommarea from a hi<her le7el) remain. All eDistin< locks and 8ueues also remain in effect. Cith a 5I"E, howe7er, pro<ram stora<e is also sa7ed, since the transaction eDpects to return and use it a<ain. Q*1) What CIC) 3ommand do yo, need to o!tain the ,ser ogon'id? A61) Aou must code !/!% %I%( A((IG" with the &P!)I option. Q*2) What is a resident program? A6,) A pro<ram or map loaded into the %I%( nucleus so that it is kept permanently in main stora<e and not deleted when %I%( <oes W(hort &n (tora<eX. Q*") What is &IB. 4o5 it 3an !e ,sed?

A62) %I%( automatically pro7ides some system-related information to each task in a form of !/!% Interface Block .!IB), which is uni8ue to the %I%( command le7el. Ce can use all the fields of !IB in our application pro<rams ri<ht away. Q**) What is some of the information avai a! e in the &IB area? A66) I. #he cursor position in the map II. #ransaction I III. #erminal I I'. #ask "um0er '. 5en<th of communication area 'I. %urrent date and time 'II. Attention identifier Q*-) What information 3an !e o!tained from the &IB2CO:&? A69) #he !IB)%& ! tells the application pro<ram if the last %I%( command was eDecuted successfully and, if not, why not. Q*/) What is the effe3t of in3 ,ding the #2$N)I: in the &@&C CIC) 2&#02N 3ommand? A6:) #he neDt time the end user presses an attention key, %I%( will start the transaction specified in the #)A"(I option. Q*+) &9p ain ho5 to hand e e93eptiona 3onditions in CIC). A6;) An a0normal situation durin< eDecution of a %I%( command is called an eDceptional conditionY. #here are 7arious ways to handle these eDception conditionsF 1. 4and e Condition CommandE It is used to transfer control to the procedure la0el specified if the eDceptional condition specified occurs. ,. Ignore Condition CommandE It causes no action to 0e taken if the condition specified occurs in the pro<ram. #hat is control will 0e returned to the neDt instruction followin< the command which encountered the eDceptional condition. 2. No 4and e OptionE #his option can 0e specified in any %I%( command and it will cause no action to 0e taken for any eDceptional condition occurrin< durin< eDecution of this command. 6. 2&)= OptionE #his option can 0e specified in any %I%( command. If the )!(P option is specified in a command, %I%( places a response code at a completion of the command. #he application pro<ram can check this code, then proceed to the neDt processin<. 4and e 3onditionE In7alid handlin< of %I%( error condition within the pro<ram causin< the loopin<. >ere is one eDample, most pro<ram ha7e !/!% %I%( >A" 5! %&" #I&" !))&).la0el) or !/!% %I%( >A" 5! AB!" 5AB!5.la0el) to trap any error condition or a0end. #his type of codin< is usually accepta0le if they handle the error / a0end correctly in their handlin< para<raph. >owe7er, the pro<ram often cause another error or a0end within the handlin< routine. In that case, loopin< or sos will occur. I stron< recommend that the followin< statement should 0e included in their !))&) handlin< para<raph. !/!% %I%( >A" 5! %&" #I&" !))&) !" -!/!%. It means that from now on, %I%( will handle all the errors and will not <o 0ack to error handlin< routine .$or >A" 5! AB!" , code !/!% %I%( >A" 5! AB!" %A"%!5 instead. Please check the application pro<ram reference manual for further eDplanation of these two commands. Besides, not only these two

>A" 5! will cause the pro<ram, other type of error handle mi<ht cause loop too. (o code the >A" 5! command carefully. It is a <ood pro<ram practice to deacti7ate the error handlin< 0y !/!% %I%( >A" 5! %&" I#I&" condition !" -!/!%. &nce you know that the pro<ram wonGt need it anymore. Q*.) What is the f,n3tion of the &@&C CIC) 4$N:L& CON:I#ION 3ommand? A6@) #o specify the para<raph or pro<ram la0el to which control is to 0e passed if the Whandle conditionX occurs. Q*7) 4o5 many 3onditions 3an yo, in3 ,de in a sing e 4$N:L& CON:I#ION 3ommand? A61) "o more than 1: in a sin<le handle condition. If you need more, then you must code another >A" 5! %&" I#I&" command. Q-8) What is the &@&C CIC) 4$N:L& $B&N:? A9=) It allows the esta0lishin< of an eDit so cleanup processin< can 0e done in the e7ent of a0normal task termination. Q-1) What is the differen3e !et5een &@&C CIC) 4$N:L& CON:#ION and an &@&C CIC) I(NO2& 3ommand? A91) A >A" 5! %&" I#I&" command creates a W<o-toX en7ironment. An IG"&)! command does not create a <o-to en7ironmentI instead, it <i7es control 0ack to the neDt se8uential instruction followin< the command causin< the condition. #hey are opposites. Q-2) What happens 5hen a CIC) 3ommand 3ontains the NO4$N:L& option? A9,) "o action is <oin< to 0e taken for any eDceptional conditional occurrin< durin< the eDecution of this command. #he a0normal condition that occurred will 0e i<nored e7en if an !/!% %I%( >A" 5! condition eDist. It has the same effect as the !/!% %I%( IG"&)! condition eDcept that it will not cancel the pre7ious >A" 5! %&" I#I&" for any other command. Q-") When a tasB s,spends a the hand e 3onditions via the =0)4 3ommand; ho5 does the tasB rea3tivate a the hand e 3onditions? A92) By codin< an !/!% %I%( P&P >A" 5! command. Q-*) &9p ain re'entran3y as app ies to CIC). A96) )eentrant pro<ram is a pro<ram which does not modify itself so that it can reenter to itself and continue processin< after an interruption 0y the operatin< system which, durin< the interruption, eDecutes other &( tasks includin< &( tasks of the same pro<ram. It is also called a Yreentera0leY pro<ram orYserially reusa0leY pro<ram. A 8uasi-reentrant pro<ram is a reentrant pro<ram under the %I%( en7ironment. #hat is, the 8uasi-reentrant pro<ram is a %I%( pro<ram which does not modify itself. #hat way it can reenter to itself and continue processin< after an interruption 0y %I%( which, durin< the interruption, eDecutes other tasks includin< %I%( tasks of the same pro<ram. In order to maintain the 8uasi-reentrancy, a %I%( application pro<ram must follow the followin< con7entionF Constants in WorBing )torageE #he 8uasi-reentrant pro<ram defines only constants in its ordinary data area .e.<. workin< (tora<e (ection ). #hese constants will ne7er 0e modified and shared 0y the tasks. >aria! e in :ynami3 WorBing )torageE #he 8uasi reentrant pro<ram ac8uires a uni8ue stora<e area . called ynamic Corkin< (tora<e -- C() dynamically for each task 0y issuin< the %I%( macro e8ui7alent G!#*AI". All 7aria0les will 0e placed in this C( for each task. All counters would ha7e to 0e initialiOed after the C( has 0een ac8uired.

2estri3tion on =rogram $ terationE #he pro<ram must not alter the pro<ram itself. If it alters a %I%( macro or command, it must restore the alteration 0efore the su0se8uent %I%( macro or command. Q--) What are the CIC) 3ommands avai a! e for program 3ontro ? A99) #he followin< commands are a7aila0le for the Pro<ram %ontrol ser7icesF 1. LINJE #o pass control to another pro<ram at the lower le7el, eDpectin< to 0e returned. 2. @C#LE #o pass control to another pro<ram at the same le7el, not eDpectin< to 0e returned. ". 2&#02NE #o return to the neDt hi<her-le7el pro<ram or %I%(. *. LO$:E #o load a pro<ram. -. 2&L&$)&E #o release a pro<ram. Q-/) 4o5 is addressa!i ity a3hieved to the data o,tside programs 5orBing'storage.? A9:) #he Base 5ocator for 5inka<e . B55 ) is an addressin< con7ention used to address stora<e outside the Corkin< (tora<e (ection of an application pro<ram. If B55 is used for the input commands .e.<.F )!A , )!%!I'!), it will impro7e the performance, since the pro<ram would 0e accessin< directly the input 0uffer outside of the pro<ram. In order to work as intended, the pro<ram must construct B55 0ased on the followin< con7entionF 1). #he parameter list must 0e defined 0y means of a =1 le7el data definition in the 5inka<e (ection as the first area definition to the 5inka<e (ection, unless a communication area is 0ein< passed to the pro<ram, in which case $>%&**A)!A must 0e defined first. #he parameter list consists of a <roup of the address pointers, each of which is defined as the full word 0inary field . (1.@) %&*P ). #his is called the B55 cells. ,). #he parameter list is followed 0y a <roup of =1 le7el data definitions, which would 0e the actual data areas. #he first address pointer of the parameter list is set up 0y %I%( for addressin< the parameter list itself. $rom the second address pointer onward, there is a one-to-one correspondence 0etween the address pointers of the parameter list and =1 le7el data definitions. 2). '( %&B&5 II pro7ides %I%( application pro<rams with a si<nificant impro7ements in the area of addressa0ility throu<h the special A )!(( re<ister. #herefore, if an application pro<ram is written in '( %&B&5 II, the pro<ram is no lon<er re8uires 0uildin< the B55 cells in the 5inka<e (ection. Q-+) &9p ain the vario,s 5ays data 3an !e passed !et5een CIC) programs. A9;) ata can 0e passed 0etween %I%( pro<rams in three ways- %&**A)!A, #)A(I!"# A#A Q+!+! 3 #!*P&)A)A (#&)AG! Q+!+!. ata can 0e passed to a called pro<ram usin< the %&**A)!A option of the 5I"E or /%#5 command in a callin< pro<ram. #he called pro<ram may alter the data content of %&**A)!A and the chan<es will 0e a7aila0le to the callin< pro<ram after the )!#+)" command is issued in the called pro<ram. #his implies that the called pro<ram does not ha7e to specify the %&**A)!A option in the )!#+)" command. If the %&**A)!A is used in the callin< pro<ram, the area must 0e defined in the Corkin< (tora<e (ection of the pro<ram .callin<), whereas, in the called pro<ram, the area must 0e defined as the first area in the 5inka<e (ection, usin< reser7ed name $>%&**A)!A. Q-.) What is the differen3e !et5een ,sing the 2&$: 3ommand 5ith IN#O option and )&# option?

A9@) Chen we use I"#& option with the )!A command the data content of the record will 0e mo7ed into the specified field defined in the Corkin< (tora<e (ection of the pro<ram. Chen we use (!# option with the )!A command , %I%( sets the address pointer to the address of the record in the file input / output area within %I%(, so that the application pro<ram can directly refer to the record without mo7in< the record content into the Corkin< (tora<e area defined in the pro<ram. #herefore, the (!# option pro7ides a 0etter performance than the I"#& option. Q-7) Can 5e define an a ternate inde9 on >)$1622:) ? A91) "o Q/8) What is the differen3e !et5een the IN#O and the )&# option in the &@&C CIC) 2&C&I>& 1$= 3ommand? A:=) #he I"#& option mo7es the information in the #I&A into the reser7ed specified area, while the (!# option simply returns the address of the #I&A to the specified B55 cell or Waddress-ofX a linka<e-section. Q/1) 4o5 to esta! ish dynami3 3,rsor position on a map? 4o5 to get the 3,rsor position 5hen 5e re3eive a map? A:1) Ce dynamically position a cursor throu<h an application pro<ram usin< a sym0olic name of the sym0olic map 0y placin< -1 into the field len<th field . i.e., fieldname ? 5) of the field where you wish to place the cursor. #he (!" *AP command to 0e issued must ha7e the %+)(&) option . without 7alue ). Also, the mapset must 0e coded with *& ! H I"&+# in the $>*( macro. Ce <et the cursor position when we recei7e a map 0y checkin< !IB%P&(", which is a halfword . (1.6) %&*P) 0inary field in !IB, and contains offset position .relati7ely to Oero ) of the cursor on the screen. Q/2) What is 1:#? A:,) * # . *odified ata #a< ) is one 0it of the attri0ute character. If it is off . = ), it indicates that this field has not 0een modified 0y the terminal operator. If it is on . 1 ), it indicates that this field has 0een modified 0y the operator. &nly when * # is on, will the data of the field 0e sent 0y the terminal hardware to the host computer . i.e., to the application pro<ram, in end ). An effecti7e use of * # drastically reduces the amount of data traffic in the communication line, there0y impro7in< performance si<nificantly. #herefore, B*( maps and %I%( application pro<rams should 0e de7eloped 0ased on careful considerations for * #. Q/") What are the three 5ays avai a! e for a program to position the 3,rsor on the s3reen? A:2) I. (tatic positionin<. %ode the insert cursor .I%) in the $>* $ B*( macro. II. )elati7e positionin<. %ode the %+)(&) option with a 7alue relati7e to Oero.position 1,1 is Oero) . III. (ym0olic positionin<. *o7e hi<h 7alues or -1 to the field len<th in the sym0olic map.and code %+)(&) on the (!" command). Q/*) Name three 5ays the 1odified :ata #ag 3an !e set on? A:6) #he *odified ata #a< can 0e set onF 1. Chen the user enters data into the field. ,. Chen the application pro<ram mo7es $>B*$(! to the attri0ute character. 2. By definin< it in the B*( macro definition. Q/-) What is a mapset? A:9) A mapset is a collection of B*( maps link-edited to<ether. Q//) What is the f,n3tion of :?41:? B1) ma3ro? A::) #he $>* $ macro defines fields, literal, and characteristics of a field.

Q/+) Why is a #&21 I: re3ommended in naming a #)Q? A:;) In order to a7oid confusion and to maintain data security, a strict namin< con7ention for QI will 0e re8uired in the installation. *oreo7er, for a terminal-dependent task .e.<., pseudo-con7ersational task), the terminal id should 0e included in QI in order to ensure the uni8ueness of #(Q to the task. Q/.) &9p ain the !asi3 differen3e !et5een Intra partition #:Q and &9tra partition #:Q. A:@) I"#)A PA)#I#I&" # Q+!+!s It is a <roup of se8uential records which are produced 0y the same and / or different transactions within a %I%( re<ion. #hese Qs are stored in only one physical file . '(A* ) in a %I%( re<ion, which is prepared 0y the system pro<rammer. &nce a record is read from a 8ueue, the record will 0e lo<ically remo7ed from the 8ueueI that is the record cannot 0e read a<ain. !/#)A PA)#I#I&" # Q+!+!s It is a <roup of se8uential records which interfaces 0etween the transactions of the %I%( re<ion and the systems outside of %I%( re<ion. !ach of these # Qs is a separate physical file, and it may 0e on the disk, tape, printer or plotter. Q/7) What are the differen3es !et5een #emporary )torage Q,e,e A#)Q) and #ransient :ata Q,e,e A#:Q).? A:1) #emporary (tora<e Queue names are dynamically defined in the application pro<ram, while # Qs must first 0e defined in the %# . estination %ontrol #a0le). Chen a # Q contains certain amount of records .#ri<<er le7el), a %I%( transaction can 0e started automatically. #his does not happen when usin< a #(Q. # Q.eDtra partition) may 0e used 0y 0atch applicationI #(Q cannot 0e accessed in 0atch. #he #ransient ata Queue is actually a Q(A* file. Aou may update an eDistin< item in a #(Q. A record in a # Q cannot 0e updated. )ecords in #(Q can 0e read randomly. #he # Q can 0e read only se8uentially. )ecords in #emporary (tora<e can 0e read more than once, while records stored in #emporary ata Queues cannot. Cith # Qs it is Wone readX only. Q+8) What is the differen3e !et5een getting the system time 5ith &IB#I1& and $)J#I1& 3ommand? A;=) #he A(E#I*! command is used to re8uest the current date and time. Chereas, the !IB#I*! field ha7e the 7alue at the task initiation time. Q+1) What does the fo o5ing transa3tions do? $+1) C&:? E %I%(-supplied !Decution ia<nostic $acility transaction. It pro7ides interacti7e pro<ram eDecution and de0u<<in< functions of a %I%( pro<rams. C&1# E %I%(-supplied !Dtended *aster #erminal transaction. It displays or manipulates %I%( control en7ironment interacti7ely. C&B2 E %I%(-supplied #emporary (tora<e Browse transaction. It displays the content of #emporary (tora<e Queue . #(Q ). C&CI E %I%(-supplied %ommand Interpreter transaction. It 7erifies the syntaD of a %I%( command and eDecutes the command. Q+2) &9p ain f oating maps 5ith i ,stration. A;,) *aps which can position themsel7es relati7e to the pre7ious maps on the screen or pa<e are known as the floatin< maps. $or this you ha7e to use special positional operands to 5I"! and %&5+*" parameters of the B*( macro definition. #hey are (A*!, "!/#. Actually this floatin< map concept is there only in $ull B*( where as it is not a7aila0le in *in. or (tandard B*( macros. )!%!I'! *AP is not recommended in the case of floatin< maps. >ence these maps are normally used to send information such as selected records from a data0ase to screen 0ut not for data entry. A mapset can contain more than one m ap in it, you may use all these maps to 0uild a screen. In that case there are two ways to send these maps on to the screen i ) +se separate (!" *AP commands one for each map in7ol7ed. or

ii) +se A%%+* operand alon< with (!" *AP command and while sendin< really on to the screen use (!" PAG! to display them at one shot. #he second one is called cumulati7e mappin< scheme where you also can use floatin< maps. 5etGs take a situation where you ha7e to 0uild a screen like this >!A !) *AP .no. of A <r. employs) !#AI5 *AP .employee list ) #)AI5!) *AP .Press a key to continue...)

+nder such situations whate7er the detail map needed that is to 0e displayed a<ain and a<ain to display all the information one screenful at a time. In this floatin< map concept helps. %ode the map like this *1 $>* I ...... >!A !)HA!(,P+(#I$AH$I)(#.................. *, $>* I ...T ......................... 5I"!H"!/#.................... *2 $>* I ........#)AI5!)HA!(,P+(#I$AH5A(#........................... >ere *, is detail map, which is coded as floatin< map. ProcedureF !7ery time usin< cumulati7e map techni8ue send header .first) and followed 0y detail map neDt into a pa<e 0uffer once the pa<e is full an o7erflow occurs 0y usin< %I%( >A" 5! &'!)$5&C command send first trailer map then header map . #his will do two thin<s a) it sends pre7ious map on to the screen 0) starts fresh pa<e 0uffer ). )epeated this until no more records to 0e retrie7ed. >ere *, is the one which holds the record 7alues read from the file. Q+") What is the f,n3tion of the #ermina Contro #a! eA#C#)? A;2) #he #%# defines the characteristics of each terminal with which %I%( can communicate. Q+*) What does it mean 5hen &IBC$L&N is eI,a to Deros? A;6) Chen the len<th of the communication area .!IB%A5!") is e8ual to Oeros, it means that no data was passed to the application. Q+-) 4o5 3an the fa3t that &IBC$L&N is eI,a to Deros !e of ,se to an app i3ation programmer? A;9) Chen workin< in a pseudo-con7ersational mode, !IB%A5!" can 0e checked if it is e8ual to Oero. A pro<rammer can use this condition as a way of determinin< first time usa<e.of the pro<ram). Q+/) Whi3h CIC) system program is responsi! e for hand ing a,tomati3 tasB initia iDation? A;:) #he #ransient ata Pro<ram.# P). Q++) In an on' ine environment; ho5 3an yo, prevent more than one ,ser from a33essing the same #ransient :ata Q,e,e at the same time? A;;) By issuin< an !/!% %I%( !"Q a<ainst the resource. Chen processin< is completed, a !Q should 0e eDecuted. Q+.) When an app i3ation is invoBed via the &@&C CIC) )#$2# 3ommand 5ith the from option; ho5 does the app i3ation gain a33ess to the 3ommon area? A;@) An !/!% %I%( )!#)I!'! command will access the common area. Q+7) #he :?4CO11$2&$ is ,sed to pass information from one app i3ation to another. What are some other 5ays that this f,n3tion 3an !e a33omp ished? A;1) Aou can also pass information in the followin< ways. - By usin< a temporary stora<e 8ueue - By usin< an intrapartition # Q - By usin< the #ask Cork Area - By usin< #%#+A - #hrou<h a file

Q.8) 4o5 do yo, define #asB WorB $rea? A@=) By definin< it on the P%# .the Pro<ram %ontrol #a0le) Q.1) What information do yo, get 5hen an &@&C CIC) )#$2#CO:& is iss,ed? A@1) Aou will 0e a0le to determine if the application was started 0y .1) a transient data tri<<er le7el.Q ), .,) a (#A)# command .(,( ), .2) user .+) or terminal input .# ), or .6) istri0uted Pro<ram 5ink. , (). Q.2) Whi3h CIC) 3ommand m,st !e iss,ed !y the app i3ation program in order to gain a33ess to the Common WorB $reaACW$)? A@,) !/!% %I%( A )!(( with %CA option. Q.") In 5hi3h CIC) ta! e 5o, d yo, spe3ify the ength of the #$)J WO2J $2&$ A#W$)? A@2) In the Pro<ram %ontrol #a0le.P%#). Q.*) What is a dead o3B? A@6) eadlock .also known as a Wdeadly em0raceX) occurs when a task is waitin< for a resource held 0y another task which, in turn, is waitin< for a resources held 0y the first task. Q.-) &9p ain the term #ransa3tion ro,ting? A@9) #ransaction routin< is a %I%( mode of intercommunication which allows a terminal connected to local %I%( to eDecute another transaction owned 0y a remote %I%(. Q./) &9p ain the term ?,n3tion 2eI,est )hipping? A@:) $unction re8uest shippin< is one of the %I%( modes of intercommunication which allows an application pro<ram in a local %I%( to access resources owned 0y a remote %I%(. Q.+) &9p ain the term K12OL A1, ti 2egion Operation)? A@;) *)& is the mechanism 0y which different %I%( address spaces with in the same %P+ can communicate and share resources. Q..) What are different system ta! es ,sed in CIC)? A@@) P%#, $%#, #%#, %#, PP# Q.7) What is m, titasBing and m, tithreading? A@1) *ultitaskin< is the feature supported 0y the operatin< system to eDecute more than one task simultaneously. *ultithreadin< is the system en7ironment where the tasks are sharin< the same pro<rams load module under the multitaskin< en7ironment. It is a su0set of multitaskin< since it concerns tasks which use the same pro<ram. Q78) What is the differen3e !et5een inB 93t ? A1=) 5ink is temporary transfer of control. /ctl is permanent transfer of control Q71) Name some of the 3ommon ta! es in CIC) and their ,sage. A11) P%# Pro<ram %ontrol #a0le - defines each transaction, containin< a list of 7alid transaction identifiers .transid) where each transaction is paired with its matchin< pro<ramI PP# Pro<ram Processin< #a0le - contains a list of 7alid pro<ram names and maps and whether a current 7ersion is in the %I%( re<ion or needs to 0e 0rou<ht in as a new copyI

$%# $ile %ontrol #a0le #%# #erminal %ontrol #a0le

- contains a list of files known to %I%(, the dataset name and status .closed/open, ena0led/disa0led)I - a list of the terminals known to %I%(.

Q72) Name some 3ommon CIC) servi3e programs and e9p ain their ,sage? A1,) #erminal %ontrol, $ile %ontrol, #ask %ontrol, (tora<e %ontrol, etc. !ach %I%( ser7ices pro<ram controls the usa<e and status for its resource .file, terminal, etc) within the %I%( re<ion. Q7") What is meant !y a CIC) tasB? A12) A %I%( task eDists from the time the operator presses the enter key until the application pro<ram returns control to %I%(. Q7*) What is meant !y program reentran3e? A16) A pro<ram is considered reentrant if more than one task can eDecute the code without interferin< with the other tasksG eDecution. Q7-) What is the 3ommon systems area AC)$)? A19) #he common systems area is the maNor %I%( control 0lock that contains system information, includin< pointers to most other %I%( control 0locks. #he %(A points to all mem0ers of (#A#I% stora<e. Q7/) What is the CO11$2&$A3omm,ni3ations area)? A1:) #his is the area of main stora<e desi<ned to let pro<rams or tasks communicate with one another, used in pro<rams 7ia )!#+)", /%#5 and 5I"E commands. Q7+) What is the &IB Ae9e3,te interfa3e ! o3B)? A1;) #he eDecute interface 0lock lets the pro<ram communicate with the eDecute interface pro<ram, which processes %I%( commands. It contains terminal id, time of day and response codes. Q7.) What is an 1:# A1odified :ata #ag) ' itGs meaning and ,se? A1@) #he modified data ta< is the last 0it in the attri0ute 0yte for each screen field. It indicates whether the correspondin< field has 0een chan<ed. Q77) What is a transid and e9p ain the system transid C&1#? A11) #ransid is a transaction identifier, a four character code used to in7oke a %I%( task. %!*# is the master terminal transaction that lets you display and chan<e the status of resources - it is the primary %I%( ser7ice transaction. Q188) What is the 3ommon 5orB area ACW$)? A1==) #he common work area is a stora<e area that can 0e accessed 0y any task in a %I%( system. Q181) 4o5 do yo, a33ess storage o,tside yo,r CIC) program? A1=1) In %&B&5 stora<e was accessed 7ia B55 cells usin< the (!# option of A )!(( commands. In %&B&5 II the special re<ister, A )!(( &$ lets you reference the address of any 5inka<e (ection field. Q182) 4o5 does COBOL II and CIC) re ease 1.+ provide for e93eptiona 3onditions and ho5 does that differ from >) COBOL and ear ier CIC) re eases?

A1=,) '( %&B&5 used the >A" 5! %&" I#I&" command to name routines to pass pro<ram control when eDceptional conditions were encountered. %&B&5 II and %I%( release 1.; introduced the )!(P option on many %I%( commands. Q18") What is the meaning and ,se of the &IB$I: fie d? A1=2) !IBAI is a key field in the eDecute interface 0lockI it indicates which attention key the user pressed to initiate the task. Q18*) 4o5 do yo, 3ontro 3,rsor positioning? A1=6) ItGs controlled 0y the %+)(&) option of the (!" *AP command usin< a direct .= throu<h 1111) or sym0olic 7alue. Q18-) What are attri!,te !ytes and ho5 and 5hy are they modified? A1=9) Attri0ute 0ytes define map field characteristics .0ri<htness, protection, etc)I they are modified prior to issuin< a (!" *AP command, e<. from normal to intense to hi<hli<ht an error field. Q18/) 4o5 do yo, invoBe other programs? What are the pros and 3ons of ea3h method? A1=:) #here are three waysF 1) +se a %&B&5 II %A55 statement to in7oke a su0pro<ram. #his method is transparent to %I%(, which sees only the one load module. ,) An !/!% 5I"E is similar to a callI it in7okes a separate %I%( pro<ram and ends with a )!#+)" to the in7okin< pro<ram. or 2) An !/!% /%#5 which transfers control to another %I%( pro<ram and does not <et control 0ack. Q18+) What is B1)? A1=;) B*( is Basic *ap (upportI it allows you to code assem0ler le7el pro<rams to define screens. Q18.) What is the differen3e !et5een ?)&# and ?2)&#? A1=@) $(!# specifies that the modified data ta< should 0e turned on 0efore the map is sent to the screen. $)(!# turns off the attri0ute 0yteI itGs used to transmit only chan<ed data from the terminal. Q187) What is the differen3e !et5een the enter Bey; the =? Beys and the =$ Beys? A1=1) #he enter and P$ keys transmit data from the screenI the PA keys tell %I%( that a terminal action took place, 0ut data is not transmitted. Q118) &9p ain the differen3e among the &@&C LINJ; &@&C @C#L and Co!o II stati3 3a statements in CIC). A11=) %&B&5 II allows for static calls which are more efficient than the 5I"E instruction which esta0lishes a new rununit. Q111) $re seI,entia fi es s,pported !y CIC)? A111) Aes, 0ut not as part of the $ile %ontrol Pro<ram. #hey are supported as eDtra partition transient data files. Q112) What option 3an !e 3oded on the 2&#02N 3ommand to asso3iate a transa3tion identifier 5ith the ne9t

A11,)

termina inp,t? #he #)A"(I option.

Q11") What is an $)2$? A112) An A()A is the %I%( interrupt code, the e8ui7alent of an *'( a0end code. Q11*) What is temporary storage? A116) #emporary stora<e is either main or auDiliary stora<e that allows the pro<ram to sa7e data 0etween task in7ocations. Q11-) What is transient data? A119) #ransient data pro7ides %I%( pro<rams with a simple method for se8uential processin<, often used to produce output for 2,;= printers. Q11/) What are the t5o types of transient data I,e,es? A11:) #hey are intrapartition, which can only 0e accessed from within %I%( and eDtrapartition, which are typically used to collect data online, 0ut process it in a 0atch en7ironment. Q11+) Where are transient data sets defined to CIC)? A11;) #hey are defined in the destination control ta0le . %#). Q11.) On3e a transient data I,e,e is read; 3an it !e reread? A11@) "o, sillyM #hatGs why IB* calls it transient. Q117) A111) Q128) A1,=) Name some 3ommands ,sed for CIC) fi e !ro5sing. (#A)#B), )!A "!/#, )!A P)!', !" B) and )!(!#B). What other fi e 3ontro pro3essing 3ommands are ,sed for fi e ,pdating? C)I#!, )!C)I#!, !5!#! and +"5&%E.

Q121) What is <o,rna 2e3overy and :ynami3 #ransa3tion Ba3Bo,t? A1,1) Pournal )eco7ery is reco7ery of chan<es made to a file durin< online processin<. If a file has I/& pro0lems it is restored from a 0ackup taken 0efore online processin< 0e<an and the Nournalled chan<es are applied. ynamic transaction 0ackout is the remo7al of partial chan<es made 0y a failed transaction. Q122) What ta! es m,st !e ,pdated 5hen adding a ne5 transa3tion and program? A1,,) At a 0are minimum the Pro<ram %ontrol #a0le . P%#) and Pro<ram Processin< #a0le .PP#) must 0e updated. Q12") What is the meaning of the )CNC=OIN# 3ommand? A1,2) (A"%P&I"# without the )&55BA%E option makes all updates to protected resources permanent, with the )&55BA%E option it re7erses all updates. Q12*) What do the terms o3a ity of referen3e and 5orBing set mean? A1,6) #hey refer to %I%( efficiency techni8ues. 5ocality of reference re8uires that the application pro<ram should consistently reference instructions and data within a relati7ely small num0er of pa<es. #he workin< set is the num0er of pro<ram pa<es needed 0y a task. Q12-) What do the Bey5ords 1$=ONLC and :$#$ONLC mean? A1,9) *AP&"5A is a (!" *AP operand that sends only fields with initial 7alues to the screen. A#A&"5A is the (!" *AP operand that specifies only data from the map area should 0e displayed.

Q12/) What is the 1$))IN)&2# option? A1,:) *A((I"(!)# is a C)I#! option that modifies normal '(A* split processin<, lea7in< free space after the inserted record, so su0se8uent records can 0e inserted without splits. It is ended 0y an +"5&%E command. Q12+) What is a 3,rsor in CIC) sI pro3essing? A1,;) A cursor is a pointer that identifies one row in a s8l results ta0le as the current row. Q12.) What are the :B2 steps reI,ired to migrate a CIC) :B2 program from so,r3e 3ode to oad mod, e? A1,@) A B, precompiler processes some (Q5 statements and con7erts others. It creates a data 0ase re8uest module . B)*) for the 0indin< step. #he 0ind process uses the B)* to create an application plan, which specifies the techni8ues B, will use to process the em0edded (Q5 statements. #he link/edit step includes an interface to the %I%(/ B, attachment facility. Q127) Name some trans ator and 3ompi e options and e9p ain their meaning? A1,1) $or translator (&+)%! option prints the pro<ram listin<, !B+G ena0les ! $ and %&B&5, alerts the system to use the %&B&5 II compiler. $or the compiler /)!$ prints a sorted data cross reference and $ +*P prints a formatted dump if the pro<ram a0ends. Q1"8) What is the signifi3an3e of 2:O? A12=) ) & is )esource efinition &nline. (ince release 1.: ) & allows resources .terminals, pro<rams, transactions and files) to 0e defined interacti7ely while %I%( is runnin<. Q1"1) What is C&CI? A121) %!%I is the command le7el interpreter transid that interacti7ely eDecutes %I%( commands. It is a rudimentary %I%( command de0u<<er which does not re8uire codin< an entire pro<ram. Q1"2) What is C&:?? A12,) %! $ is the eDecute dia<nostic facility that can 0e used for de0u<<in< %I%( pro<rams. Q1"") What is C&B2? A122) %!B) lets you 0rowse the contents of a specific temporary stora<e 8ueue. Q1"*) Name and e9p ain some 3ommon CIC) a!end 3odes? A126) Any A!IS indicates an eDecute interface pro<ram pro0lem - the a0endin< pro<ram encountered an eDceptional condition that was not anticipated 0y the codin<. AP%# - the pro<ram could not 0e found or is disa0led. A()A most common %I%( a0end, indicatin< a pro<ram check, identified 0y a one-0yte code in the Pro<ram (tatus Cord in the dump. AE%P - the task was cancelledI it was suspended for a period lon<er than the transactionGs defined deadlock timeout period. AE%# - #he task was cancelled 0ecause it was waitin< too lon< for terminal input. Q1"-) What is a ogi3a message in CIC)? A129) A lo<ical messa<e is a sin<le unit of output created 0y (!" #!/# or (!" *AP commands. B*( collects the

separate output from each command and treats them as one entity. #his techni8ue may 0e used to 0uild %I%( reports. Q1"/) What are the CIC) 3ommands asso3iated 5ith temporary storage I,e,e pro3essing? A12:) C)I#!Q #(, )!A Q #(, and !5!#!Q, whose meanin<s should 0e self-eDplanatory. Q1"+) What are the CIC) 3ommands asso3iated 5ith transient data I,e,e pro3essing? A12;) C)I#!Q # , )!A Q # , !5!#!Q # , !"Q and !Q. Q1".) What is the meaning of the &NQ and :&Q 3ommands? A12@) "either command is eDclusi7ely a transient data command. #he !"Q command reser7es any user defined resource for the specific task. $or en8ueued transient data no other task will 0e a0le to write records to it for as lon< as it is en8ueued. !Q remo7es the lock. Q1"7) 4o5 do yo, de ete Item " in a five'item #)Q? A121) Aou canGt--at least not directly. &ptions, none of them <ood, includeF I. addin< a lo<ical-delete fla< to the contents of each itemI II. mo7in< item 6 to 2 and 9 to 6 and initialiOin< item 9, all thru rewritesI this is a 7ariant on 1I III. creatin< a new GcopyG #(Q that eDcludes the unwanted item, killin< the old #(Q .delete8 ts), writin< the new #(Q with the ori<inal name from the new #(Q, and then deletin< the GcopyG #(Q. #his way, you will <et an accurate report from "+*I#!*(. Q1*8) What CIC) 3ommand 5o, d yo, ,se to read a >)$1 J):) seI,entia y in as3ending order? A16=) )!A "!/# reads the neDt record from a 0rowse operation for any of the three '(A* files. Q1*1) 4o5 do yo, get data from a tasB that !egan 5ith a )#$2# 3ommand? A161) #he )!#)I!'! command is used to <et data from a task that 0e<an with a (#A)# command. Q1*2) What is interva 3ontro and 5hat are some of the CIC) 3ommands asso3iated 5ith it? A16,) %I%( inter7al control pro7ides a 7ariety of time-related features - common commands are A(E#I*!, $&)*A##I*!, (#A)#, )!#)I!'!, and %A"%!5. Q1*") What is tasB 3ontro and 5hat are the CIC) 3ommands asso3iated 5ith it? A162) #ask control refers to the %I%( functions that mana<e the eDecution of tasks. #ask control commands are (+(P!" , !"Q, and !Q. Q1**) What is the CIC) LO$: 3ommand? A166) #he 5&A command retrie7es an o0Nect pro<ram from disk and loads it into main stora<e - itGs primarily used for a constant ta0le that will 0e a7aila0le system-wide. Q1*-) What is the $B&N: 3ommand and 5hen 5o, d yo, ,se it? A169) #he AB!" command forces a task to end a0normally. It creates a transaction dump and in7okes the dynamic transaction 0ackout. Q1*/) :B2 What is the differen3e !et5een a pa3Bage and a p an. 4o5 does one !ind 2 versions of a CIC)

transa3tion 5ith the same mod, e name in t5o different CIC) regions that share the same :B2 s,!system? A16:) Packa<e and plan are usually used synonymously, as in this site. Both contain optimiOed code for (Q5 statements - a packa<e for a sin<le pro<ram, module or su0routine contained in the data0ase re8uest module . B)*) li0rary. A plan may contain multiple packa<es and pointers to packa<es. #he one %I%( module would then eDist in a packa<e that could 0e referenced in two different plans. Q1*+) 4o5 to !,i d ,p L0 /.2 3omm,ni3ation?N and N5hat =se,do'3onversationa and rea 3onversationa transa3tion are and their differen3es.N A16;) Pseudo-con7ersational transactions are almost always the preferred method. In these mode %I%( releases resources 0etween responses to user input, i.e. the task is ended awaitin< the user response. Q1*.) Why is it important not to e9e3,te a )#O= 20N in CIC) ? A16@) (top run will come out from the %I%( re<ion. Q1*7) Why m,st a CIC) programs have a LinBage )e3tion ? A161) #o pass parameters from appl. Pro<ram to %I%(. Q1-8) $ mapset 3onsists of three maps and 18 fie ds on ea3h map . 4o5 many of the fo o5ing 5i !e needed ? A19=) a) $>*( statements 1 a 0) $>* I statements 2 0 c) $>* $ statements 2= Q1-1) 4o5 are programs reinitiated ,nder CIC) ? A191) (#A)# %&**A" , )!#+)" %&**A" Q1-2) Why doesnHt CIC) ,se the Co!o Open and C ose statements ? A19,) %I%( A+#&*A#I%A55A &P!"( A" %5&(!( #>! $I5!( #>&(! A)! P5A(! I" $%# Q1-") What is the differen3e !et5een a )ym!o i3 map and =hysi3a map ? A192) (A*B&5I% *AP I( +(! BA +(!) A" P>A(I%A5 *AP I( +(! BA (A(#!* Q1-*) Can a program 3hange prote3ted fie d ? A196) "& Q1--) 4o5 is the stopper !yte different from an a,to sBip !yte ? A199) (#&PP!) command will stop after completin< its field , whereas A+#&(EIP command Cill skip to neDt unprotected field after completin< its field. Q1-/) By 5hi3h CIC) defined fie d 3an yo, determine the position of the 3,rsor on the map ? A19:) A##)IB $I!5 Q1-+) 4o5 5i yo, p a3e 3,rsor on a fie d 3a ed M&1=NOH. #his fie d !e ongs to mapset M1$=&1=(H and map M1$=&1=1H and )ym!o i3 map M&mpid'2e3H ? A19;) BA I"(!)#I"G I% I" #>! A##)IB %&**A" Q1-.) 4o5 do yo, p a3e the 3,rsor on a parti3, ar position on the s3reen? ' () A19@) *o7e -1 to the len<th attri0ute of the field and use the %+)(&) option. efine the field with I% in the B*( map. +se %+)(&).n m)QQ

Q1-7) What are the t5o o,tp,ts 3reated as a res, t of generation of a map? ' () A191) #he map copy0ook and the load module. Q1/8) What is the differen3e !et5een physi3a map and sym!o i3 map? ' () A1:=) #he physical map is the load module and the sym0olic map is the data structure. Q1/1) What is the attri!,te !yte? ' () A1:1) efines the display/transmission of field. most cases is an output field from the pro<ram. Q1/2) 4o5 do yo, ,se e9tended attri!,tes ? A1:,) efine !/#A##HA!( and the correct terminal type. Q1/") What are the " 5orBing storage fie ds ,sed for every fie d on the map? ' () A1:2) 5en<th, attri0ute and input/output field. Q1/*) What is 1:#? What are ?)&#; ?2)&# ? $1/*) 1:#E Bit in the attri0ute 0yte indicatin< modification of field on screen. >appens on an input operation. ?)&#E (ets * # on to ensure field is transmitted. >appens on an output operation. ?2)&#E )esets * #. +ntil this happens, field continues to 0e sent. Q1/-) What is the ,se of :)&C# parameter in B1)? A1:9) Is the parameter to <enerate a sym0olic map. Q1//) :o yo, re3eive the attri!,te !yte in the sym!o i3 map? A1::) &n !&$ yes. Q1/+) 4o5 do yo, maBe yo,r B1) maps 3ase sensitive? A1:;) +se A(I(QQQ Q1/.) What is effe3t on 2&C&I>& 1$= 5hen =? Bey is pressed? =$ Bey is pressed? A1:@) Chen P$ key is pressed, ata transmission may happen. Chen PA key is pressed, ata transmission will not happen. Q1/7) What is the differen3e !et5een a =? Bey & a =$ Bey ? A1:1) P$ keys wake up the task and transmit modified data, PA keys only wake up the task. Q1+8) Name the ma3ros ,sed to define the fo o5ingE 1$= 1$=)&# A1;=) $>*( $>* I $>* $ ?I&L:

Q1+1) Can yo, ,se OCC02) in a B1) map? If yo, do; 5hat are the iss,es re ated 5ith its ,se? A1;1) Aes. cannot use <roup 0y clauseQQQ Q1+2) Can yo, define m, tip e maps in a B1) mapset? A1;,) Aes. Q1+") 4o5 is the storage determined in the sym!o i3 map; if yo, have m, tip e maps? A1;2) (tora<e for maps redefine the first. #his means lar<est map has to 0e the first. Q1+*) What is the meaning of B1) ength of fie d O 8? A1;6) ata was not entered in the field Q1+-) Can yo, simp y 3he3B if ength O 8 for 3he3Bing if a fie d 5as modified? A1;9) "o, not if !)A(! !&$ was used. Q1+/) What do yo, do if yo, do not 5ant 3hara3ters entered !y the ,ser to !e fo ded to ,pper3ase ?

A1;:)

+se A(I( option on )!%!I'!.

Q1++) What does the B0??&2 option in 2&C&I>& mean ? A1;;) Brin<s the entire datastream from the terminal 0uffer. Q1+.) What are the steps yo, go thro,gh to a 3reate a B1) e9e3,ta! e? A1;@) Assem0le to create %(!%# and 5ink Q1+7) When yo, 3ompi e a CIC) program; the Apre)3ompi er p,ts an e9tra 3h,nB of 3ode. Where does it get in3 ,ded and that is it 3a ed? What is its ength? ' () A1;1) $>!IB5E, $>%&**A)!A. Q1.8) List a the CIC) ta! es and e9p ain their 3ontents. ' () A1@=) PP# (I# P%# P%# $%# ("# %# ()# )%# #%# Q1.1) I have 5ritten a CIC) program. What ta! es sho, d I set,p to r,n this program? ' () A1@1) PP#, P%#, .$%#, %#, )%# .if needed)). Q1.2) In 5hi3h ta! e 5o, d yo, maBe an entry for a B1) map? ' () A1@,) PP# Q1.") What is the 3ontent of the ==# entry? ' () A1@2) 5en<th, (ource, +se count, 5an<, )es count $>)P5 num0er Q1.*) ?or a CIC)':B2 program; ho5 is the p an referen3ed? ' () A1@6) +ses a )%# ta0le. Q1.-) 4o5 is dynami3 memory a o3ated 5ithin a CIC) app i3ation program? ' () A1@9) +se a G!#*AI" Q1./) What is the ,se of a #:Q; #)Q? ' () A1@:) #emporary data stores. Q1.+) 4o5 do yo, read from a #)Q? ' () A1@;) #emp stora<e read command Q1..) If I 3reate a #)Q from one transa3tion; 3an I read it from another transa3tion? ' () A1@@) Aes. As lon< as they run in the same re<ion. Q1.7) What are e9tra partition & intra partition #:Qs? A1@1) !Dtra partition # Qs are datasets used for communication 0Gn %I%( and other %I%(/Batch re<ions. Intrapartition # Qs are 8ueues for communication within re<n. Q178) What is trigger eve in the 3onte9t of #:Qs? A11=) $or intrapartition # Qs specify the Z records at which A#I happens. not applica0le for eDtra partition # Qs. Q171) 4o5 do yo, fire a !at3h Fo! from a CIC) transa3tion ? A111) efine an eDtrapartition # Q as an internal reader and write the P%5 to it. #erminate the P%5 with /L!&$. Q172) What is $#I? What Bind of #:Q 3an !e ,sed? A11,) Automatic #ask Initiation. Intra partition # Q.

Q17") :o yo, reI,ire a ta! e entry for a #)Q? A112) If reco7ery is needed. Q17*) Is there any entry for #)Qs in CIC) ta! es? A116) Aes in the $>#(#. Q17-) What is the ,se of :C#? A119) estination %ontrol #a0le used to define # Qs Q17/) What is &NQ; :&Q ? A11:) #ask control commands to make resources serially reusa0le. Q17+) Can yo, iss,e )QL CO11I# from a CIC) program? ' () A11;) Aes. Q17.) What is the other 5ay of terminating a transa3tion? ' () A11@) !/!% %I%( (A"%P&I"#. Assumin< it is a 5+C. #his will not end the /n. Q177) What is an $)2$ a!end ? A111) Any data eDception pro0lem (&%;, (&%6 etc. Q288) What is an $&C7 a!end ? A,==) B,/I *( not up. Q281) What are the sit,ations ,nder 5hi3h N&WCO=C is reI,ired ? A,=1) Chen a pro<ram has 0een used in %I%( atleast once and then chan<ed and recompiled. Q282) What is &@&C CIC) 2&#2I&>& ? A,=,) +sed 0y (#A)#ed tasks to <et the parameters passed to them. Q28") Name some important fie ds in the &IB ! o3B ? A,=2) !IB)!(P, !IB%A5!", !IB))% !, !IB#A(E, !IB A#!, !IB#I*! Q28*) Can yo, ,se :CN$1IC 3a s in CIC) ? A,=6) Aes, the called routine must 0e defined in PP# and the callin< pro<ram must use %A55 identifier.. Q28-) 4o5 do yo, hand e errors in CIC) pgms ? A,=9) %heck !IB)!(P after the call or use the >A" 5! condition. Q28/) ),ppose pgm $ passes "8 !ytes to pgm B thr, 3ommarea and pgm B has defined its :?4CO11$2&$ to !e -8 !ytes . Is there a pro! em ? A,=:) Aes, if B tries to access 0ytes 21-9=. Q28+) When an @C#L is done; does the tranid 3hange ? Is a ne5 tasB 3reated ? :oes it 3a,se an imp i3it )CNC=OIN# to !e iss,ed ? A,=;) "o, "o, Aes. Q28.) 4o5 do yo, e9e3,te a !a3Bgro,nd CIC) transa3tion ? A,=@) Cith a (#A)# or A#I. Q287) What is the differen3e !et5een )#$2# and @C#L ? A,=1) (#A)# is used to start a new task. It is a inter7al control command. /%#5 is used to pass control to a pro<ram within the same task. It is a pro<ram control command.

Q218) What is the ,sage of ang,age in the ==# entry? A,1=) 5an<ua<e interface and call parametersQQQ Q211) Can yo, have CIC) 3ode in a 3opy!ooB? If yes; 5hat happens d,ring 3ompi ation? A,11) Aes. "eeds to 0e preprocessed. Q212) What is an $IC$ a!end? A,1,) )unaway #ask. Q21") 4o5 5o, d yo, reso ve an $)2$ a!end? A,12) In %&B&5 II start with %!B), and <et the offset/instruction. Q21*) I invoBe a transa3tion from CIC). #he program has a 3odeE 1O>& :?4CO11$2&$ #O W)'$2&$. What happens to this transa3tion? What happens to the other transa3tions? A,16) Punk may <et mo7ed in. Cill cause (tora<e 7iolation. QQQQ Q21-) When yo, do a )#$2#; 5hat 5i the va ,e of &IBC$L&N? A,19) 4ero. Q21/) 4o5 are >)$1 fi es 2ead in CIC) pgms? ' () A,1:) $ile %ontrol %ommands. )andom, (e8uential, forward and 0ackward. Q21+) 4o5 5i yo, a33ess a >)$1 fi e ,sing an a ternate inde9? A,1;) #hru the path. efine path as an $%# and use normal $ile control commands. Q21.) 4o5 do yo, ro !a3B data 5ritten to an &):) fi e? A,1@) efine the file as reco7era0le. in cases where records ha7e 0een inserted into the file, you may need to run a 0atch pro<ram to lo<ically delete the inserted records. Q217) I have done a )#$2# B2OW)& on a >)$1 dataset. Can I do another )#$2# B2OW)& 5itho,t doing an &N: B2OW)&? A,11) "o. Q228) Can yo, a33ess Q)$1 AseI ) fi es from CIC) ? A,,=) "o. Q221) Can yo, a33ess &):) fi es from CIC) ? A,,1) Aes. Q222) In the CIC) 3ommand eve a the re'entran3y iss,es are hand ed !y the )ystemA#r,e or ?a se). A,,,) #rue Q22") What are the three B1) options ? A,,2) *inimum, (tandard, $ull Q22*) What are the !eginning and end points of an L0W 3a ed? A,,6) (ync point Q22-) #he :L6I data!ase is a hierar3hi3a data!ase and the :L6I a33ess method isthe a33ess method of the Information 1anagement )ystem AI1))A#r,e or ?a se) A,,9) #rue Q22/) Before yo, 3an ,se a #emporary )torage Q,e,e yo, m,st first define the Q,e,e name in the CIC)

A,,:)

#emporary Q,e,e #a! e)A #r,e or ?a se). $alse

Q22+) #he pro3ess of 5riting its o5n type of Fo,rna re3ords !y the app i3ation program; other than the a,tomati3 Fo,rna ing provided !y CIC) is 3a ed A,,;) !Dplicit Pournallin< Q22.) In order to disp ay a formatted s3reen; a termina m,st re3eive a series of data stream 3a ed Native 1ode :ata )treamA#r,e or ?a se). A,,@) #rue Q227) Whi3h is the CIC) 3ontro program 5hi3h governs the f o5 of 3ontro among the CIC) app i3ation programs? A,,1) Pro<ram %ontrol Pro<ram Q2"8) What is the option of the :?4:C# ma3ro 5hi3h maBes it possi! e to re3over ogi3a y de eted re3ords from an Intrapartition #:Q? A,2=) )!+(!HA!( Q2"1) CIC) and :B2 3an e9ist in the same region ,nder the Operating system A#r,e or ?a se) A,21) #rue Q2"2) What is the name of the fa3i ity provided !y CIC) to free the app i3ation program form the pro! ems 3a,sed !y N1:) Adevi3e and format dependen3e)? A,2,) #erminal Pa<in< Q2"") What is the 3ommand 5hi3h 5i de ete a program LO$:ed into the main storage ,sing LO$: 3ommand? A,22) )!5!A(! Q2"*) Whi3h is the option of the 4$N:L& $I: 3ommand that 5i pass 3ontro to the spe3ified a!e 5hen any Bey is pressed? A,26) A"AE!A Q2"-) What is the name of the mapset definition ma3ro? A,29) $>*( Q2"/) What is the a33ess method ,sed !y :B2? A,2:) (Q5 Q2"+) What is the 3ommand that is ,sed to add a ne5 re3ord to the fi e? A,2;) )!A with +P A#! followed 0y )!C)I#! Q2".) What 5i happen 5hen the reso,r3e se3,rity 3he3B has fai ed on the program 5hi3h has !een spe3ified in the =2O(2$1 option of the LO$: 3ommand? A,2@) I"')!Q Q2"7) What is the 3ommand ,sed to send a map to a termina ? A,21) (!" *AP Q2*8) What is the 3ommand ,sed to reI,est notifi3ation 5hen the spe3ified time has e9pired?

A,6=)

P&(#

Q2*1) If :$#$ONLC option is spe3ified in the )&N: 1$= 3ommand 5hat 5i happen? A,61) &nly the sym0olic map will 0e send Q2*2) What 5i happen if the #:Q that yo, 5ant to de ete is not in the :C#? A,6,) QI !)) will occur Q2*") #he read of a re3ord from an Intrapartition #:Q is not destr,3tiveA#r,e or ?a se). A,62) #rue Q2**) $n @C#L ,ses more C=0 time than LINJ A#r,e or ?a se) A,66) $alse Q2*-) What is the primary f,n3tion of the )ign'on #a! e? A,69) )e<ister security information of all pro<rams Q2*/) Native 1ode :ata )tream AN1:)) is a mi9t,re of B,ffer Contro Chara3tersABCC) and te9t data A#r,e or ?a se). A,6:) #rue Q2*+) When there are 2 re3ords 5ith the same Bey spe3ified in a :&L&#& operation 5hat 5i happen? A,6;) +PE!A condition will 0e set Q2*.) #he app i3ation programs that 3ontain the )QL statements m,st !e =re'3ompi ed for 3onverting the )QL statements into eI,iva ent COBOL statements A#r,e or ?a se) A,6@) #rue Q2*7) What are the data!ases that CIC) 3an a33ess? A,61) B,, 5/I, &)A%5! Q2-8) #he first step in the deve opment of an app i3ation system is the 2eI,irement $na ysisA#r,e or ?a se). A,9=) #rue Q2-1) CIC) provides an interfa3e thro,gh 5hi3h the a the :L6I servi3es 3an !e ,sed ,nder CIC)A#r,e or ?a se). A,91) #rue Q2-2) 4o5 to get the sign'on ,ser'id from an app i3ation program? A,9,) A((IG" command with +(!)I option Q2-") What is a Logi3a 0nit of WorB AL0W)? A,92) A se8uence of operations lo<ically tied to<ether Q2-*) #rans ation #ime is not red,3ed if the =re'3ompi ation is done firstA#r,e or ?a se). A,96) #rue Q2--) What is the genera Command format of CIC) ? A,99) !/!% %I%( followed 0y the command Q2-/) If yo, ,se the O=#I1I%& 3ompi er option the siDe of the program 3an !e red,3ed !y - to 18PA#r,e or ?a se). A,9:) #rue

Q2-+) ?or m, tithreading an app i3ation program need not !e re'entrantA#r,e or ?a se). A,9;) #rue Q2-.) Before iss,ing an $)J#I1& 3ommand 5hat 5i !e the va ,es in the &IB:$#& and &IB#I1& fie ds if the &IB? A,9@) #he date and time at the task initiation Q2-7) What is the error 3ondition that is set 5hen the fi e spe3ified in the N$1& option is not in the ?C#? A,91) PG*I !)) Q2/8) ?or prote3ting a transa3tion ,sing the transa3tion se3,rity f,n3tion; the t5o things that m,st !e done areE 1. in the )N# entry of the ,ser 5ho yo, 5hi3h to a o5 to a33ess a prote3ted transa3tion; spe3ify )C#J&COn 2. In the =C# entry of the transa3tions that yo, 5ish to prote3t spe3ify the #2$N)&COn. A#r,e or ?a se) A,:=) #rue Q2/1) What are the vario,s types of a33esses that 3an !e a o5ed !y the )&2>2&Q option of the :?4?C#? A,:1) A ,B)&C(!, !5!#!,)!A ,+P A#! Q2/2) MCIC)G system servi3es provides an interfa3e !et5een CIC) and the operating system and 3arries o,t the f,n3tions iBe oading and re easing of app i3ation programs; a3I,iring and freeing of storage ; tasB s3hed, ing; et3 A#r,e or ?a se). A,:,) #rue Q2/") What are the parameters that yo, have to give 5hen yo, are ,sing the C))N transa3tion? A,:2) "one Q2/*) What is the 3ommand that is ,sed to de ay the pro3essing of a tasB for a spe3ified time interva or ,nti a spe3ified time? A,:6) CAI# Q2/-) N1:) is !oth devi3e dependent and format dependent A#r,e or ?a se) A,:9) #rue Q2//) Whi3h is the &IB fie d that gives the date 5hen a tasB 5as started? A,::) !IB A#! Q2/+) Whi3h is the $I: that 5i not !e identified in the $NCJ&C option of the 4$N:L& $I: 3ommand? A,:;) %5!A) Q2/.) 2eading a re3ord from a #)Q 5i ?a se). A,:@) #rue ogi3a y de ete the re3ord from the Q,e,e A#r,e or

Q2/7) What is the option that is ,sed to erase a ,nprote3ted fie ds d,ring a )&N: 1$= operation? A,:1) !)A(!A+P

Q2+8) What is the CIC) 3ommand that is ,sed to re3eive the ,n'formatted data from the termina or ogi3a ,nit of a 3omm,ni3ation net5orB? A,;=) )!%!I'! Q2+1) What is the 3ommand for reading a re3ord form a #)Q? A,;1) )!A Q #(, )!A Q Q2+2) What 5i happen; if an o,t'of'range or negative va ,e is spe3ified in the L&N(#4 option of the )&N: 3ommand? A,;,) #he &+#)AG! condition will 0e set Q2+") Whi3h is the 3ontro ta! e 5here yo, spe3ify a the transa3tion that are to !e started !y CIC) after CIC) start',p? A,;2) (i<n-on ta0le Q2+*) $ 4$N:L& CON:I#ION remains a3tive ,nti the end of the program or ,nti another 4$N:L& CON:I#ION 3ommand A#r,e or ?a se). A,;6) #rue Q2+-) In the 3onversationa mode the system 5aits for the ,ser to enter his response and then press an attention Bey; and 5hi e 5aiting the reso,r3es are he d !y the program or tasB. )o 3onversationa mode of programming is ineffi3ient A#r,e or ?a se) A,;9) #rue Q2+/) Whi3h is the ma3ro ,sed for maBing an entry in the ==# A,;:) $>PP# Q2++) #he goa of a re3overy pro3ess is to 1aintain the integrity of the data pro3essed !y the system and to minimiDe the impa3t of a tasB or system fai ,re A#r,e or ?a se). A,;;) #rue Q2+.) What is the primary o!Fe3tive of CIC) ? A,;@) #o pro7ide the control and ser7ices of the B/ % system Q2+7) If no e93eption hand ing is provided in the program; 5hat 5i happen ? A,;1) %I%( will take the default action specified for the condition Q2.8) What is the CIC) s,pp ied transa3tion 5hi3h performs synta9 3he3Bing of a CIC) 3ommand? A,@=) %!*# Q2.1) What is the pro3ess of 3onverting the CIC) 3ommands into the eI,iva ent host ang,age statements 3a ed? A,@1) #ranslation Q2.2) What is the f,n3tion of the LO$: 3ommand? A,@,) #o fetch a pro<ram, ta0le or map to the main stora<e. Q2.") What is the CIC) Command that is ,sed for reading a re3ord from the #:Q? A,@2) )!A Q

Q2.*) L&N(&22; NO#$0#4 and =(1I:&22 are some of the 3ommon e93eption 3onditions that 3an o33,r 5ith LINJ and @C#L A#r,e or ?a se). A,@6) $alse Q2.-) Whi3h of the fo o5ing are re3overa! e CIC) reso,r3es? A,@9) ata files and data 0ases, Intrapartition # Qs, AuDiliary #(Qs Q2./) Whi3h is the program 5hi3h determines 5hether a transa3tion sho, d !e restarted ? A,@:) #B Q2.+) What is the 3ommand ,sed for re3eiving a map from a termina ? A,@;) )!%!I'! *AP Q2..) #he mode of a3hieving 3onversation 5ith the ,ser; !y sending him the message and 5hi e 5aiting for his response; freeing the system reso,r3es is 3a ed A,@@) Pseudo-con7ersation Q2.7) Whi3h is the 3ommand ,sed for terminating a !ro5se operation? A,@1) !" B) Q278) What is the primary f,n3tion of the =ro3essing =rogram #a! e A==#)? A,1=) #o re<ister all pro<rams and maps Q271) )yn3 points 3annot !e reI,ested !y the app i3ation programsA#r,e or ?a se). A,11) $alse Q272) Whi3h is the 3ommand that is ,sed to d,mp the main storage areas re ated to a tasB? A,1,) +*P Q27") What is the CIC) 3ommand that is ,sed to 3opy a s3reen image of a termina into another termina ? A,12) I((+! %&PA Q27*) What is the name of the og 5hi3h 3ontains the information needed to restart the system; in3 ,ding the tasB syn3 point information and system a3tivity Bey points; snapshots of Bey system ta! es; et3. A,16) ynamic 5o< Q27-) #he &IB fie d 5hi3h gives the ast CIC) 3ommand e9e3,ted is A,19) !IB)%& ! Q27/) #he 2&$: 3ommand 5ith IN#O option 5i read the re3ord spe3ified into the data area spe3ified A#r,e or fa se). A,1:) $alse Q27+) #he attri!,te 3hara3ter is an visi! e 1 !yte 3hara3ter 5hi3h pre3edes a s3reen fie d and determines the 3hara3teristi3s of the fie d A#r,e or ?a se). A,1;) #rue Q27.) What is the f,n3tion of the #ermina Contro ta! e? A,1@) #o re<ister all %I%( terminals Q277) Whi3h is the CIC) 3ontro program that provides 3omm,ni3ation servi3es !et5een ,ser 5ritten app i3ation

A,11)

programs and termina s? #erminal %ontrol Pro<ram

Q"88) CIC) Command eve is A2==) 5ow le7el 7ersion of %I%( macro le7el Q"81) #)Qs 3an !e 5ritten in the 1ain storage or $,9i iary storage A#r,e or ?a se). A2=1) #rue Q"82) 5hat is differen3e !et5een 3a and inB ? A2=,) In case of call , whene7er you do chan<es to the called pro<ram you need to compile the callin< pro<ram also. In case of link , it is not needed . Q"8") 5hat are the differen3es !et5een :?4CO11$2&$ and #)Q ? A2=2) Both are used to sa7e data amon< tasks. 0ut 1. %&**A)!A is pri7ate to that transaction only . like e7ery transaction has its own %&**A)!A created 0y %I%( as soon as the transaction is initiated . howe7er #(Q , if 8ueue id is known can 0e accessed 0y other transactions also ,. %&**A)!A len<th is s1.6) comp i.e. :9k . 0ut #(Q can ha7e any len<th.2. %&**A)!A is a7aila0le only durin< the transaction is runnin<. #(Q if created with auDiliary option resides in auD memory and a7aila0le e7en if main memory crashes.6.normally %&**A)!A is used to transfer data from one task to another while ts8 is used widely within the task as a scratch pad. Q"8*) What is Comm,ni3ation $rea? A2=6) %ommunication Area is used to pass data 0etween the pro<ram or 0etween the task. Q"8-) Whi3h of the fo o5ing statements 3orre3t y des3ri!e the synta9 of CIC) 3ommand ang,age? A). If an !/!% %I%( command must 0e continued onto a second line a hyphen .-) must 0e coded in column ; of the continued line. B). If an !/!% %I%( command must 0e continued onto a second line an G/G must 0e coded in column ;, of each line to 0e continued. %). An !/!% %I%( command %A""&# 0e coded within a %&B&5 I$ statement, 0etween the I$ command and the period ..) endin< it. ). #he !" -!/!% delimiter is optional and ne7er needs to 0e placed at the end of a %I%( command. !). #he options specified within an !/!% %I%( command can 0e in any order. A2=9) &. #he options specified within an !/!% %I%( command can 0e in any order. $or eDample GeDec %I%( (end $rom.*s<1) 5en<th.2=) !nd-!DecG can also 0e coded GeDec %ics (end 5en<th.2=) $rom.*s<1) !nd-!DecG Q"8/) $ CIC) program $B&N:) 5ith an $)2$ $B&N: 3ode. What is its meaning? A) A link was issued to a pro<ram whose name does not eDist in the PP# .Pro<ram Processin< #a0le). B) A pro<ram attempted to use a map that is not defined in the P%# .Pro<ram %ontrol #a0le). %) A security 7iolation has occurred. #he operator is not defined with the proper authority in the ("# .(i<non #a0le) to use a particular file ) A pro<ram interrupt .=%= or =%1 or =%, or ...) has occurred in a %I%( pro<ram. !) An I/& error has occurred when attemptin< to use a '(A* file from a %I%( pro<ram A2=:) A pro<ram interrupt .=%= or =%1 or =%, or ...) has occurred in a %I%( pro<ram. Q"8+) Whi3h of the fo o5ing 3ommands; 5hen iss,ed !y 2 different programs r,nning at the same time; 5i prevent sim, taneo,s ,se of reso,r3e G)IN(L&G? B) !/!% %I%( P)&#!%# )!(&+)%!.G(I"G5!G) 5!"G#>.:) !" -!/!%. %) !/!% %I%( >&5 )!(&+)%!.G(I"G5!G) 5!"G#>.:) !" -!/!%. ) !/!% %I%( #A(E (I"G5!.G(I"G5!G) 5!"G#>.:) !" -!/!%. !) !/!% %I%( !/%5+(I'! )!(&+)%!.G(I"G5!G) 5!"G#>.:) !" -!/!%.

A2=;)

!/!% %I%( !/%5+(I'! )!(&+)%!.G(I"G5!G) 5!"G#>.:) !" -!/!%

Q"8.) #he map sho5n !e o5 is disp ayed 5ithE !/!% %I%( (!" *AP.G*AP1G) *AP(!#.G*AP1(G) *AP&"5A !" -!/!%. After the screen is displayed, the operator enters 1 character, the letter G/G. Chere will the cursor now appear on the screenQ *AP1( $>*( #AP!H*AP,*& !HI"&+#,%#)5H.$)!!EB,$)(!#),5A"GH%&B&5, / #I&AP$/HA!(*AP1 $>* I (I4!H.,6,@=) $>* $ P&(H.9,1),A##)BH+"P)&#,5!"G#>H1$I!5 , $>* $ P&(H.9,2),A##)BH+"P)&#,5!"G#>H1$I!5 2 $>* $ P&(H.9,9),A##)BH.+"P)&#,I%),5!"G#>H1$I!5 6 $>* $ P&(H.9,;),A##)BHA(EIP,5!"G#>H1$I!5 9 $>* $ P&(H.9,1),A##)BH+"P)&#,5!"G#>H1,I"I#IA5HG4G $>* $ P&(H.9,11),A##)BHA(EIP,5!"G#>H1 $>*( #AP!H$I"A5 A) In the field with a P&(H.9,1) B) In $I!5 ,. %) In $I!5 2. ) In $I!5 6. !) In $I!5 9. A2=@) In $I!5 9 Q"87) 4o5 3an yo, a33omp ish !reaBpoint in intertest? A2=1) +-for unconditional 0reakpoint, %-for conditional 0reakpoint, and A-for automatic 0reakpoint Q"18) 4o5 many 5ays are there for initiating a transa3tion? 5hat are they? A21=) #here are siD ways in initiatin< a transaction.they are as follows. 1. em0eddin< four character transid on the top left most corner of the screen. ,. makin< use of !/!% %I%( (#A)# #)A"(I . ) 2. makin< use of !/!% %I%( )!#+)" #)A"(I . ) 6. By definin< the transid in %# .destination control ta0le) to ena0le A#I .A+#&*A#I% #A(E I"I#IA#I&") 9. *akin< use of P5# . pro<ram list ta0le) :. By associatin< four character transid in P%# .pro<ram control ta0le) Q"11) Whi3h type of #:Q is read destr,3tive? A211) Intrapartition # Q is read destructi7e. eDtra partition td8 is not read destructi7e. Q"12) #he error 3ode $&I>? A21,) #his is the error code for len<th, if len<th of the source data is more than the recei7in< field, #his error will occur. Q"1") What is the siDe of 3ommarea A212) #he default commarea siOe is :9k. Q"1*) What is $)2$$B&N: in CIC)? A216) It occurs when pro<ram interruption takes place. e.<.F when alphanumeric strin< mo7ed to numeric data item &) when arithmetic calculations performed on nonnumeric data item &) when an attempt made to read an occurrence of a ta0le 0eyond the defined occurrences. Q"1-) What is a t5o =hase 3ommit in CIC)? A219) #his occurs when a pro<rammer Issues a !Dec %I%( (yncpoint command. this is called two phase 0ecause %I%( will first commit chan<es to the resources under its control like '(A* files. and the B, chan<es are committed. +sually %I%( si<nals 0, to complete the neDt phase and release all the locks. Q"1/) :ifferen3e !et5een #)Q & #:Q

A21:) # Q is read destructi7e, #(Q is not. #(Q can 0e created dynamically, # Q cannot 0e created dynamically. #(Q is temporary in nature .i.e. it will 0e deleted when the pro<ram finishes eDecution, unless it is made permanent 0y makin< a entry in the #emporary (tora<e #a0le), # Q is not. Q"1+) What is &NQ in CIC)? A21;) If any one want to restrict #rans-Id to sin<le user, enter trans-id with !"Q. It wonGt allow any one else to use the same trans-id. Q"1.) In )C1BOLIC C,rsor =ositioning after moving '1 to the ength fie d a so the 3,rsor is not positioned in that parti3, ar fie d. (ive reasons? A21@) Aou ha7e to eDplicitly specify the word %+)(&) 0etween your !/!% %I%( and !" -!/!% in the pro<ram. Q"17) What does &IB mean? A211) #he !IB is the !/!%+#I'! I"#!)$A%! B5&%E. It is not the !/!%+#! I"#!)$A%! B5&%E. All #P monitors or transaction processors are know as !/!%+#I'!s as they carry out process on 0ehalf of a pro<ram module. %I%( and B, are eDecuti7es. Q"28) 4o5 many e93eptiona 3ondition 3an !e given in a 4$N:L& CON:I#ION? A2,=) *aD. of 1, eDceptional conditions can 0e <i7en in a sin<le >A" 5! %&" I#I&". Q"21) 4o5 do yo, a33ess the re3ords random y in #)Q ? A2,1) By specifyin< the I#!* option Q"22) What 3ommand do yo, iss,e to de ete a re3ord in a transient data I,e,e ? A2,,) )!A Q # , the read is destructi7e. Q"2") What are different 5ays of initiating transa3tion in CIC) ? A2,2) Ce can initiate cics transaction a) 0y <i7in< transaction id 0) 0y <i7in< cics start command c) automatic task initiation. Q"2*) What is the differen3e !et5een LINJ and @C#L ? A2,6) #he /%#5 command passes control to another pro<ram, 0ut the resources re8uested 0y the first pro<ram may still 0e allocated. A task does not end until a )!#+)" statement is eDecuted. Chile in 5I"E command, pro<ram control resumes its instruction followin< the 5I"E parameter. #he disad7anta<e of 5I"E is that it re8uires that 0oth the callin< pro<ram and the called pro<ram remain in main memory e7en thou<h 0oth are no lon<er needed. Q"2-) What is the differen3e !et5een CIC) =rogram Contro #a! e A=C#) and CIC) =ro3essing =rogram #a! e A==#) ? A2,9) P%# contains a list of 7alid transaction I . !ach transaction I is paired with the name of the pro<ram ,%I%( will load and eDecute when the transaction is in7oked. &n the other hand, PP# indicates each pro<ramGs location which pertains to a stora<e address if the pro<ram has already 0een loaded or a disk location if the pro<ram hasnGt 0een loaded. PP# will also 0e used to determine whether it will load a new copy of the pro<ram when the transaction is in7oked.

Q"2/) What are the " 3ommon 5ays to 3reate maps? A2,:) #he first way is to code a physical map and then code a matchin< sym0olic map in your %&B&5 pro<ram. #he second way to create a physical map alon< with a matchin< sym0olic map is to code only the physical map usin< the 3(A(PA)* option, %I%( will automatically create a mem0er in a %&PA li0rary. And the third way is to use a map <enerator such as ( $ .(creen efinition $acility) Q"2+) What is Q,asi'reentran3y? A2,;) #here are times when many users are concurrently usin< the same pro<ram, this is what we call *ulti#hreadin<. $or eDample, 9= users are usin< pro<ram A, %I%( will pro7ide 9= Corkin< stora<e for that pro<ram 0ut one Procedure i7ision. And this techni8ue is known as 8uasi-reentrancy Q"2.) What is the differen3e !et5een a physi3a B1) mapset and a ogi3a B1) mapset? A2,@) #he physical mapset is a load module used to map the data to the screen at eDecution time. #he sym0olic map is the actual copy0ook mem0er used in the pro<ram to reference the input and output fields on the screen. Q"27) 4o5 #o )et 1:#A1odified :ata #ag) #hr, $pp i3ation =rogram?A:ynami3a y)? A2,1) Aou ha7e to mo7e the followin< macro $>B*$(! to the Attri0ute field of that particular 'aria0le. Q""8) What CIC) fa3i ities 3an yo, ,se to save data !et5een the transa3tions? A22=) %&**&"A)!A, #(Q 3 # Q. Q""1) 4o5 5o, d yo, re ease 3ontro of the re3ord in a 2&$: for 0=:$#&? A221) By issuin< a )!C)I#!, !5!#!, or +"5&%E command or 0y endin< the task. Q""2) What is the differen3e !et5een a 2&#02N 5ith #2$N)I: and @C#L ??or e9amp e prog. $ is iss,ing 2&0#2N 5ith #2$N)I: to prog B. =rog $. is iss,ing @C#L to prog B? A22,) In )!#+)" with #)A"(I the control <oes to the %I%( re<ion and the user ha7e to transfer the control to pro<. B 0y pressin< any of the AI E!A(.In /%#5 the control is directly transfer to pro<. B. Q""") What 5i !e the ength of the ei!3a en ;if the transa3tion is ,sed to 3i3s first time? A222) #he len<th will 0e =.Oero). Q""*) What is :?4&IBLJ? A226) $>!IB5E is !Decute Interface Block. It is placed in the linka<e section automatically 0y %I%( translator pro<ram. It must 0e the first entry in linka<e section. %I%( places 7alues prior to <i7in< control to the pro<ram and we can find almost any information a0out our transaction. Q""-) What is the differen3e !et5een the @C#L and LINJ 3ommands? A229) #he 5I"E command anticipates return of control to the callin< pro<ram, the /%#5 command does not. )eturn to the callin< pro<ram will 0e the result of the %I%( )!#+)" command, specifyin< #)A"(I .name of the callin< pro<ram). Q""/) What CIC) 3ommand 5o, d yo, ,se to read a >)$1 J):) seI,entia y in as3ending order?

A22:) $irst issue a (#A)#B).start 0rowse), which will position the 0rowse at the desired record. )etrie7e records 0y usin< su0se8uent )!A "!/# commands. Indicate the end of se8uential processin< with the !" B) command. If the <eneric key is specified in the (#A)#B) command positionin< in the file will 0e 0efore the first record satisfyin< the <eneric key.$or readin< in descendin< order use the )!A P)!' instead of )!A "!/#. Q""+) What is the differen3e !et5een pse,do'3onversationa and 3onversationa ? A22;) Pseudo-con7ersational will start a new task for each input. By codin< a %I%( )!#+)" command specifyin< R #)A"(I .itself). %on7ersational will ha7e an acti7e task durin< the duration of the data entry. Q"".) What is the CO11$2&$A3omm,ni3ations area)? A22@) An area used to transfer data 0etween different pro<rams or 0etween su0se8uent eDecutions of the same pro<ram. "eeds to 0e defined in the 5inka<e (ection. 1. ,. 2. 6. 9. :. ;. @. 1. 1=. 11. 1,. 12. 16. 19. 1:. 1;. 1@. 11. ,=. ,1. ,,. ,2. ,6. ,9. ,:. ,;. ,@. ,1. 2=. 21. Chat are the pros and cons of %on7ersation 's Pseudo con7ersation pro<rammin< Q !Dplain IP% mechanisms and means in %I%(Q %an we use !/!% (Q5 %&**I#/)&55BA%E in %I%(Q If so howQ if not what are the alternati7esQ Chat are the ad7anta<es of # QQ >ow do you implement lockin< in %I%(Q Chat is multithreadin<Q "ame 2 co0ol commands that cannot 0e used with %I%( Chy is it important not to eDecute a (#&P )+" in %I%( Q >ow are pro<rams reinitiated under %I%( Q Chy must all %I%( pro<rams ha7e a 5inka<e (ection Q Chy doesnt %I%( use the %o0ol &pen and %lose statements Q Chat is the difference 0etween a (ym0olic map and Physical map Q If a physical map has siD 7aria0le fields and nine constant fields, how many fields must the sym0olic map has Q In which column must la0el 0e<in Q %ode the parameter that will assi<n a start 7alue to the filed %an a pro<ram chan<e protected field Q >ow many columns will 0e needed on a screen to display a protected field that has 6 0ytes of data >ow many columns will 0e needed to on a screen to display an unprotected field that has 6 0ytes of data Chat are the , cate<ories of eDtended attri0utes Q Chen usin< eDtended attri0utes , how many attri0ute 0ytes will 0e needed for each sym0olic map field Q >ow is the stopper 0yte different from an autoskip 0yte Q By which command do you preser7e workin< stora<e fields Q >ow do you restore workin< stora<e fields Q Chich command will release all the resources used 0y the pro<ram Q Chat is the relationship 0etween !IB%A5!" and $>%&**A)!A Q >ow will you place cursor on a field called R!*P"&. #his field 0elon<s to mapset R*AP!*PG and map R*AP!*P* and (ym0olic map R!mpid-)ec Q >ow will the pro<ram know which key has 0een pressed. By which %I%( defined field can you determine the position of the cursor on the map Q Chat is the function of a (#A)#B) Q Assume that a file contains 1== records ,If one start 0rowse and 11 read neDt commands ha7e 0een eDecuted , which record will currently 0e in memory Q #rue or $alse Q . In a 0rowse pro<ram the pro<ram should remain acti7e while a user is 7iewin< a screen

2,. Chich condition will 0e tri<<ered if a user attempts to start a 0rowse 0eyond end-of file Q 22. Chich condition will 0e tri<<ered if a user attempts to continue readin< 0ackward 0eyond the 0e<innin< of fileQ 26. Chat will happen if a user enters a record key that is lower than the lowest record key in a file Q 29. >ow can this answer 0e affected 0y the (tart-Browse option Q 2:. escri0e a method for 0e<innin< a 0rowse at the 0e<innin< of a file . 2;. Chen is the condition of "&#$" not an error Q 2@. Chat will happen if you code a send map command or a return statement with the same transid option if a *AP$AI5 occurs Q 21. Chy is the !nter Eey option eDplicitly coded in the >andle Aid command Q 6=. Chat happens if you omit la0els on a >A" 5! %ondition command Q 61. Chat is the difference 0etween a "&>A" 5! and an IG"&)! condition Q 6,. Chat are the 2 0road ways that a pro<ram can <i7e up control Q 62. Chat is the difference 0etween /%#5 and )!#+)". 66. Chat happens if a !5!#!Q #( command is eDecuted Q 69. Chy is the terminal I often used as a part of a #(Q Q 6:. Chat is the maDimum len<th of a #(Q name Q 6;. Chat is the maDimum len<th of a # Q name Q 6@. Is it necessary to define a #(Q in a %I%( ta0le Q 61. %an you read the 9th item of a # Q Q 9=. Chere are # Qs defined Q 91. %an you delete an indi7idual record from a #(Q or a # Q Q 9,. %an you update a record in a # Q Q 92. Chy is it necessary to update PP# Q 96. In which %I%( ta0le do we define the transaction for a pro<ramQ 99. istin<uish 0etween #(Q and # Q. 9:. Chat is $>B*(%AQ 9;. Chat is Pseudo con7ersational pro<rammin<Q 9@. "ame 2 co0ol commands that cannot 0e used with %I%( 91. If a physical map has siD 7aria0le fields and nine constant fields , how many fields must the sym0olic map has Q :=. In which column must la0el 0e<in Q :1. %ode the parameter that will assi<n a start 7alue to the filed :,. >ow many columns will 0e needed on a screen to display a protected field that has 6 0ytes of dataQ :2. >ow many columns will 0e needed to on a screen to display an unprotected field that has 6 0ytes of data :6. Chat are the , cate<ories of eDtended attri0utes Q :9. Chen usin< eDtended attri0utes , how many attri0ute 0ytes will 0e needed for each sym0olic map field Q ::. By which command do you preser7e workin< stora<e fields Q :;. >ow do you restore workin< stora<e fields Q :@. Chich command will release all the resources used 0y the pro<ram Q :1. Chat is the relationship 0etween !IB%A5!" and $>%&**A)!A Q ;=. >ow will the pro<ram know which key has 0een pressed. ;1. Chat is the function of a (#A)#B) Q ;,. Assume that a file contains 1== records ,If one start 0rowse and 11 read neDt commands ha7e 0een eDecuted , which record will currently 0e in memory Q ;2. #rue or $alse Q . In a 0rowse pro<ram the pro<ram should remain acti7e while a user is 7iewin< a screen ;6. Chich condition will 0e tri<<ered if a user attempts to start a 0rowse 0eyond end-of file Q ;9. Chich condition will 0e tri<<ered if a user attempts to continue readin< 0ackward 0eyond the 0e<innin< of fileQ ;:. Chat will happen if a user enters a record key that is lower than the lowest record key in a file Q >ow can this answer 0e affected 0y the (tart-Browse option Q ;;. escri0e a method for 0e<innin< a 0rowse at the 0e<innin< of a file . ;@. Chen is the condition of "&#$" not an error Q ;1. Chat will happen if you code a send map command or a return statement with the same transid option if a *AP$AI5 occurs Q

@=. Chy is the !nter Eey option eDplicitly coded in the >andle Aid command Q @1. Chat happens if you omit la0els on a >A" 5! %ondition command Q @,. Chat is the difference 0etween a "&>A" 5! and an IG"&)! condition Q @2. Chat are the 2 0road ways that a pro<ram can <i7e up control Q @6. Chat is the difference 0etween /%#5 and )!#+)". @9. Chat happens if a !5!#!Q #( command is eDecuted Q @:. Chy is the terminal I often used as a part of a #(Q Q @;. Chat is the maDimum len<th of a #(Q name Q @@. Chat is the maDimum len<th of a # Q name Q @1. Is it necessary to define a #(Q in a %I%( ta0le Q 1=. %an you read the 9th item of a # Q Q 11. Chere are # Qs defined Q 1,. %an you delete an indi7idual record from a #(Q or a # Q Q 12. %an you update a record in a # Q Q 16. Chy is it necessary to update PP# Q 19. In which %I%( ta0le do we define the transaction for a pro<ram Q 1:. >ow do you do a 0rowse &peration 1;. If you ha7e a new map, new pro<ram, and a newfile, which %I%( ta0les do you updateQ 1@. >ow to read a #( Queue 11. ifferentiate 0etween /%#5 and 5I"E 1==.Chat is (#A)# Q 1=1.>ow do you update a file in %I%( In P%5, 1=,.Chat is a temporary datasetQ 1=2.Chat is a P)&%, and how is it different from a P%5 1=6. ifferentiate instream procedures 7ersus %atalo<ued procedures 1=9.Chat is difference 0etween # Q and #(Q Q 1=:.>ow do inter7al control transactions in7oke themsel7es 1=;.>ow do we read a '(A* file in %I%( 1=@.Chat are some of imp. %I%( commands and their parameters 1=1.>ow do you protect a field from 0ein< o7erlaidQ - G( 11=.Chat are (!" *AP *AP&"5A 3 (!" *AP A#A&"5A Q 111.Chat are the restrictions while usin< G!#*AI" and $)!!*AI"Q - G( 11,.I ha7e #(Q with 19 items. I want to delete the 1=th item. >ow do I do thatQ 112.>ow do I find the name of the %I%( re<ion inside my %&B&5 pro<ramQ 116.%an a %I%( re<ion 0e attached to more than one B, su0system Q 119.Chat determines the B, su0system to which a particular %I%( re<ion is attached Q 11:.Chat is the ("% transaction used for Q

)QLA)tr,3t,red Q,ery Lang,age)E


(tructured Query 5an<ua<e .(Q5) pro7ides the a0ility to create and define relational data0ase o0Nects. After these o0Nects are defined, the lan<ua<e permits one to add data to these o0Nects. &nce data has 0een added, one can modify, retrie7e, or delete that data. #he lan<ua<e pro7ides the capa0ility of definin< what type of authority one mi<ht ha7e when accessin< the data. :ata :efinition Lang,age As the name implies, there is a <roup of (Q5 statements that allows one to define the relational structures that will mana<e the data placed in them. #he W%)!A#!X statements 0rin<s )elational ata0ase *ana<ement (ystem .) *() o0Nects into eDistence. #he types of o0Nects one can create are (#&G)&+P, ata0ase, #a0le space, #a0le, IndeD, 'iew, (ynonym, and Alias. #he definitions of these o0Nects are as followsF )#O(2O0=E A stora<e <roup is a list of disk 7olume names to which one can assi<n a name. &ne defines the list of disk 7olumes and assi<ns the (#&G)&+P name with the %reate (#&G)&+P statement.

:ata!aseE A data0ase is a lo<ical structure in which ta0les and indeDes are later created. #he data0ase is defined and associated with a (#&G)&+P with a %reate ata0ase statement. #a! espa3eE A ta0lespace is an area on disk that is allocated and formatted 0y the %reate #a0le space statement. #a! eE A ta0le is an or<aniOational structure which is defined in a %reate #a0le statement. In this statement, the data attri0utes are defined 0y column, <i7in< each column its own uni8ue name within the ta0le. Inde9E A indeD is used in conNuction with the WPrimary EeyX parameter of the %reate #a0le statement. It is made with the %reate IndeD statement and pro7ides the duplicate record-checkin< necessary for a uni8ue key. >ie5E A 7iew is an alternati7e perspecti7e of the data present in a data0ase. It is made with the %reate 'iew statement and can represent a su0set of the columns defined in a ta0le. It can also represents a set of columns com0ined from more than one ta0le. )ynonymE #he %reate (ynonym statement defines an un8ualified name for a ta0le or a 7iew. $ iasE #he %reate Alias statement defines an alternate 8ualified name for a ta0le or a 7iew. After a ta0le is created, additional columns may 0e added with an Alter #a0le statement. Any ) *( o0Nect that was made with a create statement can 0e remo7ed with a drop statement. In order to define ) *( o0Nects, one needs 7arious le7els of authority. #he followin< is a list of authority le7els that can 0e <ranted to a user I to operate on a desi<nated data0ase. BA * B%#)5 B*AI"# %)!A#!#( %)!A#!#AB )&P ata0ase administrator authority ata0ase control authority ata0ase maintenance authority %reate #a0le space Authority %reate #a0le authority rop authority on a data0ase or su0ordinate o0Nects

:ata 1anip, ation Lang,age #here are four (Q5 data manipulation statements. *5) a7aila0leF Insert, (elect, +pdate, and elete. After ta0les are defined, they are ready to store data. ata is added to ta0les throu<h the (Q5 Insert statement. &nce data has 0een inserted into a ta0le, it can 0e retrie7ed 0y the use of the (elect statement. ata stored in a ta0le can 0e modified 0y eDecutin< the (Q5 +pdate statement. ata can 0e deleted from a ta0le 0y usin< the (Q5 elete statement. #he (Q5 statements perform ) *( operations that can affect only one row at a time if desired. #he same statements can, if re8uired, affect many or all of the rows in a ta0le. It is possi0le to select one row and insert it into another with one statement. It is also Nust as easy to select all of the rows from one ta0le and insert all of them into another with a sin<le statement. #he same scope of operation applied to the update and delete statements. #he scope of operation is controlled 0y the use of the C>!)! clause. #he operation will affect only the rows that satisfy the search condition. Chen no search condition specified, the entire ta0le is affected. #here are additional lan<ua<e elements a7aila0le that pro7ide the a0ility to process the ta0le data while it is 0ein< retrie7ed. In addition, there are a 7ariety of functions that modify the 7alue of the data that is returned in a 8uery. #here are column functions that act on all of the 7alues of the selected rows for a specified column and return a sin<le answer. #here are also scalar functions that return a specific answer for each row that satisfies the search condition.

As mentioned pre7iously, (Q5 pro7ides the a0ility to filter what data is retrie7ed in a select statement 0y includin< the C>!)! clause. #he C>!)! clause specifies a 7ariety of comparisons 0etween two 7alues. #he 7alues could 0e column 7alues or the result of an operation in7ol7in< more than one column or a constant. #he comparison operation are the same as those used in %&B&5, with the eDception of two additional operators. #he first is the I" operator that compares a sin<le 7alue has a match in the specified list of 7alues. #he other is the 5IE! operator, in which you can specify a 7alue strin< that includes WwildcardX characters in such a manner that you can select rows of a ta0le where column 7alues are similar to the eDtent you re8uire. (Q5 pro7ides four arithmetic operations F addition, su0traction, multiplication, and di7ision. An arithmetic eDpression may in7ol7e any com0ination of column name or num0ers. #he arithmetic eDpression may itself 0e used as a column name or in a (elect, Insert, +pdate, or elete statement. (Q5 pro7ides the a0ility to sort the data retrie7ed from a ta0le 7ia the &) !) BA clause. In this clause, you can specify one or more sort column names as well as if each sort key is ascendin< or descendin<. (Q5 also pro7ides the a0ility to perform set manipulation operations. +sin< (Q5, one can (!5!%# the intersection of two or more sets of data 0y codin< a P&I". A P&I" is any (!5!%# statement that has more than one B*( o0Nect listed in its $)&* clause. &ne can com0ine different sets of data 0y usin< the +"I&" operator. &ther set manipulations can 0e eDecuted 0y com0inin< different operators and search conditions. #he ?o o5ing are the most freI,ent y asBed I,estions.... Q1) What 2:1) o!Fe3ts are 3reated 5ith the )QL C2&$#& statements? A1) #he (Q5 %)!A#! statements are used to create the followin< o0NectsF (#&G)&+P A stora<e <roup A#ABA(! A lo<ical collection of ta0les #AB5!(PA%! An area that stores ta0les #AB5! A data structure or<aniOed 0y a specified columns I" !/ An alternate path to a ta0le data 'I!C An alternate representation of one or more ta0les (A"&"A* An alternate name for local ta0le or 7iew A5IA( An alternate name for a ta0le definition which may 0e local or remote, eDistence or noneDistent Q2) What 2:1) o!Fe3ts are reI,ired !efore yo, 3an 3reate a ta! e? A,) Before you can create a ta0le, you need an eDistin< data0ase and ta0lespace. Q") In 5hat 2:1) o!Fe3t does one first ist 3o ,mn names? A2) &ne first uses the column name in the %)!A#! #AB5! statement. Q*) What is the synta9 for a C2&$#& #$BL& statement? A6) %)!A#! #AB5! ta0le name .column name list primary key .column name)) in data0ase-name, ta0lespace-name. Q-) Can one add 3o ,mns to a ta! e after it has !een defined? A9) Aes, one can add column to a ta0le after it has 0een defined 0y usin< the (Q5 A5#!) #AB5! statement. Q/) Where in a ta! e are added 3o ,mns o3ated? A:) #he new columns are added to the end of the ta0le.

Q+) $fter a ta! e is defined; 3an 3o ,mns !e removed? A;) #he only way to remo7e columns from an eDistin< ta0le in7ol7es a mi<ration pro<ram that eDtracts only the desired columns of data, redefinin< the ta0le without the unwanted columns, then populatin< the new ta0le. &ne ha7e to handle all the old ta0les dependents pro<rammatically. Q.) Whi3h 2:1) o!Fe3ts 3an yo, 3hange 5ith the )QL $L#&2 statements? A@) #he (Q5 A5#!) statement can chan<e a ta0le indeD, a ta0le, a ta0lespace, or a (#&G)&+P. Q7) What a,thority is reI,ired to 3reate a ta! e? A1) In order to create ta0les, one needs %)!A#!#AB pri7ile<es. Q18) What is minim,m a,thority reI,ired for one to 3reate a ta! espa3e? A1=) In order to create ta0lespaces, one needs %)!A#!#( pri7ile<es. Q11) When is it ne3essary to 3reate a ta! e inde9? A11) It is necessary to create a ta0le indeD whene7er you want to enforce the uni8ueness of the ta0les primary key. Q12) What is a synonym? A1,) A synonym is an un8ualified alternati7e name for a ta0le or 7iew. Q1") What is a foreign Bey? A12) A forei<n key is the key defined in one ta0le to reference the primary key of a reference ta0le. #his forei<n key must ha7e the same structure as the reference ta0les primary key. Q1*) What is referentia integrity? A16) )eferential inte<rity is the automatic enforcement of referential constraints that eDist 0etween a reference ta0le and a referencin< ta0le. Chen referential inte<rity is enforced, the 7alue of a forei<n key eDists as a primary key 7alue in the reference ta0le. In other words, when referential inte<rity is enforced, all of the forei<n key 7alues in, for eDample, the Wdepartment codeX column in an WemployeeX ta0le eDist as primary key 7alues in a WdepartmentX ta0le. Q1-) What are the 3o ,mn name I,a ifiers? A19) A column name 8ualifier are used as a ta0le desi<nator to a7oid am0i<uity when the column names referenced eDists in more than one ta0le used in the (Q5 statement. %olumn name 8ualifiers are also used in correlated references. Q1/) What is a 3orre ation name? A1:) A correlation name is a special type of column desi<nator that connects specific columns in the 7arious le7els of a multile7el (Q5 8uery. Q1+) What is a res, ts ta! e? A1;) A result ta0le is the product of a 8uery a<ainst one or more ta0les or 7iews .i.e., it is the place that holds the results of a 8uery). Q1.) What is a 3,rsor? A1@) A cursor is a named control structure used to make a set of rows a7aila0le to a pro<ram. relational data0ase B, is the

system that runs in an *'( en7ironment. It was de7eloped 0y IB* and interfaces with (Q5. Cith the use of (Q5 B,, data0ases can 0e accessed 0y a wide ran<e of host lan<ua<es. (Q5 is the relational data0ase Y application lan<ua<e Y that interfaces with B,. Because of its capa0ilities, (Q5 and, in turn, B, ha7e <ained considera0le acceptance. #hus, a workin< knowled<e of B, increases oneGs marketa0ility. Q17) What is the !asi3 differen3e !et5een a Foin and a ,nion? A11) A Noin selects columns from , or more ta0les. A union selects rows. Q28) What is norma iDation and 5hat are the five norma forms? A,=) "ormaliOation is a desi<n procedure for representin< data in ta0ular format. #he fi7e normal forms are pro<ressi7e rules to represent the data with minimal redundancy. Q21) What are foreign Beys? A,1) #hese are attri0utes of one ta0le that ha7e matchin< 7alues in a primary key in another ta0le, allowin< for relationships 0etween ta0les. Q22) :es3ri!e the e ements of the )&L&C# I,ery synta9? A,,) (!5!%# element $)&* ta0le C>!)! conditional statement. Q2") &9p ain the ,se of the W4&2& 3 a,se? A,2) C>!)! is used with a relational statement to isolate the o0Nect element or row. Q2*) What te3hniI,es are ,sed to retrieve data from more than one ta! e in a sing e )QL statement? A,6) Poins, unions and nested selects are used to retrie7e data. Q2-) What is a vie5? Why ,se it? A,9) A 7iew is a 7irtual ta0le made up of data from 0ase ta0les and other 7iews, 0ut not stored separately. Q2/) &9p ain an o,ter Foin? A,:) An outer Noin includes rows from ta0les when there are no matchin< 7alues in the ta0les. Q2+) What is a s,!se e3t? Is it different from a nested se e3t? A,;) A su0select is a select which works in conNunction with another select. A nested select is a kind of su0select where the inner select passes to the where criteria for the outer select. Q2.) What is the differen3e !et5een gro,p !y and order !y? A,@) Group 0y controls the presentation of the rows, order 0y controls the presentation of the columns for the results of the (!5!%# statement. Q27) What Bey5ord does an )QL )&L&C# statement ,se for a string sear3h? A,1) #he 5IE! keyword allows for strin< searches. #he [ si<n is used as a wildcard. Q"8) What are some )QL aggregates and other !,i t'in f,n3tions? A2=) #he common a<<re<ate, 0uilt-in functions are A'G, (+*, *I", *A/, %&+"# and I(#I"%#.

Q"1) 4o5 is the )0B)#2 Bey5ord ,sed in )QL? A21) (+B(#) is used for strin< manipulation with column name, first position and strin< len<th used as ar<uments. !.<. (+B(#) ."A*!, 1 2) refers to the first three characters in the column "A*!.

Q"2) &9p ain the &@=L$IN statement? A2,) #he eDplain statement pro7ides information a0out the optimiOerGs choice of access path of the (Q5. Q"") What is referentia integrity? A22) )eferential inte<rity refers to the consistency that must 0e maintained 0etween primary and forei<n keys, i.e. e7ery forei<n key 7alue must ha7e a correspondin< primary key 7alue. Q"*) What is a N0LL va ,e? What are the pros and 3ons of ,sing N0LL)? A26) A "+55 7alue takes up one 0yte of stora<e and indicates that a 7alue is not present as opposed to a space or Oero 7alue. ItGs the B, e8ui7alent of #B on an or<aniOational chart and often correctly portrays a 0usiness situation. +nfortunately, it re8uires eDtra codin< for an application pro<ram to handle this situation. Q"-) What is a synonym? 4o5 is it ,sed? A29) A synonym is used to reference a ta0le or 7iew 0y another name. #he other name can then 0e written in the application code pointin< to test ta0les in the de7elopment sta<e and to production entities when the code is mi<rated. #he synonym is linked to the A+#>I that created it. Q"/) What is an a ias and ho5 does it differ from a synonym? A2:) An alias is an alternati7e to a synonym, desi<ned for a distri0uted en7ironment to a7oid ha7in< to use the location 8ualifier of a ta0le or 7iew. #he alias is not dropped when the ta0le is dropped. Q"+) When 3an an insert of a ne5 primary Bey va ,e threaten referentia integrity? A2;) "e7er. "ew primary key 7alues are not a pro0lem. >owe7er, the 7alues of forei<n key inserts must ha7e correspondin< primary key 7alues in their related ta0les. And updates of primary key 7alues may re8uire chan<es in forei<n key 7alues to maintain referential inte<rity. Q".) What is the differen3e !et5een stati3 and dynami3 )QL? A2@) (tatic (Q5 is hard-coded in a pro<ram when the pro<rammer knows the statements to 0e eDecuted. $or dynamic (Q5 the pro<ram must dynamically allocate memory to recei7e the 8uery results. Q"7) Compare a s,!se e3t to a Foin? A21) Any su0select can 0e rewritten as a Noin, 0ut not 7ice 7ersa. Poins are usually more efficient as Noin rows can 0e returned immediately, su0selects re8uire a temporary work area for inner selects results while processin< the outer select. Q*8) What is the differen3e !et5een IN s,!se e3ts and &@I)#) s,!se e3t? A6=) If there is an indeD on the attri0utes tested an I" is more efficient since B, uses the indeD for the I". .I" for indeD is the mnemonic). Q*1) What is a Cartesian prod,3t? A61) A %artesian product results from a faulty 8uery. It is a row in the results for e7ery com0ination in the Noin ta0les. Q*2) What is a t,p e?

A6,) A tuple is an instance of data within a relational data0ase. Q*") What is the differen3e !et5een stati3 and dynami3 )QL? A62) (tatic (Q5 is compiled and optimiOed prior to its eDecutionI dynamic is compiled and optimiOed durin< eDecution. Q**) $ny )QL imp ementation 3overs data types in 3o,p e of main 3ategories. Whi3h of the fo o5ing are those data types ? AChe3B a that app y) A). "+*!)I% B). %>A)A%#!) %). A#! A" #I*! ). B5&B( !. BI# A66) A,B,%. "ot all (Q5 implementations ha7e a B5&B or a BI# data types. Q*-) We have a ta! e 5ith a C4$2$C#&2 data type fie d. We app y a NQN ro5 3omparison !et5een this fie d and another C4$2$C#&2 fie d in another ta! e. What 5i !e the res, ts for re3ords 5ith fie d va ,e of N0LL? AChe3B one that app ies the !est) A. #)+! B. B. $A5(! %. %. +"E"&C" . . !rror. !. !. #hose records will 0e i<nored A69) %. "+55 in a row when compared will <i7e an +"E"&C" result. Q*/) $ny data!ase needs to go thro,gh a norma iDation pro3ess to maBe s,re that data is represented on y on3e. #his 5i e iminate pro! ems 5ith 3reating or destroying data in the data!ase. #he norma iDation pro3ess is done ,s,a y in three steps 5hi3h res, ts in first; se3ond and third norma forms. Whi3h !est des3ri!es the pro3ess to o!tain the third norma form? AChe3B one that app ies the !est) A. !ach ta0le should ha7e related columns. B. !ach separate ta0le should ha7e a primary key. %. Ce ha7e a ta0le with multi-7alued key. All columns that are dependent on only one or on some of the keys should 0e mo7ed in a different ta0le. . If a ta0le has columns not dependent on the primary keys, they need to 0e mo7ed in a separate ta0le. !. !. Primary key is always +"IQ+! and "&# "+55. A6:) . All columns in a ta0le should 0e dependent on the primary key. #his will eliminate transiti7e dependencies in which A depends on B, and B depends on %, 0ut weGre not sure how % depends on A. Q*+) )QL 3an !e em!edded in a host program that ,ses a re ationa data!ase as a persistent data repository. )ome of the most important pre'defined str,3t,res for this me3hanism are )QL:$ AN)QL :es3riptor $reaN) and )QLC$ AN)QL Comm,ni3ations $reaN) )QLC$ 3ontains t5o str,3t,res ' )QLCO:& and )QL)#$#&. )QL)#$#& is a standard set of error messages and 5arnings in 5hi3h the first t5o 3hara3ters defines the 3 ass and the ast three defines the s,!3 ass of the error. Whi3h of the fo o5ing )QL)#$#& 3odes is interpreted as NNo data ret,rnedN?AChe3B one that app ies the !est) A). ==DDD

B). =1DDD %). =,DDD ). ,,DDD !). ,ADDD A6;) %. == - is successful completion, =1 - warnin<s, ,, - is data eDception and ,A is syntaD error. #he (Q5(#A#! code format returned for Y"o data returnedY is Y=,DDDY. Q*.) What are 3ommon )QL a!end 3odes? Ae.g. E 8;188 et3.;) A6@) -@1@ time stamp mismatch -1@= wron< data mo7ed into date field Q*7) What is meant !y dynami3 )QL? A61) ynamic (Q5 are (Q5 statements that are prepared and eDecuted within a pro<ram while the pro<ram is eDecutin<. #he (Q5 source is contained in host 7aria0les rather than 0ein< hard coded into the pro<ram. #he (Q5 statement may chan<e from eDecution to eDecution. Q-8) What is meant !y em!edded )QL? A9=) #hey are (Q5 statements that are em0edded with in application pro<ram and are prepared durin< the pro<ram preparation process 0efore the pro<ram is eDecuted. After it is prepared, the statement itself does not chan<e.althou<h 7alues of host 7aria0les specified within the statement mi<ht chan<e). Q-1) What is meant !y entity integrity? A91) !ntity inte<rity is when the primary key is in fact uni8ue and not null. Q-2) What 5i &@=L$IN do? A9,) !/P5AI" o0tains information .which indeDes are used, whether sortin< is necessary, which le7el of lockin< is applied) a0out how (Q5 statements in the B)* will 0e eDecuted, insertin< this information into the W/X.P5A".#AB5! where the W/X is the authoriOation I of the owner of the plan. Q-") What is the foreign Bey? A92) A forei<n key is a column .or com0ination of columns) in a ta0le whose 7alues are re8uired to match those of the primary key in some other ta0le. Q-*) What 5i (2$N# option do? A96) It will <rant pri7ile<es to a list of one or more users. If the G)A"# option is used in conNunction with the WP+B5I%X option, then all users will 0e <ranted pri7ile<es. Also you can <rant pri7ile<es 0y o0Nects and types. Q--) What does the term Kgrant privi egesL mean? A99) Grant pri7ile<es means <i7in< access/authority to B, users.

Q-/) What is an image 3opy? A9:) It is an eDact reproduction of all or part of a ta0lespace. B, pro7ides utility pro<rams to make fullima<e copies .to copy the entire ta0lespace) or incremental ima<e copies to copy only those pa<es that ha7e 0een modified since the last ima<e copy. Q-+) What is meant !y an inde9?

A9;) An indeD is a set of row identifiers .)I s) or pointers that are lo<ically ordered 0y the 7alues of a column that has 0een specified as 0ein< an indeD. IndeDes pro7ide faster access to data and can enforce uni8ueness on the row in a ta0le. Q-.) What is an inde9 Bey? A9@) It is a column or set of columns in a ta0le used to determine the order of indeD entries. Q-7) What is a Foin? A91) A Noin is a relational operation that allows retrie7al of data from two or more ta0les 0ased on matchin< columns 7alues. Q/8) What is meant !y o3Bing? A:=) 5ockin< is a process that is used to ensure data inte<rity. It also pre7ents concurrent users from accessin< inconsistent data. #he data .row) is locked until a commit is eDecuted to release the updated data. Q/1) What is meant !y n, ? A:1) #his is a special 7alue that indicates the a0sence of data in a column. #his 7alue is indicated 0y a ne<ati7e 7alue, usually -1. Q/2) What is an o!Fe3t? A:,) An o0Nect is anythin< that is mana<ed 0y B, .that is data0ases, ta0le spaces, ta0les, 7iews, indeDes or synonyms), 0ut not the data itself. Q/") :es3ri!e referentia integrity? A:2) )eferential inte<rity refers to a feature in data0ase. B, that is used to ensure consistency of the data in the

Q/*) :es3ri!e a primary Bey? A:6) A primary key is a key that is uni8ue, non-null, and is part of the definition of a ta0le. A ta0le must ha7e a primary key to 0e defined as a parent. Q/-) 4o5 5o, d yo, find o,t the tota n,m!er of ro5s in a ta! e? ' () A:9) +se (!5!%# %&+"#.L) ... Q//) 4o5 do yo, e iminate d,p i3ate va ,es in )&L&C#? ' () A::) +se (!5!%# I(#I"%# ... Q/+) 4o5 do yo, se e3t a ro5 ,sing inde9es? ' () A:;) (pecify the indeDed columns in the C>!)! clause. Q/.) What are aggregate f,n3tions? A:@) Bulit-in mathematical functions for use in (!5!%# clause. Q/7) 4o5 do yo, find the ma9im,m va ,e in a 3o ,mn? ' () A:1) +se (!5!%# *A/.... Q+8) Can yo, ,se 1$@ on a C4$2 3o ,mn? A;=) A!(. Q+1) 1y )QL statement )&L&C# $>(A)$L$2C) ?2O1 &1='#$BL& yie ds ina33,rate res, ts. Why?

A;1) Because (A5A)A is not declared to ha7e "ulls and the employees for whom the salary is not known are also counted. Q+2) 4o5 do yo, retrieve the first - 3hara3ters of ?I2)#N$1& 3o ,mn of &1= ta! e? A;,) (!5!%# (+B(#).$I)(#"A*!,1,9) $)&* !*PI Q+") 4o5 do yo, 3on3atenate the ?I2)#N$1& and L$)#N$1& from &1= ta! e to give a 3omp ete name? A;2) (!5!%# $I)(#"A*! \\ G G \\ 5A(#"A*! $)&* !*PI Q+*) What is the ,se of >$L0& f,n3tion? A;6) A7oid ne<ati7e (Q5%& !s 0y handlin< nulls and Oeroes in computations. (u0stitute a numeric 7alue for any nulls used in computation. Q+-) What is 0NION;0NION $LL? ' () A;9) +"I&" eliminates duplicates +"I&" A55F retains duplicates Both these are used to com0ine the results of different (!5!%# statements. Q+/) ),ppose I have five )QL )&L&C# statements 3onne3ted !y 0NION60NION $LL; ho5 many times sho, d I spe3ify 0NION to e iminate the d,p i3ate ro5s? ' () A;:) &nce. Q++) What is the restri3tion on ,sing 0NION in em!edded )QL? A;;) It has to 0e in a %+)(&). Q+.) In the W4&2& 3 a,se 5hat is B&#W&&N and IN? ' () A;@) B!#C!!" supplies a ran<e of 7alues while I" supplies a list of 7alues. Q+7) Is B&#W&&N in3 ,sive of the range va ,es spe3ified? ' () A;1) Aes. Q.8) What is GLIJ&G ,sed for in W4&2& 3 a,se? What are the 5i d3ard 3hara3ters? ' () A@=) 5IE! is used for partial strin< matches. G[G . for a strin< of any character ) and GSG .for any sin<le character ) are the two wild card characters. Q.1) When do yo, ,se a LIJ& statement? A@1) #o do partial search e.<. to search employee 0y name, you need not specify the complete nameI usin< 5IE!, you can search for partial strin< matches. Q.2) What is the meaning of ,nders3ore A GRG ) in the LIJ& statement? ' () A@,) *atch for any sin<le character. Q.") What do yo, a33omp ish !y (2O0= BC ... 4$>IN( 3 a,se? ' () A@2) G)&+P BA partitions the selected rows on the distinct 7alues of the column on which you <roup 0y. >A'I"G selects G)&+Ps which match the criteria specified Q.*) Consider the emp oyee ta! e 5ith 3o ,mn =2O<&C# n, a! e. 4o5 3an yo, get a ist of emp oyees 5ho are not assigned to any proFe3t? A@6) (!5!%# !*P"& $)&* !*P C>!)! P)&P!%# I( "+55I Q.-) What is the res, t of this I,ery if no ro5s are se e3tedE

(!5!%# (+*.(A5A)A) $)&* !*P C>!)! Q+A5HG*(%GI A@9) "+55 Q./) Why )&L&C# S is not preferred in em!edded )QL programs? $or three reasonsF If the ta0le structure is chan<ed .a field is added), the pro<ram will ha7e to 0e modified Pro<ram mi<ht retrie7e the columns which it mi<ht not use, leadin< on I/& o7er head. #he chance of an indeD only scan is lost. Q.+) What are 3orre ated s,!I,eries? ' () A su08uery in which the inner . nested ) 8uery refers 0ack to the ta0le in the outer 8uery. %orrelated su08ueries must 0e e7aluated for each 8ualified row of the outer 8uery that is referred to. Q..) What is a 3,rsor? Why sho, d it !e ,sed? ' () %ursor is a pro<rammin< de7ice that allows the (!5!%# to find a set of rows 0ut return them one at a time. %ursor should 0e used 0ecause the host lan<ua<e can deal with only one row at a time. Q.7) 4o5 5o, d yo, retrieve ro5s from a :B2 ta! e in em!edded )QL? ' () !ither 0y usin< the sin<le row (!5!%# statements,or 0y usin< the %+)(&). Q78) $part from 3,rsor; 5hat other 5ays are avai a! e to yo, to retrieve a ro5 from a ta! e in em!edded )QL? ' () (in<le row (!5!%#s. Q71) 4o5 do yo, spe3ify and ,se a 3,rsor in a COBOL program? ' () +se !%5A)! %+)(&) statement either in workin< stora<e or in procedure di7ision .0efore open cursor), to specify the (!5!%# statement. #hen use &P!", $!#%> rows in a loop and finally %5&(!. Q72) What happens 5hen yo, say O=&N C02)O2? If there is an &) !) BA clause, rows are fetched, sorted and made a7aila0le for the $!#%> statement. &ther wise simply the cursor is placed on the first row. Q7") Is :&CL$2& C02)O2 e9e3,ta! e? "o. Q7*) Can yo, have more than one 3,rsor open at any one time in a program ? ' () Aes. Q7-) When yo, CO11I#; is the 3,rsor 3 osed? Aes. 1. ,. Chat is (Q5%A and (Q5 AQ Chat is , phase commitQ

:$#$B$)& 2A:B2)
#he I,estions and ans5ers that fo o5 are intended for those 5ith a 5orBing Bno5 edge of :B2 as a Kse f'testL. Q1) What is :B2 AIB1 :ata!ase 2)? A1) B, is a su0system of the *'( operatin< system. It is a ata0ase *ana<ement (ystem . B*() for that operatin< system. Q2) What is an a33ess path? A,) #he path that is used to <et to data specified in (Q5 statements. Q") What is an a ias? A2) It is an alternate name that can 0e used in (Q5 statements to refer to a ta0le or 7iew in the same or remote B, su0system. Q*) &9p ain 5hat a p an is? A6) Plan is a B, o0Nect .produced durin< the 0ind process) that associates one or more data0ase re8uest modules with a plan name. Q-) What is a :B2 !ind? A9) Bind is a process that 0uilds Waccess pathsX to B, ta0les. A 0ind uses the ata0ase )e8uest *odules.s) . B)*.s)) from the B, pre-compile step as input and produces an application plan. It also checks the users authority and 7alidates the (Q5 statements in the B)*.s). Q/) What information is ,sed as inp,t to the !ind pro3ess? A:) #he data0ase re8uest module produced durin< the pre-compile. #he (A(IB*.(A((#*# ta0le of the B, catalo<. Q+) What is meant !y the atta3hment fa3i ity? A;) #he attachment facility is an interface 0etween B, and #(&, I*(/'(, %I%(, or 0atch address spaces. It allows application pro<rams to access B,. Q.) What is meant !y $0#O CO11I#? A@) A+#& %&**I# is a (P+$I option that commits the effects of (Q5 statements automatically if they are successfully eDecuted. Q7) What is a !ase ta! e? A1) A 0ase ta0le is a real ta0le - a ta0le that physically eDists in that there are physical stored records. Q18) What is the f,n3tion of !,ffer manager? A1=) #he 0uffer mana<er is the B, component responsi0le for physically transferrin< data 0etween an eDternal medium and .7irtual) stora<e .performs the actual I/& operations). It minimiOes the amount of physical I/& actually performed with sophisticated 0ufferin< techni8ues.i.e., readahead 0ufferin< and look-aside 0ufferin<). Q11) What is a !,ffer poo ? A11) A 0uffer pool is main stora<e that is reser7ed to satisfy the 0ufferin< re8uirements for one or more ta0lespaces or indeDes, and is made up of either 6E or 2,E pa<es. Q12) 4o5 many !,ffer poo s are there in :B2? A1,) #here are four 0uffer poolsF BP=, BP1, BP,, and BP2,. Q1") On the 3reate ta! espa3e; 5hat does the CLO)& parameter do? A12) %5&(! physically closes the ta0lespace when no one is workin< on the o0Nect. B, .release ,.2) will lo<ically close ta0lespaces. Q1*) What is a 3 ,stering inde9?

A16)

It is a type of indeD that .1) locates ta0le rows and .,) determines how rows are <rouped to<ether in the ta0lespace.

Q1-) What 5i the CO11I# a33omp ish? A19) %&**I# will allow data chan<es to 0e permanent. #his then permits the data to 0e accessed 0y other units of work. Chen a %&**I# occurs, locks are freed so other applications can reference the Nust committed data. Q1/) What is meant !y 3on3,rren3y? A1:) %oncurrency is what allows more than one B, application process to access the same data at essentially the same time. Pro0lems may occur, such as lost updates, access to uncommitted data, and un-repeata0le reads. Q1+) What is 3,rsor sta!i ity? A1;) It is cursor sta0ility that WtellsX B, that data0ase 7alues read 0y this application are protected only while they are 0ein< used. .%han<ed 7alues are protected until this application reaches the commit point). As soon as a pro<ram mo7es from one row to another, other pro<rams may read or the first row. Q1.) What is the f,n3tion of the :ata 1anager? A1@) #he ata *ana<er is a B, component that mana<er the physical data0ases. It in7okes other system components, as necessary, to perform detailed functions such as lockin<, lo<<in<, and physical I/& operations .such as search, retrie7al, update, and indeD maintenance). Q17) What is a :ata!ase 2eI,est 1od, eA:B21)? A11) A B)* is a B, component created 0y the B, pre-compiler containin< the (Q5 source statements eDtracted from the application pro<ram. B)*s are input to the 0ind process. Q28) What is a data page? A,=) A data pa<e is a unit of retrie7a0le data, either 6E or 2,E .dependin< on how the ta0le is defined), containin< user or catalo< information. Q21) What are data types? A,1) #hey are attri0utes of columns, literals, and host 7aria0les. #he data types are (*A55I"#, I"#!G!), $5&A#, !%I*A5, %>A), 'A)%>A), A#! and #I*!. Q22) What is :e3 aration (eneratorA:CL(&N)? A,,) %5G!" is a facility that is used to <enerate (Q5 statements that descri0e a ta0le or 7iew. #hese ta0le or 7iew descriptions are then used to check the 7alidity of other (Q5 statements at precompile time. #he ta0le or 7iew declares are used 0y the B,I utility %5G!" to 0uild a host lan<ua<e structure, which is used 0y the B, precompiler to 7erify that correct column names and data types ha7e 0een specified in the (Q5 statement. Q2") What does :)N:B8+ data!ase do? A,2) (" B=; is where B, does its sortin<. It includes B,s sort work area and eDternal stora<e. Q2*) What 5i the ?2&& 3ommand do to a p an? A,6) It will drop.delete) that eDistin< plan. Q2-) What is a host varia! e? A,9) #his is a data item that is used in an (Q5 statement to recei7e a 7alue or to supply a 7alue. It must 0e preceded 0y a colon .F) to tell B, that the 7aria0le is not a column name. Q2/) What 5i the :B2 optimiDer do? A,:) #he optimiOer is a B, component that processes (Q5 statements and selects the access paths. Q2+) What is a page? A,;) #his is the unit of stora<e within a ta0le space or indeDspace that is accessed 0y B,.

Q2.) What is pagespa3e? A,@) Pa<espace refers to either to an unpartitioned ta0le, to an indeD space, or to a sin<le partition of a partitioned ta0le of indeD space. Q27) What is a predi3ate? A,1) A predicate is an element of a search condition that eDpresses or implies a comparison operation. Q"8) What is a re3overy og? A2=) A reco7ery lo< is a collection of records that descri0es the se8uence of e7ents that occur in #he information is needed for reco7ery in the e7ent of a failure durin< eDecution. B,.

Q"1) What is a 2eso,r3e Contro #a! eA2C#)? :es3ri!e its 3hara3teristi3s. A21) #he )%# is a ta0le that is defined to a B,/%I%( re<ion. It contains control characteristics which are assem0led 7ia the ("%)%# macros. #he )%# matches the %I%( transaction I to its associated B, authoriOation I and plan I .%I%( attachment facility). Q"2) Where are p ans stored? A2,) !ach plan is defined uni8uely in the (A(IB*.(A(P5A"( ta0le to correspond to the transaction .s) that are to eDecute that plan. Q"") What is meant !y repeata! e read? A22) Chen an application pro<ram eDecutes with repeata0le read protection, rows referenced 0y the pro<ram cant 0e chan<ed 0y other pro<rams until the pro<ram reaches a commit point. Q"*) :es3ri!e 5hat a storage gro,pA)#O(2O0=) is? A26) A (#&G)&+P is a named collection of A( 7olumes to 0e used 0y ta0lespaces and indeD spaces of data0ases. #he 7olumes of (#&G)&+P must 0e of the same de7ice type. Q"-) 4o5 5o, d yo, move a ta! espa3e A,sing )#O(2O0=) to a different :$): vo ,me a o3ated to that ta! espa3e? A29) If the ta0lespace used is only allocated to that (#&G)&+PF - A5#!) (#&G)&+P - add 7olume .new) delete 7olume.old) - )!&)G #AB5!(PA%! or )!%&'!) #AB5!(PA%! %reate a new (#&G)&+P that points to the new 7olume. A5#!) the ta0lespace and )!&)G or )!%&'!) the ta0lespace. Q"/) What is the format Ainterna ayo,t) of K#I1&)#$1=L? A2:) #his is a se7en part 7alue that consists of a date .yymmdd) and time.hhmmss and microseconds). Q"+) What is meant !y a ,nit of re3overy? A2;) #his is a se8uence of operations within a unit of work.i.e., work done 0etween commit points). Q".) Can :$): types assigned to storage gro,ps !e intermi9edAi.e.; ""-8s and "".8s)? A2@) "o Q"7) What are the three types of page o3Bs that 3an !e he d? A21) !Dclusi7e, update, and share. Q*8) Can :B2 !e a33essed !y #)O ,sers? If yes; 5hi3h 3ommand is ,sed to invoBe :B2? A6=) B, can 0e in7oked 0y #(& users 0y usin< the (" )+" command. Q*1) 4o5 are 5rite I6Os from the !,ffer poo e9e3,ted? A61) Asynchronously. Q*2) What is a :B2 3ata og?

A6,)

#he B, catalo< is a set of ta0les that contain information a0out all of the B, o0Nects.ta0les, 7iews, plans etc.).

Q*") In 5hi3h 3o ,mn of 5hi3h :B2 3ata og 5o, d yo, find the ength of the ro5s for a ta! es? A62) In the )!%5!"G#> column of (A(IB*.(A(#AB5!( Q**) What information is he d in )C)IB1.)C)CO=C? A66) #he (A(IB*.(A(%&PA ta0le contains information a0out ima<e copies made of the ta0lespaces. Q*-) What information is 3ontained in a )C)CO=C entry? A69) Included is the name of the data0ase, the ta0le space name, and the ima<e copy type.full or incremental etc.,) as well as the date and time each copy was made. Q*/) What information 3an yo, find in )C)IB1.)C)LINJ) ta! e? A6:) #he (A(IB*.(A(5I"E( ta0le contains information a0out the links 0etween ta0les created 0y referential constraints. Q*+) Where 5o, d yo, find information a!o,t the type of data!ase a,thority he d !y the ,ser? A6;) (A(IB*.(A( BA+#>. Q*.) Where 3o, d yo, ooB if yo, had a I,estion a!o,t 5hether a 3o ,mn has !een defined as an inde9? A6@) #his information can 0e found in (A(IB*.(A(I" !/!(. Q*7) On3e yo, 3reate a vie5; 5here 5o, d information a!o,t the vie5 !e stored? A61) Chen a 7iew is created, system information a0out the 7iew is stored in (A(IB*.(A('I!C(. Q-8) What is the )QL Comm,ni3ations $rea and 5hat are some of its Bey fie ds? A9=) It is a data structure that must 0e included in any host-lan<ua<e pro<ram usin< (Q5. It is used to pass feed0ack a0out the s8l operations to the pro<ram. $ields are return codes, error messa<es, handlin< codes and warnin<s. Q-1) What is :CL(&N? A91) %5G!" stands for declarations <eneratorI it is a facility to <enerate B, s8l data structures in %&B&5 or P5/I pro<rams. Q-2) 4o5 do yo, eave the 3,rsor open after iss,ing a CO11I#? Afor :B2 2." or a!ove on y) A9,) +se CI#> >&5 option in !%5A)! %+)(&) statement. But, it has not effect in psuedocon7ersational %I%( pro<rams. Q-") (ive the COBOL definition of a >$2C4$2 fie d. A92) A 'A)%>A) column )!*A)E( would 0e defined as followsF ... 1= )!*A)E(. 61 )!*A)E(-5!" PI% (1.6) +(AG! %&*P. 61 )!*A)E(-#!/# PI% /.11,=). Q-*) What is the physi3a storage ength of ea3h of the fo o5ing :B2 data typesE :$#&; #I1&; #I1&)#$1=? A96) A#!F 60ytes #I*!F 20ytes #I*!(#A*PF 1=0ytes Q--) What is the COBOL pi3t,re 3 a,se of the fo o5ing :B2 data typesE :$#&; #I1&; #I1&)#$1=? A99) A#!F PI% /.1=) #I*! F PI% /.=@) #I*!(#A*PF PI% /.,:)

Q-/) What is the COBOL pi3t,re 3 a,se for a :B2 3o ,mn defined as :&CI1$LA11;2)? ' () A9:) PI% (1.1)'11 %&*P-2. "oteF In !%I*A5.11,,), 11 indicates the siOe of the data type and , indicates the precision. Q-+) What is :CL(&N ? ' () A9;) e%5arations G!"eratorF used to create the host lan<ua<e copy 0ooks for the ta0le definitions. Also creates the !%5A)! ta0le. Q-.) What are the 3ontents of a :CL(&N? ' () A9@) !/!% (Q5 !%5A)! #AB5! statement which <i7es the layout of the ta0le/7iew in terms of B, datatypes. A host lan<ua<e copy 0ook that <i7es the host 7aria0le definitions for the column names. Q-7) Is it mandatory to ,se :CL(&N? If not; 5hy 5o, d yo, ,se it at a ? ' () A91) It is not mandatory to use %5G!". +sin< %5G!", helps detect wron<ly spelt column names etc. durin< the pre-compile sta<e itself .0ecause of the !%5A)! #AB5! ). %5G!" 0ein< a tool, would <enerate accurate host 7aria0le definitions for the ta0le reducin< chances of error. Q/8) Is :&CL$2& #$BL& in :CL(&N ne3essary? Why it ,sed? A:=) It not necessary to ha7e !%5A)! #AB5! statement in %5G!". #his is used 0y the precompiler to 7alidate the ta0le-name, 7iew-name, column name etc., durin< pre-compile. Q/1) Wi pre3ompi e of an :B2'COBOL program !om!; if :B2 is do5n? A:1) "o. Because the precompiler does not refer to the B, catalo<ue ta0les. Q/2) 4o5 is a typi3a :B2 !at3h program e9e3,ted ? A:,) #here are two methods of eDecutin< a B,-0atch pro<ram 1. +se (" utility to run a B, 0atch pro<ram from nati7e #(&. An eDample is shownF (" (A(#!*. (P2) )+" P)&G)A*.! 6;=B ) P5A".! 6;=B ) 5IB.G! G(=1#.&BP.5&A 5IBG) !" ,. +se IEP!$#=1 utility pro<ram to run the a0o7e (" command in a P%5. Q/") $ss,ming that a siteGs standard is that pgm name O p an name; 5hat is the easiest 5ay to find o,t 5hi3h programs are affe3ted !y 3hange in a ta! eGs str,3t,re? A:2) Query the catalo<ue ta0les (A(P5A" !P and (A(PA%E !P. Q/*) Name some fie ds from )QLC$. A:6) (Q5%& !, (Q5!))*, (Q5!)) Q/-) 4o5 3an yo, I,i3B y find o,t the n,m!er of ro5s ,pdated after an ,pdate statement? A:9) %heck the 7alue stored in (Q5!)) .2). Q//) What is &@=L$IN? ' () A::) !/P5AI" is used to display the access path as determined 0y the optimiOer for a (Q5 statement. It can 0e used in (P+$I .for sin<le (Q5 statement) or in BI" step .for em0edded (Q5). #he results of !/P5AI" is stored in +.P5A"S#AB5! where + is the authoriOation id of the user Q/+) What do yo, need to do !efore yo, do &@=L$IN? A:;) *ake sure that the P5A"S#AB5! is created under the A+#>I . Q/.) Where is the o,tp,t of &@=L$IN stored? ' () A:@) In +(!)I .P5A"S#AB5! Q/7) &@=L$IN has o,tp,t 5ith 1$#C4COL) O 8. What does it mean? ' () A:1) A nonmatchin< indeD scan if A%%!((#AP! H I.

Q+8) 4o5 do yo, do the &@=L$IN of a dynami3 )QL statement? A;=) #here are two methods to achie7e thisF 1. +se (P+$I or Q*$ to !/P5AI" the dynamic (Q5 statement ,. Include !/P5AI" command in the em0edded dynamic (Q5 statements Q+1) 4o5 do yo, sim, ate the &@=L$IN of an em!edded )QL statement in )=0?I6Q1?? (ive an e9amp e 5ith a host varia! e in W4&2& 3 a,se) A;1) +se a 8uestion mark in place of a host 7aria0le .or an unknown 7alue). $or instance, (!5!%# !*PS"A*! $)&* !*P C>!)! !*PS(A5A)A K Q Q+2) What are the iso ation eve s possi! e ? ' () A;,) %(F %ursor (ta0ility ))F )epeata0le )ead Q+") What is the differen3e !et5een C) and 22 iso ation eve s? A;2) %(F )eleases the lock on a pa<e after use ))F )etains all locks ac8uired till end of transaction Q+*) When do yo, spe3ify the iso ation eve ? 4o5? A;6) urin< the BI" process.I(&5A#I&" 5!'!5 is a parameter for the 0ind process). I(&5A#I&" . %(/)) )... Q+-) I ,se C) and ,pdate a page. Wi the o3B !e re eased after I am done 5ith that page? A;9) "o. Q+/) What are the vario,s o3Bing eve s avai a! e? A;:) PAG!, #AB5!, #AB5!(PA%! Q++) 4o5 does :B2 determine 5hat o3B'siDe to ,se? A;;) #here are three methods to determine the lock-siOe. #hey areF 1. Based on the lock-siOe <i7en while creatin< the ta0lespace ,. Pro<rammer can direct the B, what lock-siOe to use 2. If lock-siOe A"A is specified, B, usually choses a lock-siOe of PAG! Q+.) What are the disadvantages of =$(& eve o3B? A;@) >i<h resource utiliOation if lar<e updates are to 0e done Q+7) What is o3B es3a ation? A;1) Promotin< a PAG! lock-siOe to ta0le or ta0lespace lock-siOe when a transaction has a8uired more locks than specified in "+*5E#(. 5ocks should 0e taken on o0Nects in sin<le ta0lespace for escalation to occur. Q.8) What are the vario,s o3Bs avai a! e? A@=) (>A)!, !/%5+(I'!, +P A#! Q.1) Can I ,se LOCJ #$BL& on a vie5? A@1) "o. #o lock a 7iew, take lock on the underlyin< ta0les. Q.2) What is $L#&2 ? ' () A@,) (Q5 command used to chan<e the definition of B, o0Nects. Q.") What is a :B21; =L$N ? A@2) B)*F ata Base )e8uest *odule, has the (Q5 statements eDtracted from the host lan<ua<e pro<ram 0y the pre-compiler. P5A"F A result of the BI" process. It has the eDecuta0le code for the (Q5 statements in the B)*. Q.*) What is $CQ0I2&62&L&$)& in BIN:?

A@6)

etermine the point at which B, ac8uires or releases locks a<ainst ta0le and ta0lespaces, includin< intent locks.

Q.-) What e se is there in the =L$N apart from the a33ess path? ' () A@9) P5A" has the eDecuta0le code for the (Q5 statements in the host pro<ram Q./) What happens to the =L$N if inde9 ,sed !y it is dropped? A@:) Plan is marked as in7alid. #he neDt time the plan is accessed, it is re0ound. Q.+) What are =$CJ$(&) ? ' () A@;) #hey contain eDecuta0le code for (Q5 statements for one B)*. Q..) What are the advantages of ,sing a =$CJ$(&? A@@) #he ad7anta<es of usin< PA%EAG! areF 1. A7oid ha7in< to 0ind a lar<e num0er of B)* mem0ers into a plan ,. A7oid cost of a lar<e 0ind 2. A7oid the entire transaction 0ein< una7aila0le durin< 0ind and automatic re0ind of a plan 6. *inimiOe fall0ack compleDities if chan<es result in an error. Q.7) What is a 3o e3tion? A@1) A user defined name that is the anchor for packa<es. It has not physical eDistence. *ain usa<e is to <roup packa<es. Q78) In )=0?I s,ppose yo, 5ant to se e3t ma9im,m of 1888 ro5s; !,t the se e3t ret,rns on y 288 ro5s. What are the 2 )QLCO:&s that are ret,rned? ' () A1=) ?1== .for successful completion of the 8uery), = .for successful %&**I# if A+#&%&**I# is set to Aes). Q71) 4o5 5o, d yo, print the o,tp,t of an )QL statement from )=0?I? ' () A11) Print the output dataset. Q72) Lot of ,pdates have !een done on a ta! e d,e to 5hi3h inde9es have gone hay5ire. What do yo, do? A1,) 5ooks like indeD pa<e split has occurred. & a )!&)G of the indeDes. Q7") What is dynami3 )QL? ' () A12) ynamic (Q5 is a (Q5 statement created at pro<ram eDecution time. Q7*) When is the a33ess path determined for dynami3 )QL? ' () A16) At run time, when the P)!PA)! statement is issued. Q7-) ),ppose I have a program 5hi3h ,ses a dynami3 )QL and it has !een performing 5e ti no5. Off ate; I find that the performan3e has deteriorated. What happened? ' () A19) #here may 0e one of the followin< reasonsF Pro0a0ly )+" (#A#( is not done and the pro<ram is usin< a wron< indeD due to incorrect stats. Pro0a0ly )+"(#A#( is done and optimiOer has chosen a wron< access path 0ased on the latest statistics. Q7/) 4o5 does :B2 store N0LL physi3a y? A1:) As an eDtra-0yte prefiD to the column 7alue. Physically, the null prefiD is >eD G==G if the 7alue is present and >eD G$$G if it is not. Q7+) 4o5 do yo, retrieve the data from a n, a! e 3o ,mn? ' () A1;) +se null indicators. (yntaD ... I"#& F>&(#'A)F"+55I" Q7.) What is the pi3t,re 3 a,se of the n, indi3ator varia! e? ' () A1@) (1.6) %&*P.

Q77) What does it mean if the n, indi3ator has '1; 8; '2? ' () A11) -1 F the field is nullI = F the field is not nullI -,

F the field 7alue is truncated

Q188) 4o5 do yo, insert a re3ord 5ith a n, a! e 3o ,mn? A1==) #o insert a "+55, mo7e -1 to the null indicator, #o insert a 7alid 7alue, mo7e = to the null indicator Q181) What is 20N)#$#)? ' () A1=1) A B, utility used to collect statistics a0out the data 7alues in ta0les which can 0e used 0y the optimiOer to decide the access path. It also collects statistics used for space mana<ement. #hese statistics are stored in B, catalo< ta0les. Q182) When 5i yo, 3hose to r,n 20N)#$#)? A1=,) After a load, or after mass updates, inserts, deletes, or after )!&)G. Q18") (ive some e9amp e of statisti3s 3o e3ted d,ring 20N)#$#)? A1=2) "um0er of rows in the ta0le, Percent of rows in clusterin< se8uence, "um0er of distinct 7alues of indeDed column, "um0er of rows mo7ed to a near0y/fairway pa<e due to row len<th increase Q18*) What is 2&O2(? When is it ,sed? A1=6) )!&)G reor<aniOes data on physical stora<e to reclutser rows, positionin< o7erflowed rows in their proper se8uence, to reclaim space, to restore free space. It is used after hea7y updates, inserts and delete acti7ity and after se<ments of a se<mented ta0lespace ha7e 0ecome fra<mented. Q18-) What is I1$(&CO=C ? ' () A1=9) It is full 0ackup of a B, ta0le which can 0e used in reco7ery. Q18/) When do yo, ,se the I1$(&CO=C? ' () A1=:) #o take routine 0ackup of ta0les, After a 5&A with 5&G "& and After )!&)G with 5&G "& Q18+) What is CO=C =&N:IN( stat,s? A1=;) A state in which, an ima<e copy on a ta0le needs to 0e taken, In this status, the ta0le is a7aila0le only for 8ueries. Aou cannot update this ta0le. #o remo7e the %&PA P!" I"G status, you take an ima<e copy or use )!PAI) utility. Q18.) What is C4&CJ =&N:IN( ? A1=@) Chen a ta0le is 5&A ed with !"$&)%! "& option, then the ta0le is left in %>!%E P!" I"G status. It means that the 5&A utility did not perform constraint checkin<. Q187) What is Q0I&)C&? A1=1) A Q+I!(%! flushes all B, 0uffers on to the disk. #his <i7es a correct snapshot of the data0ase and should 0e used 0efore and after any I*AG!%&PA to maintain consistency. Q118) What is a 3 ,stering inde9 ? ' () A11=) %auses the data rows to 0e stored in the order specified in the indeD. A mandatory indeD defined on a partitioned ta0le space. Q111) 4o5 many 3 ,stering inde9es 3an !e defined for a ta! e? A111) &nly one. Q112) What is the differen3e !et5een primary Bey & ,niI,e inde9 ? A11,) Primary EeyF a relational data0ase constraint. Primary key consists of one or more columns that uni8uely identify a row in the ta0le. $or a normaliOed relation, there is one desi<nated primary key. +ni8ue indeDF a physical o0Nect that stores only uni8ue 7alues. #here can 0e one or more uni8ue indeDes on a ta0le. Q11") What is sI 3ode '722 ?

A112)

AuthoriOation failure

Q11*) What is sI 3ode '.11? A116) (!5!%# statement has resulted in retrie7al of more than one row. Q11-) What does the sI 3ode of '.1. pertain to? ' () A119) #his is <enerated when the consistency tokens in the B)* and the load module are different. Q11/) $re vie5s ,pdata! e ? A11:) "ot all of them. (ome 7iews are updata0le e.<. sin<le ta0le 7iew with all the fields or mandatory fields. !Damples of non-updata0le 7iews are 7iews which are Noins, 7iews that contain a<<re<ate functions .such as *I"), and 7iews that ha7e G)&+P BA clause. Q11+) If I have a vie5 5hi3h is a Foin of t5o or more ta! es; 3an this vie5 !e ,pdata! e? ' () A11;) "o. Q11.) What are the * environments 5hi3h 3an a33ess :B2 ? A11@) #(&, %I%(, I*( and BA#%> Q117) What is an inner Foin; and an o,ter Foin ? A111) Inner PoinF com0ine information from two or more ta0les 0y comparin< all 7alues that meet the search criteria in the desi<nated column or columns of one ta0le with all the 7alues in correspondin< columns of the other ta0le or ta0les. #his kind of Noin which in7ol7e a match in 0oth columns are called inner Noins. &uter Noin F Is one in which you want 0oth matchin< and non matchin< rows to 0e returned. B, has no specific operator for outer Noins, it can 0e simulated 0y com0inin< a Noin and a correlated su0 8uery with a +"I&". Q128) What is ?2&&=$(& and =C#?2&& in #$BL&)=$C& 3reation? A1,=) P%#$)!!F percenta<e of each pa<e to 0e left free $)!!PAG!F "um0er of pa<es to 0e loaded with data 0etween each free pa<e Q121) What are simp e; segmented and partitioned ta! e spa3es ? A1,1) (imple #a0lespaceF %an contain one or more ta0les. )ows from multiple ta0les can 0e interlea7ed on a pa<e under the BAs control and maintenance (e<mented #a0lespaceF %an contain one or more ta0les. #a0lespace is di7ided into se<ments of 6 to :6 pa<es in increments of 6 pa<es. !ach se<ment is dedicated to sin<le ta0le. A ta0le can occupy multiple se<ments Partitioned #a0lespaceF %an contain one ta0le. #a0lespace is di7ided into parts and each part is put in a separate '(A* dataset. Q122) What is fi ter fa3tor? A1,,) &ne di7ided 0y the num0er of distinct 7alues of a column. Q12") What is inde9 3ardina ity? ' () A1,2) #he num0er of distinct 7alues a column or columns contain. Q12*) What is a synonym ? A1,6) (ynonym is an alternate name for a ta0le or 7iew used mainly to hide the leadin< 8ualifier of a ta0le or 7iew.. A synonym is accessi0le only 0y the creator. Q12-) What is the differen3e !et5een )CNONC1 and $LI$)?

A1,9)

(A"&"A* F is dropped when the ta0le or ta0lespace is dropped. (ynonym is a7aila0le only to the creator. A5IA( F is retained e7en if ta0le or ta0lespace is dropped. A5IA( can 0e created e7en if the ta0le does not eDist. It is used mainly in distri0uted en7ironment to hide the location information from pro<rams. Alias is a <lo0al o0Nect 3 is a7aila0le to all.

Q12/) What do yo, mean !y NO# N0LL WI#4 :&?$0L#? When 5i yo, ,se it? A1,:) #his column cannot ha7e nulls and while insertion, if no 7alue is supplied then it will ha7e Oeroes, spaces or date/time dependin< on whether it is numeric, character or date/time.+se it when you do not want to ha7e nulls 0ut at the same time cannot <i7e 7alues all the time you insert this row. Q12+) What do yo, mean !y NO# N0LL? When 5i yo, ,se it? A1,;) #he column cannot ha7e nulls. +se it for key fields. Q12.) When 5o, d yo, prefer to ,se >$2C4$2? A1,@) Chen a column which contains lon< teDt, e.<. remarks, notes, may ha7e in most cases less than 9=[ of the maDimum len<th. Q127) What are the disadvantages of ,sing >$2C4$2? A1,1) %an lead to hi<h space utiliOation if most of the 7alues are close to maDimum. Positionin< of 'A)%>A) column has to 0e done carefully as it has performance implications. )elocation of rows to different pa<es can lead to more I/&s on retrie7al. Q1"8) 4o5 do I 3reate a ta! e 1$N$(&2 A&1='NO; 1$N$(&2) 5here 1$N$(&2 is a foreign Bey 5hi3h referen3es to &1='NO in the same ta! e? (ive the e9a3t ::L. A12=) $irst %)!A#! *A"AG!) ta0le with !*P-"& as the primary key. #hen A5#!) it to define the forei<n key. Q1"1) When is the a,thoriDation 3he3B on :B2 o!Fe3ts done ' at BIN: time or r,n time? A121) At run time. Q1"2) What is a,diting? A12,) )ecordin< (Q5 statements that access a ta0le. (pecified at ta0le creation time or throu<h alter. Q1"") ma9 n,m!er of 3o ,mns in a d!2 ta! e A122) ,,6 Q1"*) I need to vie5 the n,m!er of ta! es e9isting ,nder one parti3, ar O5ner. Is it possi! e? If so; p give the )QL I,ery for this? A126) #he 8uery (!5!%# L $)&* (A(IB*.(A(#AB5!( C>!)! %)!A#&) H Gowner idG #his displays the ta0le names with that If you want only the num0er of ta0les <i7e the followin< 8uery. (!5!%# %&+"#.L) $)&* (A(IB*.(A(#AB5!( C>!)! %)!A#&) H Gowner idG *ake sure that you are in correct su0system. Q1"-) I need to vie5 the n,m!er of ta! es e9isting ,nder one parti3, ar O5ner. Is it possi! e? If so; p give the )QL I,ery for this? A129) #he 8uery (!5!%# L $)&* (A(#AB5!( C>!)! &C"!)H should work. Q1"/) I need to vie5 the n,m!er of ta! es e9isting ,nder one parti3, ar O5ner. Is it possi! e? If so; p give the )QL I,ery for this? A12:) 0, records information for its operation in a catalo< which is actually a <roup of ta0les. (o we can use the (A(#AB5!( to <et answer to ur 8uery. Q1"+) What is <OIN and different types of <OIN.

A12;)

#he a0ility to Noin rows and com0ine data from two or more ta0les is one of the most powerful features of relational system. #hree type of NoinsF1. !8ui-Noin ,."on-e8uiNoin 2.self-Noin

Q1".) 3an I a ter a ta! e Ae.g. adding a 3o ,mn) 5hen other ,ser is se e3ting some 3o ,mns or ,pdating some 3o ,mns from the same ta! e? A12@) yes possi0le. until the updation or selection is committed d0, ta0le will not 0e restructured. new column definition will 0e there 0ut it will not 0e included until all the tasks on the ta0le are committed. Q1"7) 4o5 many s,! I,eries 3an yo, 3om!ine together ? A121) #otal 1: 8ueries and su0 8ueries are 19 Q1*8) What are the different methods of a33essing d!2 from tso? 4o5 is the 3onne3tion esta! ished !et5een #)O & :B2? A16=) #here are three ways in esta0lishin< tso/d0, connection 1. (P+$I ,. Q*$ 2. %A#A5&G 'I(IBI5I#A B. A thread 0etween #(& 3 B, is esta0lished while attemptin< to make connection 0etween tso 3 d0,. Q1*1) 4o5 many !,ffer poo s are avai a! e in d!2? A161) #en 2,k siOe 0uffer pools and fifty 6k siOe 0uffer pools .0p= to 0p61)default 0uffer pools are 0p=,0p1,0p, 3 0p2, Q1*2) B"+ a!end d,ring )=0?I A16,) #he 02; a0end in the (P+$I is 0ecause of space re8uirements , the 8uery has resulted in so many rows that the (P+$I. out file is not lar<e enou<h to handle it, increase the space allocation of (P+$I out file. Q1*") 4o5 many B,ffer poo s are there in :B2 and 5hat are they? A162) #here are 6 Buffer pools. #hey are BP=,BP1,BP, and BP2,. Q1**) What is the 3ommand ,sed !y #)O ,sers to invoBe :B2? A166) (" )+" Q1*-) What is the error 3ode '.8" ? A169) uni8ue indeD 7iolation Q1*/) 4o5 do yo, fi ter o,t the ro5s retrieved from a :!2 ta! e ? A16:) one way is to use #he (Q5 C>!)! clause. Q1*+) 5hat is a 3o e3tion? A16;) collection is somethin< that e7ery pro<rammer should assi<n/(pecify for e7ery packa<e. this a0out 1-1@ characters lon<. Q1*.) What is )Be eton 3,rsor ta! e A)JC#)? A16@) #he !Decuta0le form of a Plan. #his is stored in sysi0m.sct=, ta0le. Q1*7) 5hatGs the eI,iva ent Co!o :ata type for :e3ima A9;y) in :B2? 5hat does the 3,rrent )QLI: register 3ontain? A161) Pic s1.D-y)'1.A) %omp-2I the current (Q5I contains the current authoriOation I . Q1-8) Can 5e de3 are :B2 4O)# varia! e in COBOL CO=C !ooB? A19=) "&. If we declare B, host 7aria0le in %&B&5 %&PA 0ook, at the time of Pre-compilation we <et the host 7aria0le not defined, 0ecause pre-compiler will not eDpand %&B&5 %&PA 0ook. (o we declare it either in %5G!" with !/!% (Q5 I"%5+ ! %5G!" name !" -!/!% or we directly hardcode it in the workin< stora<e section. Q1-1) What sho, d !e spe3ified a ong 5ith a 3,rsor in order to 3ontin,e ,pdating pro3ess after 3ommit?

A191)

Cith >old option.

Q1-2) 5hat is the name of the defa, t d!2 3ata og data!ase? A19,) (" B=: Q1-") When Can yo, !e s,re that a I,ery 5i ret,rn on y one ro5? A192) Chen you use the primary key and only the primary key in the where clause. Q1-*) 5hat is the differen3e !et5een Foin and ,nion? A196) Noin is used to retrie7e data from different ta0les usin< a sin<le s8l statement. union is used to com0ine the results of two or more s8l 8ueries. Q1--) What is a 3orre ated s,! I,ery? A199) In a su0 8uery, if the outer 8uery refers 0ack to the outcome of inner 8uery it is called correlated su0 8uery. #hatGs why the outer 8uery is e7aluated first unlike an ordinary su0 8uery Q1-/) What are the f,n3tions of Bind? A19:) BI" mainly performs two thin<s syntaD checkin< and authoriOation checkin<.It 0inds to<ether all packa<es into an application plan hence the name BI" .Apart from this 0ind has optimiser as a su0component.Its function is to determine the optimum access strate<y. Q1-+) 1a9. No of ro5s per page A19;) 1,; Q1-.) #he on y p a3e of >)$1 J):) in :B2 is? A19@) B( ( is a '(A* E( (. Q1-7) Can $ 0sers 4ave #he =rivi ege #o 0se #he )QL )tatement )e e3t S A:1L)? A191) "o the user should 0e <ranted pri7ile<e to use it. Q1/8) What is the siDe of a data page? A1:=) 6E to @E Q1/1) 5hatGs the !est o3B siDe that yo, 3o, d ,se 5hen yo, 3reate a ta! espa3e? A1:1) #he answer is 5ocksiOe H A"A. +nless you are (ure whatGs the Purpose of ta0lespace ie., )eadonly or )/C. If you use lock siOe Hany, 0, would automatically determine what type of locks it should use. Q1/2) 5hatGs the error 3ode for 0niI,e Inde9 >io ation? A1:,) -@=2 Q1/") Can yo, define an Inde9 if the ta! e siDe ess than 18 =$(&)? A1:2) "& Q1/*) WhatGs the 1a9im,m Length of )QLC$ and 5hatGs the 3ontent of )QLC$BC? A1:6) #he *aD len<th is 12:. and the (Q5%AB% has the 'alue of (Q5%A. Q1/-) WhatGs the ma9im,m n,m!er of vo ,mes that 3an !e added to a )#O(2O0=? A1:9) #he answer is 122.+sually it will 0e difficult monitor more than 2 or 6 7olumes to a (to<roup. Q1//) WhatGs the ma9im,m n,m!er of 3hara3ters that a ta! ename 3an have? A1::) #he answer is 1@ characters. Q1/+) What is the meaning of '.8- )QL ret,rn 3ode? A1:;) Pro<ram name not in plan. Bind the plan and include the B)* for the pro<ram named as part of the plan.

Q1/.) 5hen does the )QL statement gets e9e3,ted 5hen yo, ,se 3,rsor in the app i3ation programming ? A1:@) (Q5 statement <ets eDecuted when we open cursor Q1/7) What does C022&N#:$#$ option in !ind indi3ate A1:1) %+))!"# A#A option ensures 0lock fetch while selectin< rows from a ta0le. In B,'6 the default has 0een chan<ed to "&. #herefore it is necessary to chan<e all the 0ind cards with %+))!"# A#A.A!() which is default in B,'2 3 earlier to %+))!"# A#A."&). Q1+8) What is the differen3e !et5een #C=& 1 inde9 & #C=& 2 inde9 A1;=) #AP! 1 3 #AP! , are specified when an indeD is created on the ta0le. #AP! , indeD is the option which comes with B,'6. Cith #AP! , indeD data can 0e retrie7ed faster as only the data pa<es are locked and not the indeD pa<es. >ence #AP! , indeD is recommended. Q1+1) What are the eve s of iso ation avai a! e 5ith :B2>* A1;1) %( )) +). added new for B,'6 which stands for uncommitted read which allows to retrie7e records from the space which has eDclusi7e locks also 0ut data inte<rity will 0e affected if this option is used )#he 0est a7aila0le option for data inte<rity 3 data concurrency is %(. Q1+2) 4o5 do , a3hieve re3ord eve o3Bing in :B2 versions 5hen re3ord eve o3Bing is not a o5ed? A1;,) By ha7in< the len<th of the record <reater than that of a pa<eM Q1+") In a :B2'CIC) program 5hi3h is a3ts as 3o'ordinator and 5hi3h is parti3ipant? A1;2) B, - participant %I%(- coordinator Q1+*) What does :1L stand for and 5hat are some e9amp es of it? A1;6) ata *anipulation 5an<ua<e. (ome eDamples are (!5!%#, I"(!)#, !5!#!, )!P5A%!. Q1+-) 4o5 to define the data items to re3eive the fet3h items for the )QL? A1;9) +sin< the (!%#, followed 0y lines of - Gdata items ( datatypeG. Q1+/) 4o5 5i yo, de ete d,p i3ate re3ords from a ta! e? A1;:) elete $rom #a0le1Chere Id In .(elect Id $rom #a0le1 As #emp Group By Id >a7in< %ount.L) K1) Q1++) What is the differen3e !et5een Where and 4aving C a,se A1;;) C>!)! is for )ows and >A'I"G is for Groups Q1+.) 4o5 to see the str,3t,re of d!2 ta! e?? A1;@) +sin< Q*$. Q1+7) 4o5 do yo, de3 are a host varia! e Ain COBOL) for an attri!,te named emp'name of type >$2C4$2A2-) ? A1;1) =1 !*P-G)P. 61 !-5!" PI% (1.6) %&*P. 61 !-"A*! PI% /.,9). Q1.8) What is the ma9im,m n,m!er of ta! es that 3an !e stored on a =artitioned #a! e )pa3e ? A1@=) &"! Q1.1) Name the different types of #a! e spa3es. A1@1) (imple #a0le (pace, (e<mented #a0le (pace and Partitioned #a0le (pace Q1.2) 5hat are the ma9. & min. no. of partitions a o5ed in a partition ta! espa3e? A1@,) minimum is 6. maDimum is :6. Q1.") 5hat is the ma9im,m n,m!er of ta! es that 3an !e Foined ? A1@2) fifteen

Q1.*) What te3hniI,e is ,sed to retrieve data from more than one ta! e in a sing e )QL statement? A1@6) #he Poin statement com0ines data from more that two ta0les Q1.-) &9p ain the ,se of the W4&2& 3 a,se. A1@9) It directs B, to eDtract data from rows where the 7alue of the column is the same as the current 7alue of the host 7aria0le. Q1./) What is a :B2 !ind? A1@:) B, 0ind is a process that 0uilds an access path to B, ta0les. Q1.+) What is a :B2 a33ess path? A1@;) An access path is the method used to access data specified in B, (Q5 statements.

Q1..) What is a :B2 p an? A1@@) An application plan or packa<e is <enerated 0y the 0ind to define an access path. Q1.7) What is norma iDation and 5hat are the five norma forms? A1@1) "ormaliOation is a desi<n procedure for representin< data in ta0ular format. #he fi7e normal forms are pro<ressi7e rules to represent the data with minimal redundancy. Q178) What are foreign Beys? A11=) #hese are attri0utes of one ta0le that ha7e matchin< 7alues in a primary key in another ta0le, allowin< for relationships 0etween ta0les. Q171) :es3ri!e the e ements of the )&L&C# I,ery synta9? A111) (!5!%# element $)&* ta0le C>!)! conditional statement. Q172) &9p ain the ,se of the W4&2& 3 a,se? A11,) C>!)! is used with a relational statement to isolate the o0Nect element or row. Q17") What te3hniI,es are ,sed to retrieve data from more than one ta! e in a sing e )QL statement? A112) Poins, unions and nested selects are used to retrie7e data. Q17*) What do the initia s ::L and :1L stand for and 5hat is their meaning? A116) 5 is data definition lan<ua<e and *5 is data manipulation lan<ua<e. 5 statements are %)!A#!, A5#!), #)+"%A#!. *5 statements are (!5!%#, I"(!)#, !5!#! and +P A#!. Q17-) What is a vie5? Why ,se it? A119) A 7iew is a 7irtual ta0le made up of data from 0ase ta0les and other 7iews, 0ut not stored separately. Q17/) &9p ain an o,ter Foin? A11:) An outer Noin includes rows from ta0les when there are no matchin< 7alues in the ta0les. Q17+) What is a s,!se e3t? Is it different from a nested se e3t? A11;) A su0select is a select which works in conNunction with another select. A nested select is a kind of su0select where the inner select passes to the where criteria for the outer select. Q17.) What is the differen3e !et5een gro,p !y and order !y? A11@) Group 0y controls the presentation of the rows, order 0y controls the presentation of the columns for the results of the (!5!%# statement. Q177) &9p ain the &@=L$IN statement? A111) #he eDplain statement pro7ides information a0out the optimiOerGs choice of access path of the s8l. Q288) What is ta! espa3e?

A,==)

#a0les are stored in ta0lespaces .hence the name)M #here are three types of ta0lespacesF simple, se<mented and partitioned.

Q281) What is a 3,rsor and 5hat is its f,n3tion? A,=1) An em0edded (Q5 statement may return a num0er of rows while the pro<rammin< lan<ua<e can only access one row at a time. #he pro<rammin< de7ice called a cursor controls the position of the row. Q282) What is referentia integrity? A,=,) )eferential inte<rity refers to the consistency that must 0e maintained 0etween primary and forei<n keys, i.e. e7ery forei<n key 7alue must ha7e a correspondin< primary key 7alue. Q28") 0s,a y; 5hi3h is more important for :B2 system performan3e ' C=0 pro3essing or I6O a33ess? A,=2) I/& operations are usually most critical for B, performance .or any other data0ase for that matter). Q28*) Is there any advantage to denorma iDing :B2 ta! es? A,=6) enormaliOin< B, ta0les reduces the need for processin< intensi7e relational Noins and reduces the num0er of forei<n keys. Q28-) What is the data!ase des3riptor? A,=9) #he data0ase descriptor, B is the B, component that limits access to the data0ase whene7er o0Nects are created, altered or dropped. Q28/) What is o3B 3ontention? A,=:) #o maintain the inte<rity of B, o0Nects the B permits access to only on o0Nect at a time. 5ock contention happens if se7eral o0Nects are re8uired 0y contendin< application processes simultaneously. Q28+) What is )=0?I? A,=;) (P+$I stands for (Q5 processin< usin< file input. It is the B, interacti7e menu-dri7en tool used 0y de7elopers to create data0ase o0Nects. Q28.) What is the signifi3an3e of :B2 free spa3e and 5hat parameters 3ontro it? A,=@) #he two parameters used in the %)!A#! statement are the P%#$)!! which specifies the percenta<e of free space for each pa<e and $)!!PAG! which indicates the num0er of pa<es to 0e loaded with data 0etween each free pa<e. $ree space allows room for the insertion of new rows. Q287) What is a N0LL va ,e? What are the pros and 3ons of ,sing N0LL)? A,=1) A "+55 7alue takes up one 0yte of stora<e and indicates that a 7alue is not present as opposed to a space or Oero 7alue. ItGs the B, e8ui7alent of #B on an or<aniOational chart and often correctly portrays a 0usiness situation. +nfortunately, it re8uires eDtra codin< for an application pro<ram to handle this situation. Q218) What is a synonym? 4o5 is it ,sed? A,1=) A synonym is used to reference a ta0le or 7iew 0y another name. #he other name can then 0e written in the application code pointin< to test ta0les in the de7elopment sta<e and to production entities when the code is mi<rated. #he synonym is linked to the A+#>I that created it. Q211) What is an a ias and ho5 does it differ from a synonym? A,11) An alias is an alternati7e to a synonym, desi<ned for a distri0uted en7ironment to a7oid ha7in< to use the location 8ualifier of a ta0le or 7iew. #he alias is not dropped when the ta0le is dropped. Q212) What is a LIJ& ta! e and ho5 is it 3reated? A,1,) A 5IE! ta0le is created 0y usin< the 5IE! parameter in a %)!A#! ta0le statement. 5IE! ta0les are typically created for a test en7ironment from the production en7ironment.

Q21") If the !ase ta! e ,nder ying a vie5 is restr,3t,red; eg. attri!,tes are added; does the app i3ation 3ode a33essing the vie5 need to !e redone? A,12) "o. #he ta0le and its 7iew are created anew, 0ut the pro<rams accessin< the 7iew do not need to 0e chan<ed if the 7iew and attri0utes accessed remain the same. Q21*) 0nder 5hat 3ir3,mstan3es 5i :B2 a o5 an )QL statement to ,pdate more than one primary Bey va ,e at a time? A,16) "e7er. (uch processin< could produce duplicate 7alues 7iolatin< entity inte<rity. Primary keys must 0e updated one at a time. Q21-) What is the 3as3ade r, e and ho5 does it re ate to de etions made 5ith a s,!se e3t? A,19) #he cascade rule will not allow deletions 0ased on a su0select that references the same ta0le from which the deletions are 0ein< made. Q21/) What is the se f'referen3ing 3onstraint? A,1:) #he self-referencin< constraint limits in a sin<le ta0le the chan<es to a primary key that the related forei<n key defines. #he forei<n key in a self referencin< ta0le must specify the !5!#! %A(%A ! rule. Q21+) What are de ete'3onne3ted ta! es? A,1;) #a0les related with a forei<n key are called delete-connected 0ecause a deletion in the primary key ta0le can affect the contents of the forei<n key ta0le. Q21.) When 3an an insert of a ne5 primary Bey va ,e threaten referentia integrity? A,1@) "e7er. "ew primary key 7alues are not a pro0lem. >owe7er, the 7alues of forei<n key inserts must ha7e correspondin< primary key 7alues in their related ta0les. And updates of primary key 7alues may re8uire chan<es in forei<n key 7alues to maintain referential inte<rity. Q217) In terms of :B2 inde9ing; 5hat is the root page? A,11) #he simplest B, indeD is the B-tree and the B-treeGs top pa<e is called the root pa<e. #he root pa<e entries represent the upper ran<e limits of the indeD and are referenced first in a search. Q228) 4o5 does :B2 ,se m, tip e ta! e inde9es? A,,=) B, use the multiple indeDes to satisfy multiple predicates in a (!5!%# statement that are Noined 0y an A" or &). Q221) What are some 3hara3teristi3s of 3o ,mns that !enefit from inde9es? A,,1) Primary key and forei<n key columnsI columns that ha7e uni8ue 7aluesI columns that ha7e a<<re<ates computed fre8uently and columns used to test the eDistence of a 7alue. Q222) What is a 3omposite inde9 and ho5 does it differ from a m, tip e inde9? A,,,) A multiple indeD is not one indeD 0ut two indeDes for two different columns of a ta0le. A composite indeD is one indeD made up of com0ined 7alues from two columns in a ta0le. If two columns in a ta0le will often 0e accessed to<ether a composite indeD will 0e efficient. Q22") What is meant !y inde9 3ardina ity? A,,2) #he num0er of distinct 7alues for a column is called indeD cardinality. B,Gs )+"(#A#( utility analyOes column 7alue redundancy to determine whether to use a ta0lespace or indeD scan to search for data. Q22*) What is a 3 ,stered inde9? A,,6) $or a clustered indeD B, maintains rows in the same se8uence as the columns in the indeD for as lon< as there is free space. B, can then process that ta0le in that order efficiently. Q22-) What Bey5ord does an )QL )&L&C# statement ,se for a string sear3h? A,,9) #he 5IE! keyword allows for strin< searches. #he [ si<n is used as a wildcard.

Q22/) What are some )QL aggregates and other !,i t'in f,n3tions? A,,:) #he common a<<re<ate, 0uilt-in functions are A'G, (+*, *I", *A/, %&+"# and I(#I"%#. Q22+) 4o5 is the )0B)#2 Bey5ord ,sed in sI ? A,,;) (+B(#) is used for strin< manipulation with column name, first position and strin< len<th used as ar<uments. !.<. (+B(#) ."A*!, 1 2) refers to the first three characters in the column "A*!. Q22.) What are the three :B2 date and time data types and their asso3iated f,n3tions? A,,@) #he three data types are A#!, #I*! and #I*!(#A*P. %>A) can 0e used to specify the format of each type. #he AA( function calculates the num0er of days 0etween two dates. .ItGs A,E compliant). Q227) &9p ain transa3tions; 3ommits and ro !a3Bs in :B2. A,,1) In B, a transaction typically re8uires a series of updates, insertions and deletions that represent a lo<ical unit of work. A transaction puts an implicit lock on the B, data. Pro<rammers can use the %&**I# C&)E statement to terminate the transaction creatin< smaller units for reco7ery. If the transaction fails B, uses the lo< to roll 0ack 7alues to the start of the transaction or to the precedin< commit point. Q2"8) What is dead o3B? A,2=) eadlock occurs when transactions eDecutin< at the same time lock each other out of data that they need to complete their lo<ical units of work. Q2"1) What are the fo,r o3Ba! e ,nits for :B2? A,21) B, imposes locks of four differin< siOesF pa<es, ta0les, ta0lespace and for indeDes su0pa<e. Q2"2) What are the three o3B types? A,2,) #he three types are shared, update and eDclusi7e. (hared locks allow two or more pro<rams to read simultaneously 0ut not chan<e the locked space. An eDclusi7e lock 0ars all other users from accessin< the space. An update lock is less restricti7eI it allows other transactions to read or ac8uire shared locks on the space. Q2"") What is iso ation eve ? A,22) (Q5 statements may return any num0er of rows, 0ut most host lan<ua<es deal with one row at a time 0y declarin< a cursor that presents each row at a uni8ue isolation le7el. Q2"*) What is an intent o3B? A,26) An intent lock is at the ta0le le7el for a se<mented ta0lespace or at the ta0lespace le7el for a nonse<mented ta0lespace. #hey indicate at the ta0le or ta0lespace le7el the kinds of locks at lower le7els. Q2"-) What is the differen3e !et5een stati3 and dynami3 )QL? A,29) (tatic (Q5 is hard-coded in a pro<ram when the pro<rammer knows the statements to 0e eDecuted. $or dynamic s8l the pro<ram must dynamically allocate memory to recei7e the 8uery results. Q2"/) What is 3,rsor sta!i ity? A,2:) %ursor sta0ility means that B, takes a lock on the pa<e the cursor is accessin< and releases the lock when the cursor mo7es to another pa<e. Q2"+) What is the signifi3an3e of the C02)O2 WI#4 4OL: 3 a,se in a 3,rsor de3 aration? A,2;) #he clause a7oids closin< the cursor and repositionin< it to the last row processed when the cursor is reopened. Q2".) What is the )QL Comm,ni3ations $rea and 5hat are some of its Bey fie ds?

A,2@)

It is a data structure that must 0e included in any host-lan<ua<e pro<ram usin< (Q5. It is used to pass feed0ack a0out the (Q5 operations to the pro<ram. $ields are return codes, error messa<es, handlin< codes and warnin<s.

Q2"7) What is the p,rpose of the W4&N&>&2 statement? A,21) #he C>!"!'!) statement is coded once in the host pro<ram to control pro<ram actions dependin< on the (Q5-%& ! returned 0y each s8l statement within the pro<ram. Q2*8) What is the ?2&& 3ommand? A,6=) #he $)!! command can 0e used to delete plans and/or packa<es no lon<er needed. Q2*1) :B2 3an imp ement a Foin in three 5ays ,sing a merge Foin; a nested Foin or a hy!rid Foin. &9p ain the differen3es? A,61) A mer<e Noin re8uires that the ta0les 0ein< Noined 0e in a se8uenceI the rows are retrie7ed with a hi<h cluster ratio indeD or are sorted 0y B,. A nested Noin does not re8uire a se8uence and works 0est on Noinin< a small num0er of rows. B, reads the outer ta0le 7alues and each time scans the inner ta0le for matches. #he hy0rid Noin is a nested Noin that re8uires the outer ta0le 0e in se8uence. Q2*2) Compare a s,!se e3t to a Foin? A,6,) Any su0select can 0e rewritten as a Noin, 0ut not 7ice 7ersa. Poins are usually more efficient as Noin rows can 0e returned immediately, su0selects re8uire a temporary work area for inner selects results while processin< the outer select. Q2*") What is the differen3e !et5een IN s,!se e3ts and &@I)#) s,!se e3t? A,62) If there is an indeD on the attri0utes tested an I" is more efficient since B, uses the indeD for the I". .I" for indeD is the mnemonic). Q2**) What is a Cartesian prod,3t? A,66) A %artesian product results from a faulty 8uery. It is a row in the results for e7ery com0ination in the Noin ta0les. Q2*-) :B2 What is the differen3e !et5een a pa3Bage and a p an? 4o5 does one !ind 2 versions of a CIC) transa3tion 5ith the same mod, e name in t5o different CIC) regions that share the same :B2 s,!system? A,69) Packa<e and plan are usually used synonymously, as in this site. Both contain optimiOed code for (Q5 statements - a packa<e for a sin<le pro<ram, module or su0routine contained in the data0ase re8uest module . B)*) li0rary. A plan may contain multiple packa<es and pointers to packa<es. #he one %I%( module would then eDist in a packa<e that could 0e referenced in two different plans. Q2*/) What is an asy3hrono,s 5rite? A,6:) It is a write to disk that may occur 0efore or lon< after a commit. #he write is controlled 0y the 0uffer mana<er. Q2*+) What is a o3B? A,6;) A lock is the mechanism that controls access to data pa<es and ta0lespaces. Q2*.) What is meant !y iso ation eve ? A,6@) #his is a key concept for any relational data0ase. Isolation le7el is the manner in which locks are applied and released durin< a transaction. $or BU a Grepeata0le readG holds all locks untile the transaction completes or a syncpoint is issued. $or transactions usin< Gcursor sta0ilityG the pa<e lock releases are issued as the cursor Gmo7esG, i.e. as the transaction releases addressa0ility to the records. Q2*7) What are eaf pages? A,61) #hey are the opposite of root pa<es. 5eaf pa<es are the lowest le7el indeD pa<es - the pa<es that contain indeD entries and information to the correspondin< ta0le rows.

Q2-8) What is a pre3ompi er? A,9=) It is a B, facility for static (Q5 statements - it replaces these statements with calls to the B, lan<ua<e interface module. Q2-1) What is a root page? A,91) #he opposite of a leaf pa<eI it is the hi<hest le7el indeD pa<e. An indeD can contain only the one root pa<eI all other indeD pa<es are associated to the root. Q2-2) What is a thread? A,9,) A thread is the connection 0etween B, and some other su0system, such as %I%( or I*(/ %. Q2-") Whi3h transa3tion ,se a 3ommand thread ? A,92) &nly the ("% transaction uses a command thread. Q2-*) What is the p,rpose of the :)NC transa3tion ? $2-*) #he ("% transaction is used for controllin< the %I%( %all Attach $acility.%A$) and for isplayin< %A$ statistics.

:B2 0ti ities


Q2--) What does the C4&CJ 0ti ity do ? A,99) #he %>!%E +tility checks the referential inte<rity of ta0le relations and checks the inte<rity of the indeDes 0y matchin< indeD column 7alues to ta0le column 7alues. Q2-/) 5hat types of 3opies 3an !e made 5ith the CO=C 0ti ity ? $2-/) #he copy +tility can make a full ima<e copy or an incremental ima<e copy . Q2-+) Why might f, image 3opies !e faster to imp ement than an in3rementa image 3opy? A,9;) Because an incremental ima<e copy has to search for chan<ed data and cannot make use of se8uential pre fetch. %on7ersely, a full ima<e copy has no checkin< to do as it takes ad7anta<e of se8uential pre fetch. Q2-.) 4o5 3o, d one 3om!ine a set of in3rementa image 3opies into a sing e 3opy? A,9@) By usin< the *!)G!%&PA +tility. Q2-7) What is the p,rpose of the Q0I&)& 0ti ity? A,91) #he Q+I!(! +tility pre7ents the start of any new ta0le space acti7ity while it <i7es acti7e threads a chance to finish their tasks. &nce all thread are inacti7e, it records information to esta0lish a point of consistency for future reco7ery. Q2/8) What does the 2&O2( 0ti ity do? A,:=) #he )!&)G +tility will sort the indeD space and ta0le space to conform with the primary indeD or clusterin< indeD specified in the 5. It will also reclaim the space from dropped simple ta0le spaces. Q2/1) What 3an the )&# option of the 2epair 0ti ity a33omp ish? A,:1) #he set option of the )epair utility can reset a copy pendin<, check pendin<, and reco7er pendin< fla<s. Q2/2) What 3an the Lo3ate option of the 2epair 0ti ity a33omp ish? A,:,) #he 5ocate option of the )epair +tility can delete a row from a ta0le space, repair 0roken ta0le space pa<es, and replace data as specific locations in a ta0le space or indeD. Q2/") What does the 20N)#$#) 0ti ity do? A,:2) #he )+"(#A#( +tility collects statistical information for B, ta0le spaces, partitions, indeDes, ta0les and columns and stores this data in the B, %atalo<.

Q2/*) Why ,se 20N)#$# 0ti ity? A,:6) Because the B, &ptimiOer need accurate data in order to formulate the most efficient access path <i7en the state of the en7ironment and 0ecause the information will help the BA to monitor the condition of the o0Nect in the B, su0system. Q2/-) What statisti3 5i te the :B$ ho5 m,st spa3e 3an !e re3 aimed from dropped ta! e spa3es on the ne9t reorg r,n? A,:9) #he BA can see this in the P!)% )&P column of the (A(IB*.(A(#AB5!PA)# catalo< ta0le. Q2//) What :B2 Cata og 3o ,mn te yo, 5hen an inde9 needs ta! e reorganiDed ? A,::) #he $A)&$$P&( column of the (A(IB*.(A(I" !/PA)# ta0le. Q2/+) What is the )#O)=$C& 0ti ity ,sed for? A,:;) #he (#&(PA%! +tility updates the B, catalo< with the A( utiliOation of the ta0le space and indeD space data sets. Q2/.) What is a )&L&C# statement? A,:@) A select statement is an (Q5 statement that retrie7es data from a ta0le or 7iew. Q2/7) What is the synta9 of )&L&C# statement 5hen em!edded in a COBOL program? A,:1) !Dec (Q5 (!5!%# colSname1,colSname,,colSname2 I"#& hosFS7ar1,hosS7ar,,hosS7ar2 $)&* owner.ta0lename C>!)! condition !" S!/!%. Q2+8) What are 3o ,mn'name I,a ifiers ,sed? A,;=) %olumn-name 8ualifier are used as ta0le desi<nator to a7oid am0i<uity when the column names referenced eDist in more than one ta0le used in the (Q5 statement. %olumn-name 8ualifiers are used in correlated references. Q2+1) What is 3orre ation names? A,;1) I# is a special type of column desi<nator that connects specific column in the 7arious le7els of a multile7el (Q5 8uery. Q2+2) 4o5 do yo, define a 3orre ated name? A,;,) A correlated name can 0e defined in the $)&* clause of a 8uery and in the first clause of an +P A#! or !5!#! statement. Q2+") What is s,!I,ery ? A,;2) A su08uery is a 8uery that is written as part of another 8uerys C>!)! clause. $or eDample F (!5!%# colSname1,colSname, $)&* ta0leSA C>!)! colSname2 J . (!5!%# A7<.colSname) $)&* ta0leSA C>!)! colSname6 H Rconstant ) Q2+*) What is 3orre ated s,!I,ery? A,;6) A correlated su08uery is one that has a correlation name as a ta0le or 7iew desi<nator in the $)&* clause of the outer 8uery and the same correlation name as a 8ualifier of a search condition in the C>!)! clause of the su08uery. $or eDampleF (!5!%# colSname1,colSname, $)&* ta0leSA D1 C>!)! colSname2 J

. (!5!%# A7<.columnSname2 $)&* ta0leSA C>!)! colSname6 H D1.colSname6 ) Q2+-) 4o5 does the pro3essing of a 3orre ated s,!I,ery differ from a non 3orre ated s,!I,ery? A,;9) #he su08uery in a correlated su08uery is ree7aluated for e7ery row of the ta0le or 7iew named in the outer 8uery, while the su08uery of a non correlated su08uery is e7aluated only once. Q2+/) What is a res, t ta! e? A,;:) A result ta0le is the product of a 8uery a<ainst one or more ta0les or 7iews . i.e. it is the place that holds the results of a 8uery). Q2++) What is a 3,rsor? A,;;) A cursor is a named control structure used to make a set of rows a7aila0le to a pro<ram. Q2+.) What is the synta9 reI,ired for the 3reation of a 3,rsor? A,;@) !/!% (Q5 !%5A)! curSname %+)(&) for (!5!%# col1,col, $)&* ta0le1 C>!)! col1 H searchScondition !" -!/!%. Q2+7) When is the res, ts ta! e for the I,ery in a :&CL$2& C02)O2 statement 3reated? A,;1) #he results ta0le for a 8uery specified in a !%5A)! %+)(&) statement of a cursor is created durin< the eDecution of the &P!" %+)(&) statement. Q2.8) What is read'on y 3,rsor? A,@=) A read-only cursor is one in which the result ta0le was created 0y a 8uery containin< one of the followin< F a I(#I"%# keyword a +"I&" operator a column or scalar function a G)&+P BA clause a &) !) BA clause a >A'I"G clause a read-only 7iew in the $)&* clause a $)&* clause identifyin< more than one ta0le or 7iew

:B2 Cata og
Q2.1) Whi3h :B2 3ata og ta! es are ,sed to prod,3e a ist of ta! e 3o ,mn !y ta! e for a ta! es in a data!ase? A,@1) #he catalo< ta0les to use are the (A(IB*.(A(#AB5!( and the (A(IB*.(A(%&5+*"(. Q2.2) Whi3h 3ata og ta! es 3ontain a,thoriDation information? A,@,) #he (A(IB* ta0le that contain authoriOation information are (A(%&5A+#>, (A( BA+#>, (A(P5A"A+#>, (A(#ABA+#> and (A(+(!)A+#>. Q2.") Whi3h 3ata og ta! e stores referentia 3onstraints? A,@2) #he (A(IB*.(A()!5( ta0le.

:B2 :ire3tory
Q2.*) What 0ti ity is ,sed to migrate :B2 from one re ease to the ne9t? A,@6) #he +*P%A# +tility.

Q2.-) 4o5 5o, d one remove o d reorg information from the :B2 3ata og? A,@9) )un the *& I$A )!%&'!)A +tility. Q2./) What happens to a ta! espa3e 5hen its re3overy infromation has !een removed and a f, re3overy is no onger possi! e? A,@:) #he ta0lespace is put into copy pendin< status. Q2.+) Where is the a33ess path ogi3 3reated !y the :B2 OptimiDer stored? A,@;) #he access path lo<ic is stored as skeleton cursor ta0les in the (%#=, irectory ta0le. Q2..) When is the sBe eton 3,rsor ta! e 3reated? A,@@) urin< the eDecution of the BI" P5A" command. Q2.7) 4o5 does one remove entries from the )C#82 ta! e? A,@1) )un the $)!! P5A" command. Q278) When one !inds a =$CJ$(& A of a p an ) 5hat pa3Bage information is stored and 5here it is stored? A,1=) #he access path information for the PA%EAG! is stored as skeleton packa<e ta0les in the (P#=1 ta0le. Q271) Where !esides the :B2 3ata og is data!ase o!Fe3t information stored !y :B2? A,11) B, also stores information a0out B, o0Nects as data0ase descriptors . B s) in the B irectory ta0le. Q272) Can yo, a33ess the :B2 :ire3tory ta! e ,sing )QL? A,1,) "o. #hese ta0les are eDclusi7ely accessed 0y internal B, processes.

:B2 Commands
Q27") Whi3h :B2 3ommand is ,sed to retrieve environmenta information? A,12) #he I(P5AA command can return the followin< en7ironmental dataF A#ABA(! info, )5I*I# info, #>)!A info, #)A%! info, and +#I5I#A info. Q27*) Whi3h 3ommand is iss,ed to esta! ish the Boot )trap :ata )et after an I6O fai ,re? A,16) #he BA would issue a )!%&'!) B( ( command. Q27-) 4o5 is the stat,s of a ,ti ity reset after it has !een stopped !y :B2 ? A,19) By issuin< the (#A)# )5I*I# command. Q27/) 4o5 3an one determine the stat,s of a ta! espa3e? A,1:) By usin< the I(P5AA A#ABA(! command.

#he fo o5ing is the 3he3B ist to 3omp ete a :B2 !at3h or on' ine program.... Batch DB2 COBOL program....
1. If the pro<ram is main pro<ram it should ha7e 0oth BB and PE components.

,. If the pro<ram is linked .called) pro<ram it should ha7e only PE component. But the packa<e <enerated should 0e 0inded in %allin< pro<ram BB component. $or eDample the :BB component looks like ....

BIND PLAN(????????) PKLIST(SEALAND.????????, SEALAND.????????, SEALAND.????????) QUALIFIER(TEST) OWNER(????) ACTION(REPLACE) RETAIN VALIDATE(BIND) ISOLATION(CS) FLA (I) ACQUIRE(USE) RELEASE(COMMIT) E!PLAIN(YES)

**********>>> **********>>> **********>>> **********>>> **********>>> **********>>>

ENTER PLAN NAME ENTER MEMBER NAME (MULTIPLE MEMBERS FOR EACH PLAN) MUST ALWAYS BE TEST ENTER YOUR TSO ID

********************************************************************* * THIS IS A SAMPLE DBB CARD FOR DB" PACKA IN * * * * IF MULTIPLE MEMBERS ARE ENTERED IN PKLIST, * * THERE MUST BE A DPK CARD FOR EACH ONE. * *********************************************************************

#he followin< is the format of the :=J card....


BIND PACKA E(SEALAND) MEMBER(????????) VALIDATE(BIND) OWNER(????) E!PLAIN(NO) QUALIFIER(TEST) ***********>>> ***********>>> ***********>>> ENTER MEMBER NAME ENTER YOUR TSO ID MUST ALWAYS BE TEST

*********************************************************************** * * * THIS IS A SAMPLE DPK CARD FOR DB" PACKA IN * * * * * *********************************************************************** 2. As we are all aware that )%# is a concept of %I%(. (o 0atch B, pro<ram will not ha7e any )%# entry. 6. #o run this B, pro<ram the followin< the is the model P%5... //TESTXXX JOB (AAAA),'ACCOUNTS PAYABLE',CLASS=A, // USER=XXXX,MSGCLASS=H,REGION=4096K / JOBPARM SYSA!!=B"#$ //JOBLIB %% %SN=TEST&JOBLIB,%ISP=SHR / //STEP0"0 EXEC PGM=IKJE!T0",%YNAMNBR='0 //STEPLIB %% %SN=%B'T&%SNEXIT,%ISP=SHR // %% %SN=%B'T&%SNLOA%,%ISP=SHR // %% %SN=TEST&JOBLIB,%ISP=SHR //INPUT" %% %SN=XY(&ABC&%B!,%ISP=SHR //OUTPUT" %% %SN=XY(&BC%&LEY, // %ISP=(NE),CATLG,%ELETE), // %CB=(REC!M=!B,LRECL="'',BLKSI(E='440),UNIT=SYS%A, // SPACE=(CYL,("0,'),RLSE) //SYSPRINT %% SYSOUT=

//SYSTSPRT %% SYSOUT= //SYSOUT %% SYSOUT= //SYSERR %% SYSOUT= //SYS%UMP %% SYSOUT= //TEST%UMP %% SYSOUT= //SYSMSG %% SYSOUT= //SYSTSIN %% %SN SYSTEM(%B'T) RUN PROG(TESTPROG) PLAN(TESTPLAN) EN% // As shown in a0o7e P%5 pro<ram IEP!$#=1 is used to run B, pro<ram .#!(#P)&G in our eDample). In the a0o7e P%5 pro<ram name and plan names are specified in (A(#(I" dataset as in-stream data.

#he fo o5ing is the 3he3B ist to 3omp ete CIC)Aon' ine) :B2 program...
1. If the program is main program it should have both DBB and DPK components. 2. If the program is LINKed, !"Led program it should have onl# DPK component. But the pac$age generated should be binded in !alling program DBB component. %. &!" entr# has to be created if the program is main program'(hich consists of "&)N*ID+. If the program is LINKed or !"Led it need not have a &!" entr#. &!" entr# basicall# used to attach !I!* s#stem to DB2 s#stem. ,. No -!L business here because it is on.line. /."he DBB and DPK s sho(n for batch program are also applicable to this. 1. 2. %. ,. 0hat 0hat 0hat 0hat does *1L!2D3 4155 means does the *1L!2D3 4616 means are the pars of a *3L3!" statement is DB2 etc....,

Information 1anagement )ystemAI1))


Q1) A1) Q2) A,) Q") A2) Q*) A6) Q-) A9) Q/) A:) Q+) A;) Q.) A@) Q7) A1) What is the physi3a nat,re of a data!ase 3a ed? B Is it ne3essary that a the segments in a : 6i data!ase have Bey fie ds ? It is not necessary that all the se<ments in the data0ase should ha7e key field, eDpect for the data0ase. 4o5 man Bey fie ds and sear3h fie ds 3an a segment have? &ne key field and as many search fields in the se<ment can 0e declared. Is it ne3essary that the Bey fie d in a : 6I data!ase !e ,niI,e? "o, it is no necessary. What is a Bey fie d in an I1) data!ase? A $ield that 5/I uses to maintain the se<ments in the ascendin< order is called the key field What is a data!ase re3ord? A sin<le occurrence of the root alon< with all its dependents is called the data0ase record. What is a 4ierar3hy path? A line that starts at the root and passes thru the inter mediate le7els in the hierarchy and ends at the a se<ment at the 0ottom of the hierarchy is called the >ierarchy path. What is a 2oot? #he se<ment at the top of the >ierarchy, which is not a child to a se<ment is called the )oot. What are #5ins? &ccurrences of all the se<ment types under a sin<le parent se<ment occurrence is called a #win.

Q18) :efine the terms =arent & Chi d. A1=) Parent-Any se<ment that has one or more se<ments directly 0elow it is a Parent. %hild-Any se<ment that has se<ment directly a0o7e it is called the %hild. Q11) What is the imitation on the no. of eve s in a :L6I data!ase? A11) Aou can ha7e 19 le7els in a 5/I data0ase Q12) 4o5 many sgment types 3an , have in a :L6I data!ase? A1,) A l/I data0ase can ha7e ,99 se<ment types Q1") What is a )egment type? A12) 5oosely speakin< a se<ment type is a se<ment in a l/I hierarchy chart. Q1*) What is a segment? A16) A se<ment is the smallest unit of information that data0ase l/I uses when workin< with information in the

Q1-) What is 4ierar3hy Chart? A19) A >ierarchy chart is a pictorial representation of the total of a 5/I data0ase startin< from the root, <i7in< all the parent child relationships that eDist within the data0ase Q1/) 5hat are the 3ontro ! o3Bs in I1) ? A1:) #here are two control 0lock.1.d0d.data0ase descriptor),.ps0 .pro<ram specification 0lock)

Q1+) 5hi3h is the first statement in COBOL'I1) programs? A1;) !ntry statement is the first statement after procedure di7ision i.e. !"#)A G 5I%B5G +(I"G ..... Q1.) What is the ret,rn 3ode yo, get after a s,33essf, I1) 3a ?

A1@) (paces. Q17) :efine :B:? A11) B F ata0ase escriptor. I*( %ontrols the (tructure of B and access to the B 7ia B . #he B contains information like, (e<ment types, their location in hierarchy and (e8uence keys. Q28) 4o5 3an 5e disting,ish !et5een an on ine and !at3h program in I1) environment? A,=) By seein< the I&-P%B in the application pro<ram. Q21) Whi3h is the :L6I f,n3tion ,sed in CIC)'I1) program? A,1) P%B.P)&G)A* %&**+"I%A#I&" B5&%E) Q22) What is I1)? A,,) I"$&)*A#I&" *A"AG!*!"# (A(#!* Q2") 4o5 does one reorg an 4:$1 I1) data!ase 5hen 3hanging 2$=) A2oot $n3hor =oints)? A,2) +nload data usin< current B . ,. elete/define the underlyin< '(A* dataset.s). 2. )e-load data usin< newly-defined B with new )APs. 6. )e-0uild any secondary indeDes. Q2*) What do yo, Bno5 a!o,t :B: gen? A,6) used to <enerate B s. #he statements in B G!" process are P)I"# "&G!", B , A#A(!#, (!G*, $I!5 , B G!", $I"I(>, !" Q2-) What are 3ommon :LI f,n3tions? A,9) G+,G",G"P,G>+,G>",)!P5,I()#, 5!#... Q2/) What are 3ommon stat,s 3odes that yo, 3ome a3ross? A,:) G!,GB,G ,GE,GP,AI,AB,A%,AE,AP,A*,A+, P,II,I/,Q%,Q ,>... G! - se<ment not found GB - end of data0ase Q2+) What are the 3ommand 3odes and their p,rposes? A,;) %ommand codes eDtends the function of a ((A call. It simplifies pro<rammin< and it impro7es performance. L% - %oncatenated key, -path call, $- first occurrence, 5- last occurrence, "- path call i<nore , P-set parenta<e. Q2.) What are the parameters ,sed in CBL#:LI 3a ? A,@) $unction code, P%B mask, (e<ment I/& Area 3 ((A.s). Q27) What are I,a ified and ,nI,a ified ))$Gs. A,1) A Qualified ((A contains Eey field as well as search field and parenthesis An un8ualified ((A does not contain key field and parenthesis Q"8) What do yo, Bno5 a!o,t 1?)? A2=) *essa<e $ormat ser7ice , +sed to format messa<es that will 0e transmitted to and from display screens. Q"1) What for pro3opt is ,sed? List some of them? A21) Procopt parameter specifies P)&%!((I"G &P#I&"( that define the type of processin< that can 0e performed on a se<ment. eDF E, G, 5, 5(, A ,A(, I, I(. procoptHk---means , the se<ment is key sensiti7e procoptH<the se<ment is data sensiti7e .like read only) 5- 5oad mode , means we can load data 0ase from scratch A- Get, Insert, elete, )eplace- means it allows the pro<ram to issue all those calls I-insert mode. #hat means only insert calls with insert mode can 0e issued Q"2) What is m, ti positioning ?

A2,) *ulti positionin< is an option where 0y I*( maintains a separate position on each hierarchical path. when more than one P%Bs refer to the same B , it is called *ulti positionin<. Q"") What is se3ondary inde9ing? A22) (econdary indeDin< is a feature which allows the pro<ram to se8uentially retrie7e se<ments or search for se<ments in a se8uence other than key se8uence. Q"*) 4o5 many =CBHs 3an !e 3oded 5ithin a =)B? A26) As many.more than one) Q"-) What is =)B;=CB & $CB? A29) P(B.Pro<ram specification 0lock)F Informs a0out how a specific pro<ram is to 0e access one or more I*( B. It consists of P%B. P%B .Pr< %ommunication Block)F Information to which se<ment in B can 0e accessed, what the pro<ram is allowed to do with those se<ment and how the B is to 0e accessed. A%B.Access %ontrol Block)F are <enerated 0y I*( as an eDpansion of information contained in the P(B in order to speed up the access to the applica0le B Gs. Chat is check pointin<, sync pointQ >ow do you write a P(B code Q

<OB CON#2OL L$N(0$(&A<CL)


Th e foll o w i n g ar e th e m o s t Fre u e n t l ! As" e d #u e s t i o n s $FA#% & ' Q1) What is a (eneration :ata (ro,p A(:()? A1) Generation ata Group is a <roup of chronolo<ically or functionally related datasets. G Gs are processed periodically, often 0y addin< a new <eneration, retainin< pre7ious <enerations, and sometimes discardin< the oldest <eneration. Q2) A,) Q") A2) 4o5 is a (:( !ase 3reated? A G G 0ase is created in the system catalo< and keeps track of the <eneration num0ers used for datasets in the <roup. I %A*( utility is used to define the G G 0ase. What is mode dataset a!e A1ode :)CB)? A model dataset la0el is a pattern for the dataset la0el created for any dataset named as a part of the G G <roup. #he system needs an eDistin< dataset to ser7e as a model to supply the %B parameters for the <eneration data <roup one wishes to create. #he model dataset la0el must 0e catalo<ed. #he model (%B name is placed on the %B parameter on the statement that creates the <eneration data <roup. 4o5 are (:(s 3on3atenated? Generation ata Groups are concatenated 0y specifyin< each dataset name and the <eneration num0er for all <enerations of the <eneration data <roup. &therwise to ha7e all <enerations of a <eneration data <roup, omit the <eneration num0er. #he statement will refer to all <enerations. #he result is the same as if all indi7idual datasets were concatenated. If <enerations are not on the same 7olume, this will not work. 4o5 is a ne5 (:( 3oded? A new G G is coded as .?1) after the dataset name as followsF ("HPA". A#A.?1). #his will cause all <enerations to 0e pushed down one le7el at the end of the No0. When sho, d :I)=O1O: is ,sed? I(PH*& is used to either eDtend an eDistin< se8uential dataset or to create a dataset if it does not eDist. If the dataset eDists, then records are appended to the dataset at the end of the eDistin< dataset. If the dataset does not eDist, the system treats *& as if it were "!C, pro7ided that the 7olume parameter has not 0een used. If the 7olume parameter is used, the system terminates the No0 and does not create the new dataset. *& can 0e used to add to a dataset that eDtends onto se7eral 7olumes. Always specify a disposition of %A#5G with *& for catalo<ed datasets, e7en if they are already catalo<ed, so that any additional 7olume serial num0ers will 0e recorded in the catalo<. 4o5 is a dataset passed from one step to another? A dataset is passed from one step to another 0ased on what is coded on the I(P parameter. #he dataset can only 0e passed to su0se8uent steps if PA(( was used on the disposition parameter. 4o5 are datasets 3on3atenated? atasets are concatenated 0y writin< a normal statement for the first dataset and then addin< a statement without a "A*! for each dataset to 0e concatenated in the order they are to 0e read. #he followin< is an eDample of three datasets concatenatedF //A!A) A# ("HPA". A#A, I(PH(>) // ("H$!B. A#A, I(PH(>) // ("H*A). A#A, I(PH(>)

Q*) A6)

Q-) A9) Q/) A:)

Q+) A;) Q.) A@)

Q7) What is the differen3e !et5een the <OBLIB and the )#&=LIB statements? A1) #he P&B5IB statement is placed after the P&B statement and is effecti7e for all No0 steps. It cannot 0e placed in a

catalo<ed procedure. #he (#!P5IB statement is placed after the !/!% statement and is effecti7e for that No0 step only. +nlike the P&B5IB statement, the (#!P5IB can 0e placed in a catalo<ed procedure. Q18) Name some of the <CL statements that are not a o5ed in pro3s.? A1=) (ome of the P%5 statements which are not allowed in procedures areF 1. P&B, elimiter./L), or "ull statements ,. P&B5IB or P&B%A# statements 2. L or A#A statements 6. Any P!(, or P!(2 control statements Q11) What is primary a o3ation for a dataset? A11) #he space allocated when the dataset is first created. Q12) What is the differen3e !et5een primary and se3ondary a o3ations for a dataset? A1,) (econdary allocation is done when more space is re8uired than what has already 0een allocated. Q1") 4o5 many e9tents are possi! e for a seI,entia fi e ? ?or a >)$1 fi e ? A12) 1: eDtents on a 7olume for a se8uential file and 1,2 for a '(A* file. Q1*) What does a disposition of AN&W;C$#L(;:&L&#&) mean? ' () A16) #hat this is a new dataset and needs to 0e allocated, to %A#5G the dataset if the step is successful and to delete the dataset if the step a0ends. Q1-) What does a disposition of AN&W;C$#L(;J&&=) mean? ' () A19) #hat this is a new dataset and needs to 0e allocated, to %A#5G the dataset if the step is successful and to E!!P 0ut not %A#5G the dataset if the step a0ends. #hus if the step a0ends, the dataset would not 0e catalo<ued and we would need to supply the 7ol. ser the neDt time we refer to it. Q1/) 4o5 do yo, a33ess a fi e that had a disposition of J&&=? ' () A1:) "eed to supply 'olume (erial "um0er '&5H(!)HDDDD. Q1+) 1O:; :&L&#&T What does a disposition of A;:&L&#&) mean ? A1;) #he *& will cause the dataset to 0e created .if it does not eDist), and then the two !5!#!s will cause the dataset to 0e deleted whether the step a0ends or not. #his disposition is used to clear out a dataset at the 0e<innin< of a No0. Q1.) What is the :: statement for a o,tp,t fi e? A1@) +nless allocated earlier, will ha7e the followin< parametersF +"I# , (PA%! 3 %B I(PH."!C,%A#5G, !5!#!),

Q17) What do yo, do if yo, do not 5ant to Beep a the spa3e a o3ated to a dataset? ' () A11) (pecify the parameter )5(! . release ) in the (PA%! e.<. (PA%!H.%A5,.9=,9=),)5(!) Q28) What is :I)=O AN&W;=$));:&L&#&)? A,=) #his is a new file and create it, if the step terminates normally, pass it to the su0se8uent steps and if step a0ends, delete it. #his dataset will not eDist 0eyond the P%5. Q21) 4o5 do yo, 3reate a temporary dataset? Where 5i yo, ,se them? A,1) #emporary datasets can 0e created either 0y not specifyin< any ("A*! or 0y specifyin< the temporary file indicator as in ("H33#!*P. Ce use them to carry the output of one step to another step in the same No0. #he dataset will not 0e retained once the No0 completes. Q22) 4o5 do yo, restart a =2OC from a parti3, ar step? ' () A,,) In No0 card, specify )!(#A)#HP)&%(#!P.(#!P"A*! where P)&%(#!P H name of the P%5 step that in7oked the P)&% and (#!P"A*! H name of the P)&% step where you want eDecution to start

Q2") 4o5 do yo, sBip a parti3, ar step in a pro36<OB? ' () A,2) %an use either condition codes or use the Ncl control statement I$ .only in !(A P%5)] Q2*) $ =2OC has five steps. )tep " has a 3ondition 3ode. 4o5 3an yo, override6n, ify this 3ondition 3ode? ' () A,6) Pro7ide the o7erride on the !/!% stmt in the P%5 as followsF //(#!P==1 !/!% procname, %&" .stepnameH7alue All parameters on an !/!% stmt in the proc such as %&" , PA)* ha7e to 0e o7erridden like this. Q2-) 4o5 do yo, override a spe3ifi3 ::N$1&6)C)IN in =2OC from a <CL? A,9) //J(#!P"A*!. K ("H... Q2/) What is NO#C$# 2 ' () A,:) #his is an *'( messa<e indicatin< that a duplicate catalo< entry eDists. !.<., if you already ha7e a dataset with dsn H GDDDD.yyyyG and u try to create one with disp new, catl<, you would <et this error. the pro<ram open and write would <o throu<h and at the end of the step the system would try to put it in the system catalo<. at this point since an entry already eDists the catl< would fail and <i7e this messa<e. you can fiD the pro0lem 0y deletin</uncatalo<in< the first data set and <oin< to the 7olume where the new dataset eDists.this info is in the ms<lo< of the No0) and catalo<in< it. Q2+) What is G)8C+G a!end? ' () A,;) %aused 0y in7alid data in a numeric field. Q2.) What is a )8C* error ? ' () A,@) (tora<e 7iolation error - can 0e due to 7arious reasons. e.<.F )!A I"G a file that is not open, in7alid address referenced due to su0script error. Q27) What are ):"+; )B"+; )&"+ a!ends? A,1) All indicate dataset out of space. ( 2; - no secondary allocation was specified. (B2; - end of 7ol. and no further 7olumes specified. (!2; - *aD. of 1: eDtents already allocated. Q"8) What is )"22 a!end ? A2=) Indicates a time out a0end. Aour pro<ram has taken more %P+ time than the default limit for the No0 class. %ould indicate an infinite loop. Q"1) Why do yo, 5ant to spe3ify the 2&(ION parameter in a <CL step? ' () A21) #o o7erride the )!GI&" defined at the P&B card le7el. )!GI&" specifies the maD re<ion siOe. )!GI&"H=E or =* or omittin< )!GI&" means no limit will 0e applied. Q"2) What does the #I1& parameter signify ? What does #I1&O1**8 mean ? A2,) #I*! parameter can 0e used to o7ercome (2,, a0ends for pro<rams that <enuinely need more %P+ time. #I*!H166= means no %P+ time limit is to 0e applied to this step. Q"") What is CON:O&>&N ? A22) *eans eDecute this step e7en if any of the pre7ious steps, terminated a0normally. Q"*) What is CON:OONLC ? A26) *eans eDecute this step only if any of the pre7ious steps, terminated a0normally. Q"-) 4o5 do yo, 3he3B the synta9 of a <CL 5itho,t r,nning it? A29) #AP!)+"H(%A" on the P&B card or use P(%A". Q"/) What does I&B(&N&2 do?

A2:)

+sed to copy one Q(A* file to another. (ource dataset should 0e descri0ed usin< (A(+#1 ddname. estination dataset should 0e descri0ed usin< (A(+#,. I!BG!") can also do some reformattin< of data 0y supplyin< control cards 7ia (A(I".

Q"+) 4o5 do yo, send the o,tp,t of a COBOL program to a mem!er of a =:)? A2;) %ode the (" as P ( .mem0er) with a I(P H (>). #he I(P applies to the P ( and not to a specific mem0er. Q".) I have m, tip e Fo!s A <CLs 5ith severa <OB 3ards ) in a mem!er. What happens if I s,!mit it? A2@) *ultiple No0s are su0mitted .as many No0s as the num0er of P&B cards). Q"7) I have a COBOL program that $33epts some inp,t data. 4o5 do yo, 3ode the <CL statement for this? A 4o5 do yo, 3ode instream data in a <CL? ) A21) //(A(I" L input data input data /L Q*8) Can yo, 3ode instream data in a =2OC ? A6=) "o. Q*1) 4o5 do yo, over3ome this imitation ? A61) &ne way is to code (A(I" +**A in the P)&%, and then o7erride this from the P%5 with instream data. Q*2) 4o5 do yo, r,n a COBOL !at3h program from a <CL? 4o5 do yo, r,n a COBOL6:B2 program? A6,) #o run a non B, pro<ram, //(#!P==1 !/!% PG*H*AP)&G #o run a B, pro<ram, //(#!P==1 !/!% PG*HIEP!$#=1 //(A(#(I" L (" (A(#!*.....) )+" P)&G)A*.*AP)&G) P5A"......) 5IB.....) PA)*(....) /L Q*") What is )#&=LIB; <OBLIB? What is it ,sed for? ' () A62) (pecifies that the pri7ate li0rary .or li0raries) specified should 0e searched 0efore the default system li0raries in order to locate a pro<ram to 0e eDecuted. (#!P5IB applies only to the particular step, P&B5IB to all steps in the No0. Q**) What is order of sear3hing of the i!raries in a <CL? ' () A66) $irst any pri7ate li0raries as specified in the (#!P5IB or P&B5IB, then the system li0raries such as (A(1.5I"E5IB. #he system li0raries are specified in the link list. Q*-) What happens if !oth <OBLIB and )#&=LIB is spe3ified ? A69) P&B5IB is i<nored. Q*/) When yo, spe3ify m,tip e datasets in a <OBLIB or )#&=LIB; 5hat fa3tor determines the order? ' () A6:) #he li0rary with the lar<est 0lock siOe should 0e the first one. Q*+) 4o5 to 3hange defa, t =2OCLIB? A6;) //AB% P%55IB &) !)H.*!.*AP)&%5IB,(A(1.P)&%5IB)

Q*.) #he disp in the <CL is 1O: and the program opens the fi e in O0#=0# mode. What happens ? #he :I)= in the <CL is )42 and the program opens the fi e in &@#&N: mode. What happens ? A6@) )ecords will 0e written to end of file .append) when a C)I#! is done in 0oth cases. Q*7) What are the va id :)O2( va ,es ? A61) P( - Q(A*, P& - Partitioned, I( - I(A* Q-8) What are the differen3es !et5een <&)2 & <&)" ? A9=) P!(2 allocates datasets for all the steps 0efore the No0 is scheduled. In P!(,, allocation of datasets re8uired 0y a step are done only Nust 0efore the step eDecutes. Q-1) What are the 3a,ses for )8C1; )8C*; )8C-; )8C+; )8CB a!ends ? A91) (=%1-*ay 0e due to 1.*issin< or misspelled name ,.)ead/Crite to unopened dataset 2.)ead to dataset opened output 6.Crite to dataset opened input 9.%alled su0pro<ram not found (=%6-may 0e due to 1.*issin< (elect statement.durin< compile) ,.Bad (u0script/indeD 2.Protection !Dception 6.*issin< parameters on called su0pro<ram 9.)ead/Crite to unopened file :.*o7e data from/to unopened file (=%9-*ay 0e due to 1.Bad (u0script/indeD ,.%losin< an unopened dataset 2.Bad eDit from a perform 6.Access to I/& area.$ ) 0efore read (=%;-may 0e due to 1."umeric operation on non-numeric data ,.+n-initialiOe workin<-stora<e 2.%odin< past the maDimum allowed su0 script (=%B-may 0e due to 1. i7ision 0y 4ero Q-2) What are the Binds of Fo! 3ontro statements? A9,) #he P&B, !/!% and statement. Q-") What is the meaning of Bey5ord in <CL? What is its opposite? A92) A keyword in a P%5 statement may appear in different places and is reco<niOed 0y its name, e<. *(G%5A(( in the P&B statement. #he opposite is positional words, where their meanin< is 0ased on their position in the statement, e<. in the I(P keyword the H."!C,%A#5G, !5!#!) meanin<s are 0ased on first, second and third position. Q-*) :es3ri!e the <OB statement; its meaning; synta9 and signifi3ant Bey5ords? A96) #he P&B statement is the first in a P%5 stream. Its format is // No0name, keyword P&B, accountin< information in 0rackets and keywords, *(G%5A((, *(G5!'!5, "&#I$IA, %5A((, etc. Q--) :es3ri!e the &@&C statement; its meaning; synta9 and Bey5ords? A99) #he !/!% statement identifies the pro<ram to 0e eDecuted 7ia a PG*H pro<ram name keyword. Its format is //No0name !/!% PG*H pro<ram name. #he PA)*H keyword can 0e used to pass eDternal 7alues to the eDecutin< pro<ram. Q-/) :es3ri!e the :: statement; its meaning; synta9 and Bey5ords? A9:) #he statement links the eDternal dataset name . (") to the "A*! coded within the eDecutin< pro<ram. It links the file names within the pro<ram code to the file names know to the *'( operatin< system. #he syntaD is // ddname ("Hdataset name. &ther keywords after (" are I(P, %B, (PA%!, etc. Q-+) What is a =2OC? What is the differen3e !et5een an instream and a 3ata og,ed =2OC? A9;) P)&% stands for procedure. It is GcannedG P%5 in7oked 0y a P)&% statement. An instream P)&% is presented within the P%5I a catalo<ued P)&% is referenced from a procli0 partitioned dataset.

Q-.) What is the differen3e !et5een a sym!o i3 and an override in e9e3,ting a =2OC? A9@) A sym0olic is a P)&% placeholderI the 7alue for the sym0olic is supplied when the P)&% is in7oked, e<. 3sym0olH7alue. An o7erride replaces the P)&%Gs statement with another oneI it su0stitutes for the entire statement. Q-7) What is 2&)#$2#? 4o5 is it invoBed? A91) )!(#A)# is a P&B statement keyword. It is used to restart the No0 at a specified step rather than at the 0e<innin<. Q/8) What is a (:(? 4o5 is it referen3ed? 4o5 is it defined? What is a 1O:&L:)CB? A:=) G G stands for <eneration data <roup. It is a dataset with 7ersions that can 0e referenced a0solutely or relati7ely. It is defined 0y an I %A*( define <eneration data<roup eDecution. Q/1) &9p ain 3on3atenating datasets? A:1) atasets can 0e <rouped in a statement one after another, e<. in a P&B5IB statement where the load module can eDist in one of many datasets. Q/2) What is the differen3e !et5een spe3ifying :I)=OOL: and :I)=O)42 for a dataset? A:,) I(PH&5 denotes eDclusi7e control of the datasetI I(PH(>) means there is no eDclusi7ity. Q/") What is 1O: and 5hen 5o, d yo, ,se it? A:2) I(PH*& is used when the dataset can 0e eDtended, ie, you can add records at the end of an eDistin< dataset. Q/*) What are the Bey5ords asso3iated 5ith :CB? 4o5 3an yo, spe3ify :CB information? What is the O) pre3eden3e for o!taining that :CB information; ie. 5here does the system ooB for it first? A:6) #he keywords associated with the %B parameter are 5)!%5, )!%$*, B5E(I4! and (&)G. #he %B information can 0e supplied in the statement. #he system looks for %B information in the pro<ram code first. Q/-) 4o5 do yo, designate a 3omment in <CL? A:9) #he comment statement is //L followed 0y the comments. Q//) What is the meaning of the &@&C statement Bey5ord; CON:? What is its synta9? A::) %&" specifies the conditions for eDecutin< the su0se8uent No0 step. #he 7alue after the %&" H is compared to the return codes of the precedin< steps and if the comparison is true, the step is 0ypassed. .If this answer confuses you, welcome to the clu0 - memoriOe it and donGt ask 8uestionsM) Q/+) What is the improvement to CON:O in the atest version of 1>)? A:;) *'( now allows for an I$ 0racketed 0y an !" I$ around any No0 step to replace the %&" H syntaD. A<ain, if the I$ statement is true, the step is 0ypassed. Q/.) What is the p,rpose of the =$21 Bey5ord in the &@&C statement? A:@) #he 7alue after the PA)*H specifies control information to 0e passed to the eDecutin< pro<ram of the No0 step. Q/7) What is the p,rpose and meaning of the 2&(ION Bey5ord and 5hat <CL statement is it asso3iated 5ith? A:1) )!GI&" specifies the maDimum %P+ memory allocated for a particular No0 or No0 step. If )!GI&" is in the P&B card, it relates to the entire No0I if in the !/!% statement, it relates to the No0 step. Q+8) What is the p,rpose and meaning of the #I1& Bey5ord and 5hat <CL statement is it asso3iated 5ith?

A;=)

#I*! specifies the maDimum %P+ time allocated for a particular No0 or No0 step. If #I*! is in the P&B card, it relates to the entire No0I if in the !/!% statement, it relates to the No0 step.

Q+1) What is the meaning of data definition name Addname) and dataset name Adsname) in the :: statement? A;1) ata definition name is the ei<ht character desi<nation after the // of the statement. It matches the internal name specified in the steps eDecutin< pro<ram. In %&B&5 thatGs the name specified after the A((IG" in the (!5!%# A((IG" statement. ataset name is the operatin< system .*'() name for the file. Q+2) 4o5 is the Bey5ord :011C ,sed in <CL? A;,) $or an output file +**A specifies that the output is to 0e discarded. $or input it specifies that the file is empty. Q+") What does the Bey5ord :CB mean and 5hat are some of the Bey5ords asso3iated 5ith it? A;2) %B stands for data control 0lockI it is a keyword for the statement used to descri0e datasets. Eeywords associated with it are B5E(I4!, !", 5)!%5 and )!%$*. Q+*) What is the differen3e !et5een BLJ)I%& and L2&CL? A;6) 5)!%5 is the lo<ical record len<th , where as B5E(I4! is multiples of 5)!%5 Q+-) Can yo, e9e3,te a =2OC from another =2OC? A;9) I did not know the answer and my inter7iewer said "&. 5ater I tried and eDecuted P)&% from a P)&%, three le7els deep. *anuals do not state any limit on P)&% callin< P)&%, or nestin<. Q+/) What 5i happen if yo, attempt to restart a Fo! in the midd e of a <CL 66 I? .... 66 &N:I?? A;:) Po0 will fall throu<h to the !" I$ .not eDecutin< any steps), then resume eDecution with the first step A$#!) the // !" I$. Q++) 4o5 many positiona parameters are there in Fo! statement? A;;) #here are two position parameters in No0 statement. Q+.) What are three parameters yo, 3an spe3ify on <o! statement as 5e as on e9e3 stmt ? A;@) #ime, )e<ion and %ond parameters Q+7) 4o5 3an yo, trap a!ends in the <CL? A;1) +se I$ AB!" statement in the P%5. Q.8) 4o5 do yo, restart a step in <CL? A@=) +se )!(#A)#Hstep name. Q.1) 4o5 do yo, pass parameters to the program as the Fo! is !eing e9e3,ted ? A@1) By usin< GparmG parameter in eDec statement. the 7alue mentioned here should 0e declared in linka<e section in the pro<ram and process thru procedure di7ision. this techni8ue is 7ery useful when you do not know the parameters at the time of codin< the pro<rams. Q.2) Why do yo, ,se a 3ontro 3ard? A@,) A control card can 0e a mem0er of a pds or a se8uential dataset and is used for storin< the date fields, efinitions of '(A* files....etc. Aou use control card 0ecause you cannot use a instream procedure in a procedure. Generally you will 0e callin< a Proc from your Pcl and you cannot code instream procedure in the Proc and so you will point to the dataset which is called control card. Q.") 4o5 do yo, s,!mit <CL via a Co!o program? A@2) In your P%5 define as //P&BA P&B 1111, P&B1 //(#!P=1 !/!% PG*HP)&G1 //ddname (A(&+#H.L,I"#) ))....and your %&B&5.P)&G1) should look like this (!5!%# P%5-$I5! A((IG" #& ddname. &pen this file and write the P%5 statements into this file. !.<. *&'! G//#!(#P&B P&B 1111,'I('!I(>G #& P%5-)!%.*&'! G//(#!P=1 !/!% PG*HI!$B)16G #& P%5- )!% and close this file. #hen #!(#P&B will 0e su0mitted.

Q.*) 4o5 do yo, s,!mit a <CL ,nder CIC) environment ? A@6) Pass all the Ncl codes to a %&B&5 7aria0le.should 0e declare usin< &%%+)( clause) and the write the line one 0y one to the spool usin< %I%( commands like (P&&5%lose (P&&5&pen (P&&5Crite . $or more help reffer %!%I of %I%( or %I%( manual Q.-) What is the parameter to !e passed in the Fo! 3ard for the ,n imited time ; irrespe3tive of the Fo! 3 ass ? A@9) #I*!H166= Q./) :efinition of CON: parameter in <CL A@:) %&" is a condition parameter, consists of , su0 parameters, 1st - return code from the pre7ious step, ,nd - condition. If %&" is true, the step on which %&" is coded will 0e BAPA((! . Q.+) What is meant !y )8C+ system a!end 3ode? A@;) (=%; - ata eDception error - you will <et it whene7er you are tryin< to mo7e the low 7alues or spaces into the numeric field, or compare the numeric fields with low 7alues, or try to do some arithmetic operations on the low 7alues. #o a7oid this you ha7e to always initialiOe the numeric fields otherwise they will contain the low 7alues. Q..) 4o5 to pass the temp dataset form one <OB step to another? A@@) By specifyin< the I(P as PA(( for the temp dataset Q.7) What is a CON: parameter in <CL? A@1) %&" means condition parameter. It is compared with system return code of pre7ious step.//step1 eDec p<mHa0cd//step, eDec p<mHDyO, condH.6,lt)step, will 0e eDecuted when system return code of step1 is less than 6. Q78) Write a F3 to e9e3,te a Fo! !y + a.m on <an 28;17./ ? A1=) #>! code I( F //L*AI" !A 5I"!H.=;==,B,=1,=@:) Q71) 4o5 many types of i!raries are there in <CL ? A11) 5i0raries are of three types.1.(ytem 5i0rariesF (+%> A( (A(1.5I"E5IB,.Pri7ate 5i0rariesF (P!%I$I! I" A P&B5IB &) (#!P5IB (#A#!*!"#(.2.#emporary 5i0rariesF %)!A#! I" A P)!'I&+( (#!P &$ #>! P&B. Q72) What , mean !y in3 ,de statement in <CL ? A1,) An include statement identifies a mem0er of a pds or pdse that contains. #his set of P%5 statements is called an include <roup. #he system replaces the include statement with the statements in the include <roup. Q7") #he ma9im,m n,m!er of in'stream pro3ed,re yo, 3an 3ode in any <CL is ? A12) $ifteen.19). Q7*) What yo, mean !y sBe eton <C ? A16) Pcl which chan<es durin< run time i.e. the 7alues for the Ncl such as p<m name , dd name will chan<e .ie same Ncl can 0e used for 7arious No0, e8ui7alent to dynamic s8l... Q7-) 4o5 do yo, s,!mit a <CL ,nder CIC) environment ? A19) !dit the P%5 in !Dtra partition # Q and su0mit the same usin< some system command .not sure) under %I%( su0system. #his is what i think, please clarify.... Q7/) What is <CL ? A1:) P%5 is Po0 %ontrol 5an<ua<e and is used for Batch processin<. #he startup procedures of &( and standard products like %I%( etc are written in P%5. It is interface 0etween operatin< system.*'() 3 application pro<ram. when , related pro<rams are com0ined to<ether on control statements is called No0 control lan<ua<e

Q7+) What is the ma9 ! o3BsiDe for a #ape fi e? A1;) It is 2,,;:=.Based on that we can calculate efficient num0er of )ecords in a Block Q7.) What are the !asi3 <CL )tatements for a <o!? A1@) P&B F Identifies a No0 and supplies accountin< info !/!% F Identifies a No0 step 0y indicatin< the name of the pro<ram to 0e eDecuted. F Identifies a data set to 0e allocated for the No0 step elimiter./L) F *arks the end of an in-stream dataset "ull.//) F *arks the end of a No0 %omments.//L) F Pro7ides %omments P)&% F *arks the 0e<innin< of a procedure P!" F *arks the end of a procedure &+#P+# F (upplies options for (A(&+# processin<. Q77) What does the statementsE typr,nOs3an and typr,nOho d do in a <CL statement A11) typrunHscan checks the P%5 for errors, typrunHhold holds the No0 until further notice. Q188) Whi3h is the most 5ide y ,sed !at3h performan3e monitor for :B2? A1==) B,P* Q181) What is Q)$1 error ,s,a y 5hen it is o33,rs? A1=1) +sually it is occurs at the time of No0 su0mission. Q182) What is the p,rpose of in3 ,de statement in a <CL? A1=,) It is used as an alternati7e for (#!P5IB. Chen we specify the dataset name in include ,it will search in all the datasets specified in the include dataset. Q18") What does )8C* error mean? A1=2) #his error is faced when we eDecute the %&B&5 pro<ram. #he main reason for this error is that a 7aria0le is defined with less characters and we are tryin< to mo7e data which is lar<er than the actual stora<e space. Q18*) In 5hi3h ta! e =L$N is registered in ? A1=6) )%# Q18-) What is (:(? A1=9) G G - <roup of dataset that are lo<ically or chronolo<ically related, referred 0y name and a relati7e <eneration num0er - an inte<er which identifies the <eneration of a dataset and is coded in parentheses after dataset name. A0solute G G name - GDDDD'yy, where DDDD-a0solute <en. num0er, yy-7ersion num0er. %an 0e se8uential, direct, partitioned. .'(A* - no). *ust always 0e catalo<ed. Ad7anta<e - all datasets ha7e the same name and system keeps track of addin< new and retainin< pre7ious <enerations and deletin< oldest successi7e <eneration. #o create a G G we create a G G indeD in the system catalo< with I %A*( utility and then a model .prototype, (%B) on the same 7olume to supply %B information. !mpty - when limit is reached all mem0ers are remo7ed from the indeD, otherwise-only oldest. (cratch-remo7ed mem0ers are uncatalo<ed 3 deleted, otherwise - remo7ed 3 uncatalo<ed, 0ut remain in the system .not mem0ers of G G any more). G G num0er is updated at the end of the No0. If num0er is not specified all <enerations will 0e processed from the 0e<innin< Q18/) 5hat do yo, mean By spoo ing? &9pand )=OOL? A1=:) #his is mana<ed 0y P!(. #his is used for Queuin< the &utputs that are intended for Printin< and are first stored in (P&&5 A( . #his can 0e mana<ed +sin< Q18+) ?or ho5 ong a Fo! 3an !e e9e3,ted 3ontin,o,s y in a mainframe ? A1=;) ,6@ AA( Q18.) 1a9. No of :: statements in a Fo! ? A1=@) 2,;2

Q187) 4o5 m,3h spa3e O) a o3ates 5hen yo, 3reate a =) or =:)? A1=1) 9: EB Q118) 1in no of mem!erHs A=:)) in one dire3tory ! o3B? A11=) (I/.:) Q111) #he ma9im,m n,m!er of steps in a Fo!? A111) ,99 Q112) 4o5 m,3h is memory spa3e invo ved; 5hen 5e 3ode BLOCJ)I%&;#2J & CCL ? A11,) &ne 0lock constitutes 2,EB of formatted memory/ 6,EB of +nformatted memory,: 0locks makes one #rack 3 19 #racks makes one cylinder. Q11") What is :)N:B8/ ? A112) #his is the Place where B, %atalo< resides Q11*) What is the ,se of :)N:B8+ ? A116) #his is the area where sortin< takes place in Q11-) What is :$#$CO1 d!? A119) It is a data0ase used with '(!. Q11/) What is a :,mmy 0ti ity and 5hat it does ? A11:) I!$B)16 is a ummy utility and it is used for the sake of !/!% PG*H .... statement in P%5^when used it wouldnGt perform any task_. e.<. Chile Allocatin< a dataset you donGt ha7e to run any utility ^this could 0e done 0y <i7in< dispHnew in statement_. But for a PG* name must 0e <i7en in !/!% statement, it is used. Q11+) What " g,ide ines do 5e have to fo o5 5hen 3on3atenating :: statements? A11;) atasets must 0e of the same type .disk or tape), All datasets must ha7e the same lo<ical record len<th, #he dataset with the lar<est 0locksiOe must 0e listed first. Q11.) On the :: statement; 5hat is the main differen3e !et5een 3reating a ne5 seI,entia f at fi e and a partitioned dataset? A11@) (PA%!H.n,m) for a se8uential file, (PA%!H.n,m,p) for a P ( where n, m, and p are num0ers. #he p desi<nates how many directory 0locks to allocate. Q117) What is the differen3e !et5een I&B(&N&2; I&BCO=C and 2&=2O in I:C$1) ,ti ity? A111) I&B(&N&2 -- #his is a dataset utility for copyin< se8uential datasets which produces a P ( or a mem0er from a se8uential dataset. I&BCO=C -- #his is a dataset utility for copyin< one P ( to another or to mer<e P (s. 2&=2O -- #his is for copyin< se8uential datasets. *ore or less same as the I!BG!"!). Q128) 4o5 do yo, s,!mit <CL via a Co!o program? A1,=) +se a file //dd1 sysoutH.L,intrdr)write your P%5 to this file. Pl some one try this out. Q121) 4o5 to e9e3,te a set of <CL statements from a COBOL program ? A1,1) +sin< !/!% %I%( (P&&5 C)I#!.7ar-name) !" -!/!% command. 7ar-name is a %&B&5 host structure containin< P%5 statements. Q122) What is the differen3e !et5een stati3 3a & :ynami3 3a ? A1,,) In the case of (tatic call, the called pro<ram is a stand alon< pro<ram, it is an eDecuta0le pro<ram . urin< run time we can call it in our called pro<ram. As a0out ynamic call, the called pro<ram is not an eDecuta0le pro<ram it can eDecuted thru the called pro<ram Q12") What is the differen3e !et5een 3ata og,e pro3ed,re and In')tream pro3ed,re? B,

A1,2)

In (tream procedures are set of P%5 statements written 0etween P&B and !/!% statements, start with P)&% and end with P!" statement. *ainly used to test catalo<ed procedures. %atalo<ed procedure is catalo<ed on the procedure li0rary and is called 0y specifyin< the procedure name on the !/!% statement.

Q12*) What do yo, fee maBes a good program? A1,6) A pro<ram that follows a top down approach. It is also one that other pro<rammers or users can follow lo<ically and is easy to read and understand. Q12-) Can 5e !ro5se or edit the (:( dataset if it is a tape entry? A1,9) "o, Aou cant edit or 0rowse the G G if it resides on tape. Q12/) What are the ma9im,m and minim,m siDes of any CON#2OL $2&$ A>)$1 datasets) ? A1,:) *inimum (iOe F 1 track *aDimum siOe F 1 cylinder Q12+) 4o5 to get 3,rsor position from system in CIC) environment ? A1,;) Get it from !IB%+)P&( M Q12.) 4o5 many parameters are there to a :I)= statement and 5hat are their ,ses ? A1,@) #here are three.2) parameters. Parameter 1F current data set disposition.new, shr, old, mod) Parameter ,F normal close action for data set .catl<, keep, delete) Parameter 2Fa0end action for data set .catl<, keep, delete). Q127) What is the error 3ode )OC81 indi3ate ? A1,1) &peration eDception error $or e.<. a dataset open error Q1"8) What is a pro3ed,re? A12=) A set of precoded P%5 that can 0e modified throu<h the use of parameters or o7erride cards. "oteF Procedures can 0e catalo<ued or instream. Q1"1) What is the differen3e !et5een spe3ifying :I)=OOL: and :I)=O)42 for a dataset? A121) &5 specifies eDclusi7e use of a dataset, (>) allows multiple No0s to concurrently access the dataset "oteF Chen updatin< a dataset, you would normally use &5 . Q1"2) What are the three !asi3 types of statements in a Fo!stream? A12,) P&B.one per No0stream)!/!%.one or more per No0) .one or more per No0step) Q1"") What does )C)IN S indi3ate? A122) Instream data follows this card and is terminated when followed 0y a card containin< // or /L in columns 1 and ,. Q1"*) What are three maFor types of <CL statements? What are their f,n3tions? A126) P&B - indicates start of No0stream to the operatin< system and throu<h parms coded on it, certain details a0out the No0 .time, re<ion, messa<e le7el, No0 accountin< data). !/!% - indicates the start of eDecution of a particular No0 step, 0e that step a pro<ram or a proc. is a data definition, which is used to descri0e the attri0utes of a data set .name, unit, type, space, disposition). 1. istin<uish 0etween positional 3 keyword parameters ,. >ow can you omit positional parameters Q 2. >ow do u define the identifier field for a delimiter statement Q 6. 5ist some 7alid operation codes .

9. Chat is the purpose of the *(G5!'!5 parameter Q :. Chat is the function of the followin< parameters F I) *(G5!'!5H.=,=) ii) *(G5!'!5H.,,1) iii) *(G5!'!5H.1,1) ;. Chat is the purpose of the *(G%5A(( parameter Q @. Chat are the parameters used with %&" Q

1. 5ist down the different types of comparison operators 3 their meanin< . 1=.Chat is the function of the #AP)+" parameter Q 11.Chat are the su0parameters that can 0e used with #AP)+"Q 1,.Chat is the function of the #I*! parameterQ 12. Chat is the purpose of the !/!% statement Q 16. Chat are the additional keyword parameters used on the !/!% statementQ 19. Chat is the difference 0etween the followin< statements F I) stepZ1 eDec PG*Haccpay ii) stepZ1 eDec t0alance 1:. Chat is the error in the followin< P%5 statements F I) //stepZthree eDec p<mHhk0c;:, ii) //stepZ2 eDec p<m H hk0c;:, iii) //stepZ2 eDec p<r H hk0c:;, 1;. "ame the system li0rary from which modules are retrie7ed at eDecution time . 1@. Chat is the purpose of the P&B5IB statement Q 11. If P&B5IB 3 (#!P5IB statements are 0oth included in a No0 , then which statement would o7eride . ,=. Chat is the purpose of the PA)* parameter Q ,1. Chat is the pupose of the statement Q statement Q //ddname statement Q L

,,. >ow would u specify the de7ice for a dataset in a ,2. Chat is the function of the followin< statement

,6. Chat is the purpose of the (A(&+# Parameter in the

,9. Chat are the two ways of specifyin< #emporary ata (ets Q ,:. Chat are the ad7anta<es of codin< the I(P parameter with *& rather than "!C Q I(PH."!C,%A#5G, !5!#!)

,;. !Dplain the function of the followin< (tatement F //ddname ,@. ,1. Chat is the default 7alue of the third Chat is Backward )eferencin< Q I(P su0parameter Q

2=. 21. 2,. 22.

Chat is the purpose of %oncatenatin<

ata (ets Q

Chat is the result of a )!A operation on a ummy ata set Q Chat are the functions of the followin< ddnames F Chat are G Gs Q (A(+ +*P , (A(AB!" , (A(* +*P

>irt,a )torage $33ess 1ethod A>)$1)


Q1) A1) Q2) A9) What are the types of >)$1 datasets? !ntry se8uenced datasets .!( (), key se8uenced datasets .E( () and relati7e record dataset .)) (). 4o5 are re3ords stored in an &):); entry seI,en3ed dataset? #hey are stored without respect to the contents of the records and in the order in which they are included in the file.

Q") What is a CI; 3ontro interva ? A2) A control inter7al is the unit of information that '(A* transfers 0etween 7irtual and auDiliary stora<e. Q*) A6) Q-) A9) Q/) A:) Q+) A;) Q.) A@) Q7) Q1) What are the distin3tive feat,res of a Bsds; Bey seI,en3ed dataset? #he indeD and the distri0uted free space. What is a C$; 3ontro area? A <roup of control inter7als makes up a control area. What is a seI,en3e set? #his is the part of the indeD that points to the %A and %I of the record 0ein< accessed. What is the inde9 set? #his is the other part of the indeD. It has multiple le7els with pointers that ultimately reach to the se8uence set. What is a 3 ,ster? A cluster is the com0ination of the indeD, se8uence set and data portions of the dataset. #he operatin< system <i7es pro<ram access to the cluster, ie. to all parts of the dataset simultaneously. What is the 3ata og? #he catalo< contains the names of all datasets, '(A* and non-'(A*. It is used to access these datasets.

Q18) What is an a ternate inde9? Q1=) An AI/ is a file that allows access to a '(A* dataset 0y a key other than the primary one. Q11) What is a path? Q11) A path is a file that allows you to access a file 0y alternate indeD - the path pro7ides an association 0etween the AI/ and the 0ase cluster. Q12) What is the ,pgrade set? Q1,) #he up<rade set is the list of all AI/es that '(A* must maintain for a specific 0ase cluster, so that when data in the 0ase cluster is updated, the AI/ files are also updated. Q1") What is free spa3e? Q12) $ree space is reser7ed within the data component of a E( ( to accommodate insertin< new records. Q1*) What is a >)$1 sp it? Q16) If there isnGt enou<h space in the control inter7al '(A* performs a control inter7al split 0y mo7in< some records to the free control inter7als. If there isnGt a free control inter7al '(A* performs a control area split 0y allocatin< a new control area and mo7in< half of the control inter7als to it. Q1-) What is the !ase 3 ,ster?

Q19) #he 0ase cluster consists of the data component and the indeD component for the primary indeD of a E( (. Q1/) :o primary Bey va ,es have to !e ,niI,e? :o a ternate Bey va ,es have to !e ,niI,e? Q1:) Primary key 7alues must 0e uni8ueI alternate key 7alues need not 0e. Q1+) In the COBOL )&L&C# statement 5hat is the O2($NI%$#ION for a J):)? Q1;) #he &)GA"I4A#I&" is I" !/! . Q1.) In the COBOL )&L&C# statement for a J):) 5hat are the three possi!i ities for $CC&))? Q1@) A%%!(( can 0e (!Q+!"#IA5, )A" &* or A"A*I%. Q17) What is the COBOL 2&CO2: J&C 3 a,se? Q11) #he )!%&) E!A in the (!5!%# clause identifies the files primary key as it will 0e known to the pro<ram. Q28) What is the p,rpose of the ?IL& )#$#0) 3 a,se in the )&L&C# statement? Q,=) #he $I5! (#A#+( field identifies the field that '(A* uses to pro7ide information a0out each I/& operation for the file. Q21) If yo, 5ish to ,se the 2&W2I#& 3ommand ha5 m,st the >)$1 fi e !e opened? Q,1) It must 0e opened as I/&. Q22) &9p ain the meaning and synta9 for the )#$2# 3ommand. Q,,) #he (#A)# command is used read other than the neDt '(A* record. A 7alue must 0e mo7ed into the )!%&) E!A. #he E!A clause is optional, 0ut it can 0e used to specify a relational .e8ual, less than, etc.) operator. Q2") What is the meaning of dynami3 pro3essing? Q,2) ItGs rarely used. It means one pro<ram uses 0oth se8uential and random processin< for a '(A* E( ( file. Q2*) Name some 3ommon >)$1 error 3onditions and 3odes. Q,6) #hey are end of file .1=), duplicate key .,,), record not found .,2), '(A* lo<ic error .1=), open pro0lem .1,) and space pro0lem .12). Q2-) What is the >)$1'3ode fie d? Q,9) It is a %&B&5 II enhancement to '(A* 0atch processin< eDpandin< the $I5! (#A#+( field. It is defined in C&)EI"G-(#&)AG! as a siD 0yte <roup item with three two 0yte elements, the normal return code, the function code and the feed0ack code. Q2/) What is a >)$1 s ot? Q,:) A relati7e record dataset .)) () consists of a specified num0er of areas called slots. !ach slot is identified 0y a relati7e record num0er .))") which indicates its relati7e position in the file. Q2+) What is the ,ti ity program 3 ose y asso3iated 5ith >)$1? Q,;) I %A*(, the access method ser7ices utility. Q2.) #here are at east seven I:C$1) 3ommandsT name and e9p ain ea3h of them ?. Q,@) A5#!) modifies information for a catalo<, alternate indeD, cluster or path. B5 I" !/ 0uilds the alternate indeD, of course. !$I"! is used for A5#!)"A#!I" !/, %5+(#!) or PA#>. !5!#! remo7es the catalo< entry for a catalo<, cluster, alternate indeD or path. 5I(#%A# lists information a0out the dataset. P)I"# prints the dataset contents. )!P)& copies records from one file to another. Q27) What are the three eve s of definition for the >)$1 :&?IN&? Q,1) #hey are !$I"! %5+(#!), A#A and I" !/.

Q"8) What is the signifi3an3e of the )4$2&O=#ION) parameter? Q2=) It specifies how the file may 0e shared 0etween No0s and 0etween 0atch and %I%( en7ironments. Q"1) What is the meaning of the :&?IN& 1O:&L parameter? Q21) It specifies whether aniela Pesto7a or Aamila - oopsM Cron< modelsM #he *& !5 parameter allows you to model your cluster 0y modelin< it after an eDistin< cluster. Q"2) What is ?i e )tat,s in >)$1? Q2,) #he $I5! (#A#+( clause of the $I5!-%&"#)&5 para<raph allows for each file to 0e associated with a file status key .i.e., the ,-character data item specified in the $I5! (#A#+( clause). If the $I5! (#A#+( clause is specified for a <i7en file, a 7alue indicatin< the status of each I/& operation a<ainst that file is placed in the associated file status key. #his 7alue is stored in the file status key as soon as the I/& operation is completed .and 0efore eDecution of any !/%!P#I&"/!))&) declarati7e or I"'A5I E!A/A# !" phrase associated with the I/& re8uest). "oteF #his element may 0eha7e differently when the %*P), compiler option is used. #he file status key is di7ided into two status keysF the first character is known as file status key 1I the second character is file status key ,. Q"") WhatGs a L:) ALinear :ata )et) and 5hatGs it ,sed for? Q22) 5 ( is a '(A* dataset in name only. It has unstructured 6k .6=1: 0ytes) fiDed siOe %Is which do not contain control fields and therefore from '(A*Gs standpoint they do not contain any lo<ical records. #here is no free space, and no access from %o0ol. %an 0e accessed 0y B, and I*( fast path datasets. 5 ( is essentially a ta0le of data maintained on disk. #he Gta0le entriesG must 0e created 7ia a user pro<ram and can only 0e lo<ically accessed 7ia a user pro<ram. Chen passed, the entire 5 ( must 0e mapped into stora<e, and then data is accessed 7ia 0ase and displacement type processin<. Q"*) What is I:C$1) ? Q26) I %A*( is the Access *ethod (er7ices pro<ram. Aou run the I %A*( pro<ram and supply A*( commands thru (A(I". .eDamples of A*( commands are !5!#!, !$I"!, )!P)& etc..). Q"-) Can $1) 3ommands !e r,n from the #)O prompt ? Q29) Aes Q"/) )ynta9 of $1) moda 3ommands ? Q2:) "oteF these can 0e used only under I %A*( and not from the #(& prompt. I$ 5A(#%%.or *A/%%) K.or J,H etc..) 7alue #>!" &command set .such as !5!#!, !$I"! etc..) !5(! &command set 5A(#%% - %ondition code from the last function .such as delete) eDecuted *A/%% - *aD condition code that was returned 0y any of the pre7 functions (!# is also a 7alid A*( command. (!# 5A(#%% .or *A/%%) H 7alue #he maDimum condition code is 1:. A cond code of 6 indicates a warnin<. A cond code of @ is usually encountered on a !5!#! of a dataset that is not present. Q"+) 0nder I:C$1) ; m, tip e f,n3tions 3an !e e9e3,ted; ea3h of 5hi3h ret,rns a 3ond 3ode. What 5i !e the 3ondition 3ode ret,rned to the operating system ? Q2;) #he maDimum condition code <enerated is returned as the condition code of the I %A*( step.

Q".) What is Contro Interva ; Contro $rea? Q2@) Contro Interva is analo<ous to a physical 0lock for Q(A* files. It is the unit of I/&. *ust 0e 0etween 91, 0ytes to 2, k. +sually either ,E or 6E. A lar<er control inter7al increases performance for se8uential processin< while the re7erse is true for random access. +nder %I%( when a record is locked, the entire %I <ets locked. Contro $rea is a <roup of control inter7als. %A is used durin< allocation. %A siOe is calculated 0ased on the allocation type .cyl, tracks or records) and can 0e maD of 1 cylinder Q"7) What is ?2&&)=$C& ? Q21) %oded in the !$I"! as $)!!(PA%!.ci ca) where ci is the percenta<e of each control inter7al to 0e left free for insertions, ca is the percenta<e of control inter7als in each control area to 0e left empty. Q*8) 4o5 do yo, de3ide on optim,m va ,es for CI; ?2&&)=$C& et3...? Q6=) %I siOe should 0e 0ased on record len<th, type of processin<. +sually %I is 6E. If record len<th is lar<er.K1E), chose :E or @E. $)!!(PA%! should 0e lar<e if more num0er of insertions are en7isa<ed. +sual 7alues are .,= ,=) when hea7y updates are eDpected. %I siOe can 0e calculated. Q*1) Wo, d yo, spe3ify ?2&&)=$C& for an &):)? Q61) "o. Because you cannot insert records in an !( (, also when you rewrite a record, it must 0e of the same len<th. #hus puttin< any 7alue for freespace does not make any sense. Q*2) What is )4$2&O=#) ? Q6,) (>A)!&P#( is a parameter in the !$I"! and specifies how an o0Nect can 0e shared amon< users. It is coded as (>A)!&P#(.a 0), where a is the cross re<ion share option ie how two or more No0s on a sin<le system can share the file, while 0 is the cross system share option ie how two or more No0s on different *'(s can share the file. +sual 7alue is ., 2). Q*") What is the meaning of ea3h of the va ,es in )4$2&O=#)A2 ")? Q62) 'alue of , for cross re<ion means that the file can 0e processed simultaneously 0y multiple users pro7ided only one of them is an updater. 'alue of 2 for cross system means that any num0er of No0s can process the file for input or output .'(A* does nothin< to ensure inte<rity). Q**) 4o5 do yo, define a J):) ? Q66) !$I"! %5+(#!).cluster name) with the I" !/! parameter. Also specify the ds name for the A#A component 3 the ds I" !/ component. &ther important parms are )!%&) (I4!, E!A(, (>A)!&P#I&"(. Q*-) 4o5 do yo, define an $L#IN:@ ? 4o5 do yo, ,se $L#IN:@s in !at3h; CIC) pgmHs ? Q69) !$I"! A5#!)"A#!I" !/. Important paramters are )!5A#! where you specify the 0ase cluster name, E!A(, )!%&) (I4!,(>A)!&P#I&"(,+"IQ+!E!A.or "&"+"IQ+!E!A), A#A.ds name for the data component), I" !/.ds name for the indeD component). #hen !$I"! PA#>. Important paramters are "A*! .ds name for the path), PA#>!"#)A .ds name of the alternate indeD name), +P A#!.or "&+P A#!) which specifies whether an alt indeD is updated when a update to the 0ase cluster takes place. #hen B5 I" !/. Parameters are I" A#A(!#.ds name of 0ase cluster), &+# A#A(!#.ds name of AI/). Q*/) 0sing $ ternate Inde9es in Bat3h pgmsE Q6:) In the P%5, you must ha7e stmts for the cluster and for the path.s). In the %&B&5 Pro<ram, (!5!%# .. A((IG" #& ddname for 0ase cluster )!%&) E!A I(... A5#!)"A#! )!%&) E!A I(.. Q*+) 0sing $ ternate Inde9es in CIC) pgmsE Q6;) $%# entries must 0e created for 0oth 0ase cluster 3 the path. #o read usin< the alternate indeD, use the dd name of the path in %I%( file control commands. Q*.) What happens 5hen yo, open an empty >)$1 fi e in a COBOL program for inp,t?

Q6@) A '(A* file that has ne7er contained a record is treated as una7aila0le. Attemptin< to open for input will fail. An empty file can 0e opened for output only. Chen you open for output, %&B&5 will write a dummy record to the file 3 then delete it out. Q*7) 4o5 do yo, initia iDe a >)$1 fi e !efore any operation? a >)$1 5ith a ternate inde9? Q61) %an write a dummy pro<ram that Nust opens the file for output and then closes it. Q-8) What does a fi e stat,s of 82 on a >)$1 indi3ate? Q9=) uplicate alternate key . >appens on 0oth input and output operation Q-1) 4o5 do yo, 3a 3, ate re3ord siDe of an a ternate 3 ,ster? (ive yo,r va ,es for !oth ,niI,e and non,niI,e. Q91) +ni8ue %aseF 9 ? . alt-key-len<th ? primary-key ) "on uni8ue %aseF 9 ? . alt-key-len<th ? n L primary-key ) where n H num0er of duplicate records for the alternate key Q-2) What is the differen3e !et5een seI,entia fi es and &):) fi es? Q9,) (e8uential .Q(A*) files can 0e created on tape while !( ( files cannot. Also, you can ha7e A5#I" !/ for an !( ( while no such facility eDists for Q(A* files. Q-") 4o5 do yo, oad a >)$1 data set 5ith re3ords ? Q92) +sin< the )!P)& command. Q-*) 4o5 do yo, define a (:( ? Q96) +se the !$I"! G!"!)A#I&" A#AG)&+P command. In the same I %A*( step, another dataset must 0e defined whose %B parameters are used when new <enerations of the G G are created. #his dataset is known as the model dataset. #he ds name of this model dataset must 0e the same as that of the G G, so use a disp of keep rather than catl< and also specify spaceH.trk,=) Q--) :o a versions of the (:( have to !e of the same re3ord ength ? Q99) "o, the %B of the model dataset can 0e o7erridden when you allocate new 7ersions. Q-/) 4o5 are different versions of (:( named ? Q9:) 0ase-file-name.Gnnnnn'== where nnnnH <eneration num0er .upto ,99). nnnn will 0e ==== for the 1st <eneration. Q-+) ),ppose " generations of a (:( e9ist. 4o5 5o, d yo, referen3e the 1st generation in the <CL? ' () Q9;) +se G G name.-,). Q-.) ),ppose a generation of (:( gets 3reated in a parti3, ar step of a pro3. 4o5 5o, d yo, refer the 3,rrent generation in a s,!seI,ent step? What 5o, d !e the disposition of this generation no5? ' () Q9@) )elati7e <eneration num0ers are updated only at the end of the No0, not at the end of a step. #o allocate a new <eneration, we would 0e usin< .?1) with a I(P of ."!C,%A#5G, !5!#!). #o refer to this in a su0se8uent step in the same No0, we would a<ain use .?1) 0ut with a I(P of (>) or &5 . Q-7) What more info yo, sho, d give in the :: statement 5hi e defining the ne9t generation of a (:(? ' () Q91) Gi7e .?1) as the <eneration num0er, <i7e .new,catl<) for disp, <i7e space parameter, can <i7e the %B parameter if you want to o7erride the dc0 of the model dataset. Q/8) $ss,ming that the :&?IN& <CL is not avai a! e; ho5 do yo, get info a!o,t a >)$1 fi eGs organisation? Q:=) +se the 5I(#%A# command.

Q/1) :,ring pro3essing of a >)$1 fi e; some system error o33,rs and it is s,!seI,ent y ,n,sa! e . What do yo, do ? Q:1) )un '!)I$A. Q/2) 4o5 do yo, fi9 the pro! em asso3iated 5ith >)$1 o,t of spa3e 3ondition? Q:,) efine new '(A* dataset allocated with more space. +se I %A*( to )!P)& the old '(A* file to new '(A* dataset. +se I %A*( to A5#!) / rename the old '(A* dataset or se I %A*( to !5!#! the old '(A* dataset. +se I %A*( to A5#!) / rename the new '(A* dataset to the name of the ori<inal '(A* dataset. Q/") What is the meaning of >)$1 2&#02N'CO:& 2.? Q:2) &ut of space condition is raised. Q/*) On 5hi3h datasets Co, 3an have $L# IN:&@?. Q:6) only on E( ( and !( ( - not )) ( Q/-) 4o5 many $ ternate Inde9es yo, 3an have on a dataset? Q:9) ,99 - 0ut you must 0e a nut to ha7e so many A5# IndeDes on a datasetM Q//) Is it s o5er if yo, a33ess a re3ord thro,gh $L# IN:&@ as 3ompared to =rimary IN:&@? Q::) Aes. ChyQ Because the alternate key would first locate the primary key, which in turn locates the actual record. "eeds twice the num0er of I/&s. Q/+) What is 2&CO>&2C and )=&&: parameters in :&?IN& CL0)#&2 3ommand? Q:;) )!%&'!)A .default) and (P!! are mutually eDclusi7e. )eco7ery preformats the control areas durin< the initial dataset load, if the No0 fails, you can restart 0ut you must ha7e a reco7ery routine already written to restart the No0. (P!! does not preformat the %As. It is recommended that you specify (P!! to speed up your initial data load. Q/.) :es3ri!e )4$2&O=#ION) parameter A)42) in :efine C ,ster 3ommand. Q:@) It defines the cross-re<ion and cross-system sharin< capa0ilities of the dataset. (yntaD is (>).%r7alue, %(7alue) 7alue 1 means multiple read &) sin<le write .read inte<rity) , means multiple read A" sin<le write .Crite inte<rity) 2 means *ultiple read A" multiple write 6 is same as 2, which refreshes the 0uffer with e7ery random access. default is (>).1 2). Q/7) What does the J&C2$N(&) parameter in :efine C ,ster 3ommend do? A:1) It di7ides a lar<e dataset into se7eral 7olumes accordin< to the Eey ran<es specified. e.<., E!A)A"G!( ..======1 ,111111) .2====== 9111111)). if the acti7ity on the key ran<es are e7enly distri0uted, concurrent access is possi0le, which is a performance impro7ement. Q+8) What are the optiona parameters to the inp,t dataset Whi e oading the empty 3 ,ster 5ith the data re3ords? A;=) 1)$)&*A )!((.address) ,)#&A )!((.address) where GaddressG specifies the )BA 7alue of the key of the input record. 2)$)&*"+*B!).rrn) 6)#&"+*B!).rrn) where GrrnG specifies the relati7e record num0er of the )) ( record 9)$)&*E!A.key) :)#&E!A.key) where GkeyG specifies the key of the input record ;)(EIP.num0er) @)%&+"#.num0er) where Gnum0erG specifies the num0er of records to skip or copy !DF )!P)& I"$I5!. 1) &+#$I5!. ,) (EIP.1===) %&+"#.;==) - (kips the first 1=== records and 0e<ins copyin< at 1==1 and copies ;== records from 1 to ,. Q+1) What is I:C$1)? and 5hat is the p,rpose of it?. A;1) I %A*( is an access method ser7ices utility used for creatin<, deletin<, alterin< '(A* files and copyin< se8uential file to a '(A* file, etc. Q+2) 4o5 to de ete a mem!er ,sing <CL. A;,) +sin< I %A*( a mem0er can 0e deleted. !5!#! G///.AAA.mem0er)

Q+") What is the :ifferen3e !et5een L:) & &):) ? A;2) #hese two datasets are '(A* datasets. !( ( maintains control information. But 5 ( does not maintains the control information. Q+*) Is a de ete operation possi! e in an &):)?B. Is re5rite operation possi! e in &):) ? A;6) "o delete operation is not possi0le in '(A* !( (.B. Aes rewrite operation is possi0le in an !( (. Q+-) What is an a ternate inde9 and path ? A;9) An alternate indeD is an another way of accessin< key se8uenced data record stored in a 0ase cluster and path is the linka<e which connect alternate indeD to its 0ase cluster. Q+/) 4o5 many !,ffers are a otted to >)$1 J):) and &):)? A;:) , data 0uffers 0y default for !( (. $or E( ( it allots , data 0uffers and 1 indeD 0uffers. each 0uffer is a0out 6k. Q++) 5hatGs the !iggest disadvantage of ,sing a >)$1 dataset? A;;) $)!! (PA%!.$P(%) Q+.) 5hatGs the devi3e independent method to indi3ate 5here a 2e3ord is )tored? A;@) By +(I"G )BA.)elati7e Byte Address). Q+7) 4o5 many times se3ondary spa3e a o3ated? A;1) 1,, #I*!( Q.8) 5hat is the 22N for the first re3ord in 22:)? A@=) #he answer is F 1 Q.1) 5hat is a Base C ,ster? A@1) #he IndeD and data components of a E( ( Q.2) If ?)=CA188 188) is spe3ified does it mean that !oth the 3ontro interva and 3ontro area 5i !e eft empty !e3a,se 188 P of !oth CI and 3a are spe3ified to !e empty? A@,) "o, they would not 0e left empty. one record will 0e written in each %I and 1 %I will 0e written for each ca.

)&C#ION 1
?i in the ! anBsE 1. ,. 2. 6. 9. :. ;. @. 1. 1=. 11. 1,. 12. 16. 1-. 1:. 1+. A ogi3a re3ord is a unit of information used to store data in a '(A* data set. A CI is a unit of information that '(A* transfers 0etween 7irtual stora<e and disk stora<e. #he minimum siOe of a %I is -12 !ytes. 91, 0ytes is the minim,m siOe of a %I. #he maDimum siOe of a %I is "2J. A %I consists of Logi3a 2e3ords, ?ree )pa3e and Contro Information. A %ontrol Inter7al efinition $ield .%I $) is of * Bytes lon<. A )ecord efinition $ield .) $) is of " Bytes lon<. In a %I if two or more adNacent records ha7e the same len<th, only t5o 2:fHs are used. #he minimum siOe of a %A is 1 tra3B . 1 track is the minim,m siOe of a %A. #he maDimum siOe of a %A is 1 3y inder. 1 cylinder is the ma9im,m siOe of a %A. 5 ( is '(A* data set with a %I siOe of *87/Bytes. L:) has no im0edded control information in its %I. 5 ( has only a data 3omponent. L:) cannot ha7e an alternate indeD.

1.. 11. ,=. 21. ,,. ,2. 2*. ,9. ,:. 2+. ,@. 27. "8. 21. "2. "". 26. "-. "/. 2;. ".. 21. *8. *1. *2. 62. 66. 69. */. 6;. 6@. 61. 9=. 91. 9,. 92. 96. 99. -/. 9;. 9@. 91. :=. :1. /2. :2. :6. :9. ::. :;. :@. /7. ;=. ;1. ;,.

22:) consists of a num0er of preformatted fiDed-len<th slots. )) ( has only a data 3omponent. $or an )) ( the re ative re3ord n,m!er is used as a search ar<ument. 22:) supports only fiDed len<th records. !( ( has only a data 3omponent. (panned records must 0e accessed in 1O>& mode. $ ternate Inde9 is a special type of E( (. #he *aster %atalo< .*%A#) is identified at I=L. #he 1aster Cata og A1C$#) contains pointers to system data sets and user catalo<s. >#OC A>o ,me #a! e Of Contents) descri0es the type and location of data sets on the 7olume. '#&% .'olume #a0le &f %ontents) is a data set created at 7olume initialiOation. <OBC$# identifies a default catalo< for an entire No0. )#&=C$# identifies a default catalo< for a sin<le No0 step. #he two types of A*( commands are f,n3tiona 3ommands and moda 3ommands. IN:&@&: is the default cluster type. *8.7 is the default maDimum record len<th. &ne cluster can ha7e a maDimum of 12" eDtents for all 7olumes to<ether. 2e3ord )iDe cannot 0e coded for 5 (. IN:&@ information appears on a 5I(#%A# listin< for E( (. A :ata C ass is a description of data set characteristics under control of (*(. <CL parameters o7erride the specifications from a ata %lass. #he names and contents of the ata %lasses can 0e displayed throu<h I)1?. 2&=2O pro7ides an easy to use copy utility. 2&=2O copies or mer<es an alternate indeD as a E( (. 2&=2O con7erts a se8uential or indeDed-se8uential data set into a '(A* data set. #he P)I"# command prints >)$1 data sets, non'>)$1 data sets and 3ata ogs. #he default print format for output is :01=. If a E( ( cluster with name B* +(!).E( (1 is created, the default data component name would 0e B1:0)&2.J):)1.:$#$ . $L#&2 modifies the catalo<ed attri0utes of a '(A* data set. A5#!) can 0e used to chan<e an !( ( into an L:). An L:) cannot 0e chan<ed to any other '(A* data set format. I*B! and )!P5I%A#! options are applica0le to J):) cluster. Parameters specified in the <CL o7erride the appropriate parameters specified in the ata %lass. '(A* clusters can 0e accessed in )eI,entia , :ire3t and )Bip seI,entia . '(A* data can 0e processed 0y Logi3a 2e3ord or 0y Contro Interva access. After software-end-of-file is written, the file is in 2e3overy mode. '!)I$A cannot 0e used for an &mpty :ataset or an L:) . Password 7erification is done durin< O=&N processin<. )trings allow concurrent positionin< within a data set. .) #he minimum 0uffer space for a cluster is )#2NO indeD 0uffers and )#2NOU1 data 0uffers. #he default 0uffer space for a cluster is )#2NO indeD 0uffers and )#2NOU1 data 0uffers. (e8uential processin< is o7erlapped when at least )#2NOU" data 0uffers are allocated. $or )eI,entia processin<, lar<er data %I siOes are desira0le. $or 2andom or :ire3t processin<, smaller data %Is are desira0le. ?ree )pa3e is used to reduce the num0er of %I and %A splits. I%I access cannot 0e used to Load or &9tend a data set. (pace allocations made in )!%&) s are con7erted to #2J) 0y '(A*. .) Eey compression applies to the Inde9 component. An alternate indeD cannot 0e defined for an 22:) or L:) . !ach AI/ data record contains )ystem 4eader Information, the $ ternate Jey , and =ointer to the data set. A Path =ath pro7ides a way to <ain access to the 0ase data throu<h its AI/. Base C ,ster must not 0e empty for B5 I" !/. 5en<th of the alternate keys must not eDceed 2-- . )ecords lar<er than "2+/8 cause )!P)& to terminate. Chen eDportin< a data set, we specify #&1=O2$2C to preser7e the ori<inal data set.

)&C#ION 2
)tate 5hether #r,e or ?a seE 1. ,. 2. 6. 9. :. ;. @. 1. 1=. 11. 1,. 12. 16. 19. 1:. 1;. 1@. 11. ,=. ,1. ,,. ,2. ,6. ,9. ,:. ,;. ,@. ,1. 2=. 21. 2,. 22. 26. 29. 2:. 2;. 2@. 21. 6=. 61. 6,. 62. 66. All '(A* data sets reside on A( de7ices. .#) Chene7er a record is retrie7ed from A( , the entire %A containin< it is read into '(A* 0uffer. .$) A 5 ( has no control information em0edded in its %Is. .#) In an )) (, the position of a data record can 0e chan<ed. .$) )ecords from an !( ( can either 0e accessed se8uentially or 0y )BA. .#) eletions and updatin< of records is possi0le in !( (. .$) (panned records can only 0e used in !( ( or E( (. .#) (panned records are records lar<er than %A siOe. .$) A %I that contains the record se<ment of a spanned record contains no other data. .#) (panned records must 0e accessed in 5&%A#! mode. .$) A E( ( has 0oth data and indeD components. .#) A newly inserted record is always added at the end of a E( (. .$) A new indeD entry is inserted in the se8uence set record correspondin< to a %I split. .#) I*B! places the se8uence set %I for a data control area within the control area. .#) '(A* control inter7als containin< data records ha7e at least one ) $ and one %I $..#) %ontrol area siOes 7ary 0y de7ice type. .$) %ontrol inter7al siOes 7ary 0y de7ice type. .#) $or a E( (, the lar<er the data %A siOe, the smaller the num0er of indeD %Is. .$) Ce cannot access 7aria0le-len<th 0locked records in '(A*. .$) *%A# contains pointers to system data sets and user catalo<s. .#) Chile creatin< '(A* data sets, pro7ision of component names is a must. .$) P&B%A# identifies a default catalo< for a sin<le No0 step. .$) #here is a one-to-one correspondence 0etween B%(s and '' (s. .$) #he need for P&B%A#/(#!P%A# statements has 0een replaced 0y the A5IA(. .#) Aliases are limited to the first se<ment of the component name. .$) #he cluster name is re8uired when definin< '(A* cluster usin< !$I"! %5+(#!) command. .#) Any parameters in coded for the cluster in !$I"! %5+(#!) will also apply to the data and indeD components. .#) If the space allocation is coded at cluster le7el in !$I"! %5+(#!), the space is di7ided 0etween data and indeD. .#) If the specified %I(4 is not 7alid in !$I"! %5+(#!), '(A* increases the num0er to the neDt 7alid %I(4. .#) All the parameters for 5I(#%A# command are re8uired. .$) A data component name will 0e <enerated 0y A*( if it is not eDplicitly coded. .#) !$I"! %5+(#!) for a E( ( will <enerate cluster, data and indeD information e7en if only cluster information is specified. .#) #he candidate 7olume is not used when data set is initially loaded. .#) (uppose #!(#. A#A(!# is a E( (. #he followin< statement will print cluster information onlyF 5I(#%A# !"#)I!( .#!(#. A#A(!#) A55 .$) )!P)& copies or mer<es an alternate indeD as an !( (. .$) A P)I"# command prints only '(A* data sets. .$) A E( ( can 0e printed only in key order. .$) A )) ( is printed in relati7e record num0er se8uence. .#) #he default print format is %>A)A%#!). .$) Generic keys can 0e specified in P)I"# $)&*E!A and #&E!A. .#) )!P)& will stop processin< records when a total of four physical I/& errors occur while writin< to the output data set. .$) )!P)& )!+(! a<ainst a non-empty tar<et data set defined with "&)!+(! will reset the tar<et data set. .$) In alterin< a E( (, B+$" and B+$"I can 0e specified instead of B+$$!)(PA%!..$)

69. A5#!) )!*&'!'&5+*!( will not remo7e the 7olume if the data set currently has data on the 7olume. .#) 6:. A5#!) can 0e used to chan<e !( ( to 5 (. .#) 6;. A5#!) "+55I$A can 0e used to nullify all passwords, eDcept the master. .$) 6@. A5#!) modifies the catalo<ed attri0utes of a '(A* data set. .#) 61. Generic names can 0e used to rename a <roup of o0Nects or to alter an attri0ute of a <roup of o0Nects. .#) 9=. ata %lass specifications o7erride the appropriate P%5 parameters. .$) 91. "ot all attri0utes can 0e specified throu<h P%5. .#) 9,. '(A* data can 0e read 0y lo<ical record or 0y control inter7al access. .#) 92. &P!" causes '(A* to 7erify that the processin< options match the cluster type. .#) 96. %&B&5 does not support skip-se8uential processin<. .#) 99. %&B&5 supports )BA addressin< and 0ackward processin<. .$) 9:. '( %&B&5 II supports skip-processin<. .$) 9;. "on-spanned records may 0e accessed in either *&'! or 5&%A#! mode. .#) 9@. #he I(A* interface pro<ram allows '(A* pro<rams to access I(A* data sets. .$) 91. %ross system sharin< is either 0etween multiple systems or multiple 7irtual machines..#) :=. (oftware end-of-file is a %I containin< all Oeroes eDcludin< %I $. .$) :1. '!)I$A can 0e used for empty data sets. .$) :,. %atalo< password protection is re8uired for data set password checkin<. .#) :2. #o ensure read inte<rity the application pro<ram must code !"Q/ !Q. .#) :6. $or a data set with (>A)!&P#I&"(.6 2), %A splits are not allowed. .$) :9. #he default for !5!#! %5+(#!) is "&!)A(!. .#) ::. If a cluster has '(A* password protection, the cluster *+(# ha7e a master password. .#) :;. #he hi<h-le7el indeD set record is maintained in the 0uffer if more than one indeD 0uffer .per strin< ) is pro7ided. .#) :@. '(A* allocates indeD 0uffers for all cluster types, e7en if the 0uffers are ne7er used..#) :1. B+$" and B+$"I are prefera0le to B+$$!)(PA%!. .#) ;=. (#)"& is used for sharin< data sets across re<ions. .#) ;1. ata 0uffers and control 0locks are allocated 0elow 1:* 0y default. .#) ;,. 5ar<e control inter7als decrease 7irtual stora<e re8uirement for 0uffers. .$) ;2. Buffer space specified at A%B o7errides the defined 7alue, if the A%B 7alue is more. .$) ;6. #he default for !$I"! %5+(#!) is !)A(!. .$) ;9. A lar<e percenta<e of unused %I free space causes additional I/&s when accessin< the data set se8uentially. .#) (e8uential processin< does not use %I free space 0eyond the free space threshold. .#) ;:. #he lar<er the free space, the more are the le7els of indeD. .#) ;;. Impro7ed %I .I%I) access is a7aila0le for lo<ical record processin< as well as %"' processin<. .$) ;@. Processin< a lar<e data set with multiple eDtents in I) mode performs approDimately as well as processin< a lar<e sin<le eDtent data set in I) mode. .$) ;1. I*B! replicates the se8uence set %I associated with a data %A on the first track of data %A. @=. )!P5I%A#! im0eds the indeD set within the data component. .$) @1. In a multiple 7olume data set the first allocation of space on a 7olume is always a primary allocation. .#) @,. IndeD key compression can 0e suppressed with the "&%&*P)!(( parameter. .$) @2. $or se8uential processin< lar<er data %Is are desira0le. .#) @6. Eey compression applies to the keys of 0oth indeD and data components. .$) @9. *ultiple alternate indeDes may 0e defined o7er a 0ase cluster. .#) @:. Alternate indeDes are spanned record data sets. .#) @;. #he siOe of an alternate indeD is a0out the same siOe of its 0ase cluster. .$) @@. AI/ records may 0e lon<er than specified in the !$I"! AI/ maDimum record siOe..#) @1. A path is re8uired so that an application pro<ram can specify 0ase cluster keys and retrie7e alternate indeD records. .#) 1=. Base cluster must 0e empty for B5 I" !/. .$) 11. +p<rade is done only for non-empty alternate indeDes. .#)

1,. After reor<aniOin< a E( (, the physical se8uence of data is same as the lo<ical se8uence of data. .#) 12. IndeD component is howe7er not reconstructed, after the reor<aniOation of a E( (. .$) 16. !/P&)# eDtracts catalo< information and creates a copy of the data records. .#) 19. )ecords lar<er than 2,;:= cause !/P&)# in %I*& ! to terminate with an error. .$) 1:. %I*& ! is the default for !/P&)# of an 5 (. .#) 1;. #he 0ase cluster must 0e imported 0efore the alternate indeDes. .#) 1@. #he 0ase cluster must 0e eDported 0efore the alternate indeDes .$) 11. $ (( can 0e used to reor<aniOe a E( (. .#) 1==.If the >IG>-+(! -)BA of the I*P&)# &+# A#A(!# parameter is Oero, then '(A* deletes and redefines the &+# A#A(!# 0efore the I*P&)# operation. .$) 1=1.I(*$ can 0e used to create a $>(* 0atch No0 stream. .#) 1=,. ata (et 5ist line operator commands may effect more than one data set. .#)

)&C#ION "
Choose the 3orre3t ans5erE 1) Chich '(A* clusters support only fiDed len<th recordsQ a) 5 ( 0) )) ( c) !( ( d) E( ( ,) $)!!(PA%! can 0e specified for which type of clusterQ a) 5 ( 0) )) ( c) !( ( d) E( ( 2) In which cluster type are records added at the end of the data setQ a) 5 ( 0) )) ( c) !( ( d) E( ( 6) #he types of processin< supported 0y )) ( are a) se8uential 0) skip-se8uential c) direct d) a and 0 e) a, 0 and c 9) #he types of processin< supported 0y !( ( are a) se8uential 0) skip-se8uential c) direct d) a and 0 e) a and c :) (panned records can 0e found in a) !( ( 0) E( ( c) )) ( d) a or 0 e) a or c .0)

.d)

.c)

.e)

.d)

.d)

;) (panned records can 0e accessed in a) *&'! 0) 5&%A#! c) a and 0 d) "one @) Alternate IndeD is a special type of a) E( ( 0) !( ( c) )) ( d) "one 1) (pecifyin< %I(4.6=1:) at the cluster le7el for a E( ( results in a) '(A* i<norin< the specification 0) ata and indeD %I(4 6k each c) ata %I(4 6kI indeD %I(4 selected 0y '(A* d) IndeD %I(4 6EI data %I(4 selected 0y '(A* 1=) Chen definin< a E( (, which of the followin< parameters is not re8uiredQ a) (pace allocation .either %A5, )!% or #)E) 0) '&5+*!( c) E!A( d) "A*! 11) efault )!%&) (I4! for a "&"(PA""! data set is a) .@= @=) 0) .6=@: 2,:==) c) .1== 2,:==) d) .6=@1 6=@1)

.a)

.a)

.c)

.0)

.d)

1,) If the key of a E( ( record 0e<ins in the second field .first field is ,9 0ytes lon<), the offset in the E!A( parameter is .a) a) ,6 0) ,9 c) ,: d) "one 12) ata or<aniOation in E( ( is a) I" !/! 0) "+*B!)! c) 5I"!A) d) "&"I" !/! .a)

16) #he default cluster type is a) !( ( 0) )) ( c) 5 ( d) E( ( 19) '&5+*!( parameter can 0e specified at a) cluster le7el 0) data le7el and indeD le7el c) All the a0o7e d) "one 1:) #he )!%&) (I4! parameter cannot 0e coded for a) !( ( 0) )) (

.d)

.c)

.c)

c) 5 ( d) E( ( 1;) #he default P)I"# format is a) %haracter 0) ump c) >eDadecimal d) "one .0)

1@) Chich of the followin< )!P)& selection parameters can 0e specified for an 5 (Q .e) a) $)&*E!A 0) $)&*A )!(( c) $)&*"+*B!) d) (EIP e) "one 11) #he )!P5A%! parameter causes a) E( ( records to 0e replaced 0y an input record with the same key 0) !( ( records to 0e replaced 0y an input record with the same )BA c) )) ( records to 0e replaced 0y an input record with the same ))" d) a and c e) All the a0o7e ,=) Chich of the followin< is not a modal commandQ a) I$ 0) #>!" c) !5(! d) & e) G&#& ,1) +sin< )!P)& to reor<aniOe a E( (, which of the followin< is trueQ a) Input must 0e ascendin< key se8uence. 0) "o duplicate keys are allowed. c) "on-uni8ue keys are allowed. d) a and c e) a and 0 ,,) Chich of the followin< entry names are 7alid for A5#!) $)!!(PA%!Q a) %luster name 0) ata component name c) IndeD component name d) 0 and c e) a, 0 and c .c)

.e)

.e)

.0)

,2) Chich of the followin< is a correct <eneric name specification for #!(#.+(!). A#A.AQ .a) a) #!(#.+(!).L 0) #!(#.L.L.A c) L.+(!). A#A.A d) #!(#.+(!).L.A ,6) #o alter a cluster to an 5 (, the cluster must a) 0e an !( ( 0) 0e "&"(PA""! c) ha7e a %I(4 of 6E d) not ha7e an alternate indeD associated with it e) all the a0o7e ,9) $or which access mode 0elow must the application pro<ram interpret ) $sQ .e)

.0)

a) 0) c) d) e)

E!A A ) A ).for a E( () %"' "one .d)

,:) At &P!", '(A* determines processin< options in the followin< order a) P%5, pro<ram, catalo< 0) pro<ram, P%5, catalo< c) P%5, catalo<, pro<ram d) catalo<, pro<ram, P%5 e) "one ,;) '(A* re8uest macros .e.<., G!#, P+#) point to which other macrosQ a) &P!" 0) A%B c) )P5 d) %5&(! e) 0 and c f) "one

.c)

,@) If a pro<ram uses direct processin< eDclusi7ely, I) is specified in which macrosQ .c) a) &P!" 0) A%B c) )P5 d) %5&(! e) 0 and c f) "one ,1) '(A* processin< options could 0e specified in a) %atalo< 0) Pro<ram control 0locks c) P%5 d) "one e) All the a0o7e 2=) Chich of the followin< is not a %&B&5 7er0Q a) (#A)# 0) )!A c) !5!#! d) +P A#! e) )!C)I#! 21) Chich of the followin< is/are not supported 0y %&B&5Q a) (kip-se8uential processin< 0) )BA addressin< c) )eplacin< eDistin< record d) a and 0 e) a, 0 and c f) a and c 2,) Chich is a 7alid (>A)!&P#I&"( specificationQ a) (>)., ,) 0) (>)., 2) c) (>).6 1) d) (>).1 ,) e) "one .e)

.d)

.d)

.0)

22) $or a data set defined with (P!! , which of the followin< is trueQ .a) a) (P!! is effecti7e for the initial load only. 0) (P!! is effecti7e for all additions to the data set after initial load. c) If the load pro<ram AB!" (, '!)I$A can determine the >IG>-+(! -)BA of the data set. d) If the load pro<ram AB!" (, only those records remainin< in 0uffers need to 0e added to the data set. e) "one 26) '!)I$A cannot 0e used for a) !mpty data set 0) 5 ( c) a and 0 d) "one 29) $or a data set defined with "&!)A(!, which of the followin< is not trueQ a) esira0le for sensiti7e data 0) )emo7es catalo< entries c) All the a0o7e d) "one 2:) Buffer space cannot 0e specified in which of the followin<Q a) statement 0) Assem0ler pro<ram c) A*( !$I"! d) %&B&5 pro<ram 2;) >ow many data 0uffers are re8uired for se8uential processin< to o7erlap I/& processin<Q a) , 0) 2 c) 6 d) 9 2@) Chen definin< a E( (, the 0est place to specify %I(4 is <enerally .0) a) At the cluster le7el 0) At the data le7el only c) At the indeD le7el only d) At 0oth data and indeD le7els 21) $or direct processin< the recommended num0er of data 0uffers is a) (#)"& 0) (#)"&?1 c) (#)"&?, d) (#)"&?2 e) "one .0) .c)

.a)

.d)

.c)

6=) $or 22@= A( , #)E.9= 9) results in which %A siOe for a E( ( defined with "&I*B! Q .0) a) 1 #)E 0) 9 #)E( c) 19 #)E( d) 9= #)E( e) "one 61) (uppose you are definin< a multi-7olume data set with '&5.A B) and fi7e key ran<es specified. Chich of the followin< correctly indicates where each key ran<e will 0e locatedQ .c) a) $irst key ran<e on '&5 AI second on BI third on AI etc.

0) c) d) e)

$irst key ran<e on '&5 BI second on AI third on BI etc. $irst key ran<e on '&5 AI remainin< key ran<es on B. All key ran<es on '&5 AI B is used for o7erflow only. All key ran<es on '&5 BI A is used for o7erflow only.

6,) An alternate indeD can 0e defined for which cluster typeQ .0) a) E( ( and )) ( 0) E( ( and !( ( c) E( ( and 5 ( d) E( ( only e) E( (, !( ( and )) ( 62) If an application pro<ram accesses a 0ase cluster in alternate key se8uence, then needed for which data setsQ .f) a) Base cluster 0) Alternate indeD c) Path d) a and 0 e) a and c f) a, 0 and c 66) An alternate indeD itself is which cluster typeQ .d) a) 5 ( 0) )) ( c) !( ( d) E( ( e) "one 69) Chich of the followin< 0acks up data in %I modeQ .0) a) )!P)& only 0) !/P&)# only c) Both )!P)& and !/P&)# d) "either )!P)& nor !/P&)# 6:) Chich of the followin< writes catalo< information into the 0ackup data setQ .0) a) )!P)& only 0) !/P&)# only c) Both )!P)& and !/P&)# d) "either )!P)& nor !/P&)# 6;) Chich of the followin< re8uires a !5!#!/ !$I"! 0efore the command can 0e used to restore an eDistin< data setQ .a) a) )!P)& only 0) I*P&)# only c) Both )!P)& and I*P&)# d) "either )!P)& nor I*P&)# 6@) Cith >BA%E ( the use of apostrophes to enclose the dsname is .0) a) )e8uired 0) +sed to eDclude the #(& id as the hi<h le7el 8ualifier c) )e8uired only if one or more se<ments are specified <enerically statements are

d) "ot allowed if the data set is password protected

)&C#ION *
$ns5er the fo o5ing !rief yE 1. ,. 2. 6. 9. :. ;. @. 1. 1=. 11. 1,. 12. 16. 19. 1:. 1;. 1@. 11. ,=. ,1. ,,. ,2. ,6. ,9. ,:. ,;. ,@. ,1. 2=. 21. 2,. 22. 26. 29. 2:. 2;. 2@. 21. 6=. 61. 6,. 62. 66. 69. 6:. 6;. 6@. 61. 9=. ifferentiate 0etween %ontrol Inter7al and %ontrol Area. >ow many 0ytes of control information are there if all records are of the same len<thQ(pecify the num0er of 0ytes used 0y ) $s and %I $s. ifferentiate 0etween irect and (e8uential processin<. Chat types of data sets are supported 0y '(A*Q Chat is a clusterQ (pecify the default action of '(A* if the specified %I(4 is not 7alid in definin< the cluster. >ow are records stored in each type of '(A* data setQ Chat is the function performed 0y '(A* A5#!)Q Chat is the difference 0etween a user catalo< and a master catalo<Q >ow do you specify the amount of %I to 0e usedQ >ow do you specify the amount of %A a7aila0le to a fileQ !Dplain the need for free space. Chat does it imply, if $(P%.1== 1==) is specified in !$I"! %5+(#!) commandQ Chat is A*(Q >ow are its ser7ices in7okedQ escri0e the 7arious le7els of password protection. Chat is the format of (>A)!&P#I&"( and why is it usedQ In what manner the '(A* data sets can 0e shared with (>A)!&P#I&"., 2)Q *ention some of the important types of information that can 0e o0tained from 5I(#%A#. >ow can you check the amount of free space a7aila0le for a data setQ >ow can we o0tain the status of a master catalo< or a user catalo<Q Chat is a '(A* modelQ Chat is a reusa0le data setQ Chat is the function performed 0y '(A* )!P)&Q Chat is the effect of )!+(! with )!P)&Q Chat is the effect of )!P5A%! with )!P)&Q Chat is the function performed 0y P)I"#Q Chat is a data classQ *ention some of the P%5 parameters used for '(A*. >ow can you 7iew the contents of a ata %lassQ ifferentiate 0etween lo<ical record access and control inter7al access. ifferentiate 0etween *&'! mode and 5&%A#! mode. Chat happens when a '(A* data set is re8uested for &P!"Q Chat is A*P and when would you use itQ Chat is IIP and when is it usedQ *ention some of the %&B&5 procedure di7ision 7er0s used for processin< a '(A* data set. Chat are the limitations of %&B&5 in processin< a '(A* data setQ >ow can a '(A* data set 0e shared within a re<ionQ Chat is the effect of (P!! /)!%&'!)A with !$I"! %5+(#!)Q Chat is the purpose of '!)I$A commandQ Chat is the effect of !)A(!/"&!)A(! with !5!#! %5+(#!)Q Chat is an +(')Q Chat are its functionsQ Chat is the purpose of free spaceQ Chat function is performed 0y I*B! parameterQ Chat function is performed 0y )!P5I%A#! parameterQ Chat is the purpose of 0uffer spaceQ !Dplain the terms front and rear key compressions. !Dplain the need for an alternate indeD. Chat is a PA#>Q Chat functions does the +PG)A ! option doQ Chat is the function of B5 I" !/Q

91. 9,. 92. /,. //. /8.

Chat are the 7arious utilities a7aila0le for 0ackin< up of data and restorin< itQ Chy do we <o for reor<aniOin< a E( (Q Chat are the effects of reor<aniOation of a E( (Q 0hat is control interval 7 0hat is K*D*, 3*D*,&&D* 7 0hat is 93&I:; on 9*)< file 7

S-ar putea să vă placă și