COBOL Interview Questions Answers 1 | Notation | Software Engineering\nInterview Basics - Mainframe: COBOL\n1.Name the divisions in a COBOL program. IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION, PROCEDURE DIVISION. 2.What are the different data t pes avai!a"!e in COBOL# Alpha-numeric ( !, alpha"e#ic (A! an$ numeric (%!. $.What does the INI%I&LI'( ver" do# Alpha"e#ic, Alphanumeric &iel$' ( alphanumeric e$i#e$ i#em' are 'e# #) SPACES. Numeric, Numeric e$i#e$ i#em' 'e# #) *ERO. FI++ER , OCCURS DEPENDIN, ON i#em' le&# un#)uche$. ).What is ** !eve! +sed for # Elemen#ar- le.el i#em. Cann)# "e 'u"$i.i'i)n' )& )#her i#em' (cann)# "e /uali&ie$!, n)r can #he- "e 'u"$i.i$e$ #hem'el.e'. ,.What is -- !eve! +sed for # F)r c)n$i#i)n name'. ..What is !eve! .. +sed for # F)r RENAMES clau'e. *.What does the I/ N0M(1IC c!a+se esta"!ish # IS NUMERIC can "e u'e$ )n alphanumeric i#em', 'i0ne$ numeric ( pac1e$ $ecimal i#em' an$ un'i0ne$ numeric ( pac1e$ $ecimal i#em'. IS NUMERIC re#urn' TRUE i& #he i#em )nl- c)n'i'#' )& 2-%. 3)4e.er, i& #he i#em "ein0 #e'#e$ i' a 'i0ne$ i#em, #hen i# ma- c)n#ain 2-%, 5 an$ - . -.2ow do o+ define a ta"!e3arra in COBOL# 26 ARRA7S. 28 ARRA76 PIC (%! OCCURS 62 TIMES. 28 ARRA79 PIC (:! OCCURS 92 TIMES INDE ED ;7 <S-INDE . 4.Can the OCC01/ c!a+se "e at the 51 !eve!# N). 15.What is the difference "etween inde6 and s+"script# Su"'crip# re&er' #) #he arra- )ccurrence 4hile in$e= i' #he $i'placemen# (in n) )& "-#e'! &r)m #he "e0innin0 )& #he arra-. An in$e= can )nl- "e m)$i&ie$ u'in0 PERFORM, SEARC3 ( SET. Nee$ #) ha.e in$e= &)r a #a"le in )r$er #) u'e SEARC3, SEARC3 A++. 11.What is the difference "etween /(&1C2 and /(&1C2 &LL# SEARC3 - i' a 'erial 'earch.\nSEARC3 A++ - i' a "inar- 'earch ( #he #a"le mu'# "e ')r#e$ ( ASCENDIN,>DESCENDIN, ?E7 clau'e #) "e u'e$ ( $a#a l)a$e$ in #hi' )r$er! "e&)re u'in0 SEARC3 A++. 12.What sho+!d "e the sorting order for /(&1C2 &LL# I# can "e ei#her ASCENDIN, )r DESCENDIN,. ASCENDIN, i' $e&aul#. I& -)u 4an# #he 'earch #) "e $)ne )n an arra- ')r#e$ in $e'cen$in0 )r$er, #hen 4hile $e&inin0 #he arra-, -)u 'h)ul$ 0i.e DESCENDIN, ?E7 clau'e. (7)u mu'# l)a$ #he #a"le in #he 'peci&ie$ )r$er!. 1$.What is "inar search# Search )n a ')r#e$ arra-. C)mpare #he i#em #) "e 'earche$ 4i#h #he i#em a# #he cen#er. I& i# ma#che', &ine el'e repea# #he pr)ce'' 4i#h #he le&# hal& )r #he ri0h# hal& $epen$in0 )n 4here #he i#em lie'. 1).M program has an arra defined to have 15 items. 7+e to a "+g8 I find that even if the program access the 11th item in this arra 8 the program does not a"end. What is wrong with it# Mu'# u'e c)mpiler )p#i)n SSRAN,E i& -)u 4an# arra- ")un$' chec1in0. De&aul# i' NOSSRAN,E. 1,.2ow do o+ sort in a COBOL program# 9ive sort fi!e definition8 sort statement s nta6 and meaning. S-n#a=@ SORT &ile-6 ON ASCENDIN,>DESCENDIN, ?E7 1e-.... USIN, &ile-9 ,IVIN, &ile-A. USIN, can "e 'u"'#i#u#e$ "- INPUT PROCEDURE IS para-6 T3RU para-9 ,IVIN, can "e 'u"'#i#u#e$ "- OUTPUT PROCEDURE IS para-6 T3RU para-9. &ile-6 i' #he ')r# 4)r1&ile an$ mu'# "e $e'cri"e$ u'in0 SD en#r- in FI+E SECTION. &ile-9 i' #he inpu# &ile &)r #he SORT an$ mu'# "e $e'cri"e$ u'in0 an FD en#r- in FI+E SECTION an$ SE+ECT clau'e in FI+E CONTRO+. &ile-A i' #he )u#&ile &r)m #he SORT an$ mu'# "e $e'cri"e$ u'in0 an FD en#r- in FI+E SECTION an$ SE+ECT clau'e in FI+E CONTRO+. &ile-6, &ile-9 ( &ile-A 'h)ul$ n)# "e )pene$ e=plici#l-. INPUT PROCEDURE i' e=ecu#e$ "e&)re #he ')r# an$ rec)r$' mu'# "e RE+EASE$ #) #he ')r# 4)r1 &ile &r)m #he inpu# pr)ce$ure. OUTPUT PROCEDURE i' e=ecu#e$ a&#er all rec)r$' ha.e "een ')r#e$. Rec)r$' &r)m #he ')r# 4)r1 &ile mu'# "e RETURNe$ )ne a# a #ime #) #he )u#pu# pr)ce$ure. 1..2ow do o+ define a sort fi!e in :CL that r+ns the COBOL program# U'e #he SORT<?26, SORT<?29,..... $$ name' in #he '#ep. Num"er )& ')r# $a#a'e#' $epen$' )n #he .)lume )& $a#a "ein0 ')r#e$, "u# a minimum )& A i' re/uire$. 1*.What are the two wa s of doing sorting in a COBOL program# 9ive the formats.\ne '#m# impera#i. #he c)n#r)l i' au#)ma#icall.Cann)# ma''a0e rec)r$'. The $i&&erence "e#4een EVA+UATE an$ ca'e i' #ha# n) B"rea1B i' re/uire$ &)r EVA+UATE i.#ha# para0raph #) "e per&)rme$. 21.e. 14. 2).e '#m# END-EVA+UATE END-EVA+UATE 22.e '#m# impera#i. 1-.What is the difference "etween performing a /(C%ION and a <&1&91&<2# Per&)rmin0 a SECTION 4ill cau'e all #he para0raph' #ha# are par# )& #he 'ec#i)n.e '#m# END-EVA+UATE END-EVA+UATE EVA+UATE SC+CODE A+SO AD.2ow do o+ come o+t of an (. c)n#r)l c)me' )u# )& #he EVA+UATE a' '))n a' )ne ma#ch i' ma$e.e '#m# <3EN (D5 !>7 D E <3EN -A28 A+SO BA9B impera#i.See /ue'#i)n 6:.What is the +se of (. Per&)rmin0 a PARA.&L0&%( statement# EVA+UATE VA+UATE SC+CODE A+SO FI+E-STATUS <3EN AD.&L0&%( statement# A&#er #he e=ecu#i)n )& )ne )& #he 4hen clau'e'. impera#i.e '#m# <3EN OT3ER <3EN OT3ER impera#i.IN9 in /O1% statement. #) "e per&)rme$. AND CDD <3EN 622 A+SO B22B impera#i. Re'#ric#i)n' .e '#m# <3EN -A28 A+SO FA+SE <3EN -A28 A+SO (A>CDE! impera#i.e '#m# impera#i.e=#ra c)$e.What is a scope terminator# 9ive e6amp!es.e '#m# impera#i.In an (. What are the restrictions with it# See /ue'#i)n 6:. There i' n) nee$ )& an.9ive the format of 0/IN9 and 9I.pa''e$ )n #) #he ne=# 'en#ence a&#er #he EVA+UATE '#a#emen#.What are the different forms of (. EVA+UATE SC+CODE A+SO TRUE <3EN 622 A+SO TRUE <3EN 622 A+SO AD. 25.&L0&%( statement# E.RAP3 4ill cau'e )nl.e '#m# impera#i.alua#e i' li1e a ca'e '#a#emen# an$ can "e u'e$ #) replace ne'#e$ I&'.&L0&%( statement8 can I give a comp!e6 condition on a when c!a+se# 7e'. 2$. can)# 'elec# rec)r$' #) "e ')r#e$. .\ner" e.)& #he per&)rm i' a 0eneric #-pe )& c)$e (u'e$ &r)m . DISP+A7 <S-TOP 4ill 'h)4 6 4hile DISP+A7 <S-TOP-RED 4ill 'h)4 69.er" an$ #he line num"er )& #he ')urce c)$e a# #hi' )&&'e#. Man. 24.. Re$e&ine' Ju'# cau'e' ")#h &iel$' #) '#ar# a# #he 'ame l)ca#i)n. i# 4)ul$ "e "e##er #) pu# #he c)$e in a 'epara#e para an$ u'e PERFORM paraname ra#her #han in-line per&)rm.ice' #hru a''em"l.. I& -)u MOVE B69B #) <S-TOP-RED. -)u 4ill ha. E=amine #he c)mpila#i)n )u#pu# REF li'#in0 #) 0e# #he .e #) $e&ine ')me $a#a'e#' (S7SA. Man.What is the difference "etween CON%IN0( > N(?% /(N%(NC( # CONTINUE i' li1e a null '#a#emen# ($) n)#hin0! .&ir'#. Then -)u can l))1 a# #he ')urce c)$e #) &in$ #he "u0.. . GUNTI+H . E=amine #ha# p)''i"ili#.#ime' #he rea')n &)r SOCK i' an un-ini#ialiLe$ numeric i#em.Can I redefine an ?@255A fie!d with a fie!d of ?@155A # 7e'.When wo+!d o+ +se in-!ine perform# <hen #he ")$.i$e -)u a $ump &)r run #ime a"en$' ( i# can "e 0enera#e$ al') ". END-IF.What do o+ do to reso!ve /OC-* error# . G'en#ence'H END PERFORM 2. ENDEVA+UATEF IF. EVA+UATE. $5.Can I redefine an ?@155A fie!d with a fie!d of ?@255A# 7e'.a'icall.in'#alla#i)n' pr). $5. mu'# "e #he )nl..Sc)pe #ermina#)r i' u'e$ #) mar1 #he en$ )& a .What does (?I% do # D)e' n)#hin0 I I& u'e$.a peri)$! 2-. F)r e=ample@ 26 <S-TOP PIC (6! 26 <S-TOP-RED REDEFINES <S-TOP PIC (9!. 4hile NE T SENTENCE #ran'&er' c)n#r)l #) #he ne=# 'en#ence (II! (A 'en#ence i' #ermina#e$ ".2ow do o+ do in-!ine <(1=O1M# PERFORM .OUT e#c ! in #he MC+.'en#ence 4i#hin a para0raph.-)u nee$ #) c)rrec#in0 #he )&&en$in0 $a#a..lan0ua0e!. T) 0e# cap#ure #he run#ime $ump'. 2*. I& #he ")$.0.ari)u' )#her place' in #he pr)0ram!. The'e $ump' pr).)& #he per&)rm 4ill n)# "e u'e$ in )#her para0raph'.i$e #he )&&'e# )& #he la'# in'#ruc#i)n a# 4hich #he a"en$ )ccurre$..callin0 ')me 'u"r)u#ine' )r OS 'er. 2.\ne.en.e "a#ch pr)0ram $e"u00in0 #))l'. u'e Ju$0emen# an$ DISP+A7 #) l)caliLe #he ')urce )& err)r.$a#a i#em'. Si0n i' '#)re$ a' he= .2ow is sign stored in <acBed 7ecima! fie!ds and 'oned 7ecima! fie!ds# Pac1e$ Decimal &iel$'@ Si0n i' '#)re$ a' a he= .2ow man " tes does a /4@*A COM<-$ fie!d occ+p # <ill #a1e E "-#e'. *)ne$ Decimal &iel$'@ A' a $e&aul#.E COMP-6.3T.i# i' )n i& -. he= 6C i& -)ur num"er i' 626. F)r e=ample i& -)ur num"er i' 5622. $1. $*.2ow man " tes wi!! a /4@-A COM< fie!d occ+p # E "-#e'. $2.Sin0le preci'i)n &l)a#in0 p)in#. 2ow is sign stored in a COM< fie!d # In #he m)'# 'i0ni&ican# "i#.alue '#)re$ in #he la'# "i#e.2ow man " tes does a /4@*A /I9N %1&ILIN9 /(<&1&%( fie!d occ+p # <ill )ccup.e. U'e' E "-#e'.eneral &)rmula i' INT((n>9! 5 6!!. 4here nDK in #hi' e=ample.What is the difference "etween COM< > COM<-$ # COMP i' a "inar. COMP-9 . $).alue in #he la'# ni""le.What is COM< /CNC# Cau'e' #he i#em #) "e ali0ne$ )n na#ural ")un$arie'.. he= 9D i& #he num"er i' -629 e#c.What is COM<-1# COM<-2# COMP-6 .D)u"le preci'i)n &l)a#in0 p)in#.er punche$ 4i#h #he numeric . U'e #hem.. $$.What is the ma6im+m va!+e that can "e stored in /4@-A COM<# %%%%%%%% )1... he= 9C i& -)ur num"er i' 629. $.N "-#e' ()ne e=#ra "-#e &)r 'i0n!.2ow do o+ define a varia"!e of COM<-1# COM<-2# N) pic#ure clau'e #) "e 0i. U'e' N "-#e'. )5. he= 6D i& #he num"er i' -626. #he a$$re'' re')lu#i)n i' &a'#er i& #he. . Can "e S7NC3RONI*ED +EFT )r RI. 'i0n i' ). S)me in'#all#i)n mi0h# ha.2ow is sign stored in a comp-$ fie!d# I# i' '#)re$ in #he la'# ni""le. F)r "inar. $.alue in #he la'# ni""le (E "i#' ! )& #he '#)ra0e. E=ample 26 <S-VAR USA. $-. i# '#)re' he= 2C in #he la'# "-#e. . $4.are l)ca#e$ a# 4)r$ . )&& i& 5.'#)ra0e &)rma# 4hile COMP-A i' pac1e$ $ecimal &)rma#.I& n)ne )& #he'e are help&ul.\n2ow do o+ reference the fo!!owing fi!e formats from COBOL programs: Fi=e$ . ?SDS VSAM &ile .ANISATION IS SECUENTIA+. MODE IS F.aria"le i' =(A! an$ ne=# )ne i' '%(E! c)mp.+OC? CONTAINS. e. Fi=e$ Un"l)c1e$ .U'e OR. )*.i'i"le ".What are different fi!e O<(N modes avai!a"!e in COBOL# Open &)r INPUT. U'e RECORDIN. S%(E! COMP 4ill '#ar# &r)m "-#e A ( a''umin0 #ha# i# '#ar#' &r)m 2 !. E TEND.&ir'# . I& m.#he S7NC clau'e.What is fi!e stat+s 42# +)0ic err)r.+OC? CONTAINS Varia"le . A+TERNATE RECORD ?E7 IS RRDS File .ANISATION IS INDE ED.0. 7)u mi0h# 'ee ')me 4a'#a0e )& mem)r-. U'e RECORDIN.+OC? CONTAINS 2. D) n)# c)$e #he E "-#e' &)r rec)r$ len0#h in FD ie MC+ rec len0#h 4ill "e ma= rec len0#h in p0m 5 E Varia"le Un"l)c1e$ . OUTPUT. MODE IS V.U'e OR. U'e RECORDIN.ANISATION IS RE+ATIVE. I& -)u 'peci&. .#he DD car$' Ju'# a' -)u 4)ul$ &)r &ile' re&erre$ #) in #he main pr)0ram.What is the mode in which o+ wi!! O<(N a fi!e for writing# OUTPUT.Can o+ 1(W1I%( a record in an (/7/ fi!e# Can o+ 7(L(%( a record from it# Can re4ri#e(rec)r$ len0#h mu'# "e 'ame!.What is fi!e stat+s $4 # .4)r$ 'iLe i' E "-#e'. (U'e RECFMDF.!. D) n)# c)$e E "-#e' &)r rec)r$ len0#h in FD ie MC+ rec len0#h 4ill "e ma= rec len0#h in p0m 5 E. .A in MC+ DC.In the :CL8 how do o+ define the fi!es referred to in a s+"ro+tine# Suppl. Thi' mean' #ha# each 4)r$ 4ill '#ar# &r)m an a$$re'' $i. )4. $) n)# u'e .O+ II@ 6:KKK968 )$.E.")un$arie' in #he mem)r-. RE+ATIVE ?E7 IS Prin#er File . a &ile i' )pene$ &)r inpu# an$ an a##emp# i' ma$e #) 4ri#e #) i#.ANISATION IS SECUENTIA+.. ). #hen #he "inar.+OC? CONTAINS 2.U'e OR.ANISATION IS SECUENTIA+. )-.. )). )2.ANISATION IS SECUENTIA+. . )n main &rame #he mem)r.+OC? CONTAINS 2 .ANISATION IS SECUENTIA+. MODE IS F. I-O.. "u# n)# $ele#e.U'e OR.What is the ma6im+m siDe of a 51 !eve! item in COBOL I# in COBOL II# In CO.ANISATION IS SECUENTIA+. "u# #he acce'' #) #hi' c)mpu#a#i)nal &iel$ i' &a'#er.U'e OR.l)c1 File .l)c1 File . ESDS VSAM &ile . #hen i& -)u $) n)# 'peci&. MODE IS V. E TEND ).U'e OR.U'e OR. U'e RECORDIN. MODE IS F. U'e RECORDIN. RECORD ?E7 IS. $) n)# u'e .U'e OR. F)r e=ample.S7NC.$a#a i#em 4ill '#ar# &r)m a$$re'' E.\nE IS POINTER i' 'upp)r#e$ )nl. 7)u ch))'e '#a#ic>$-namic lin1in0 ".What is &MO7(@2)A8 &MO7(@$1A8 1MO7(@2)A and 1MO7(@&NCA# @ app!ica"!e to on! M..calle$ r)u#ine 4ill al4a-' "e in i#' ini#ial '#a#e.Can re'i$e a").run in 9E "i# a$$re''in0 m)$e.2ow can o+ s+"mit a Eo" from COBOL programs# <ri#e MC+ car$' #) a $a#a'e# 4i#h >>======= S7SOUTD(A. The'e are c)mpile>lin1 e$i# )p#i)n'. U'e #hi' &)r A6 "i# pr)0ram' #ha# call 9E "i# pr)0ram'.+OC?SI*E )r RECFM "e#4een -)ur CO.2.Mi'ma#ch in +REC+ )r . a CA++ i$en#i&ier (a' )pp)'e$ #) a CA++ li#eral!.What is /tatic87 namic !inBing # In '#a#ic lin1in0.1.e )r "el)4 6: Me0 line. A '#a#icall.O+ p0m ( #he MC+ ()r #he $a#a'e# la"el!. VS C)")l II p0m' can run ei#her in 9E "i# )r A6 "i# a$$re''in0 m)$e'.calle$ 'u"r)u#ine 4ill n)# "e in i#' ini#ial '#a#e #he ne=# #ime i# i' calle$ unle'' -)u e=plici#l.A$$re''in0 m)$e.u'e INITIA+ )r -)u $) a CANCE+. . AMODE(AN7! Ei#her 9E "i# )r A6 "i# a$$re''in0 $epen$in0 )n RMODE. A $-namicall. AMODE .ir#ual '#)ra0e "el)4 6: Me0 line.What compi!er option wo+!d o+ +se for d namic !inBing# D7NAM. .r.in VS CO.What is //1&N9(8 NO//1&N9( # The'e are c)mpiler )p#i)n' 4. #he calle$ 'u"r)u#ine i' lin1-e$i#e$ in#) #he callin0 pr)0ram . Rep)r# 4ri#er i' 'upp)r#e$ )nl. RMODE(AN7! ./ COBOL II# OS>VS C)")l p0m' can )nl. RETURN-CODE 'h)ul$ n)# "e $eclare$ in -)ur pr)0ram. RMODE(9E! . .. (OS>VS C)")l p0m' u'e 9E "i# a$$re''e' )nl-!.# 'u"'crip# )u# )& ran0e chec1in0. 7)u 4ill 0e# &ile '#a#u' A% )n an OPEN. . . (E.E i' #he $e&aul# an$ i& ch)'en.9E "i# a$$re''in0. USA. .O+ II. De&ine a N2 "-#e rec)r$ la-)u# &)r #he &ile.What are the differences "etween O/ . 4hile in $-namic lin1in0.5.en i& -)u ch))'e NOD7NAM.INTRDR! 4here BAB i' )u#pu# cla''.). .A6 "i# a$$re''in0.Re'i$enc. NOSSRAN. an$ $a#a'e# 'h)ul$ "e )pene$ &)r )u#pu# in #he pr)0ram.2ow do o+ set a ret+rn code to the :CL from a COBOL program# M).ch))'in0 ei#her #he D7NAM )r NOD7NAM lin1 e$i# )p#i)n.Re'i$e' in ./3(/& (nterprise /erverA. RMODE . #he 'u"r)u#ine ( #he main pr)0ram 4ill e=i'# a' 'epara#e l)a$ m)$ule'.in OS>VS C)")l. ./ COBOL and .. 4ill #ran'la#e #) a D7NAMIC call!. AMODE(9E! . AMODE(A6! ..e a .alue #) RETURN-CODE re0i'#er. n) run #ime err)r 4ill "e &la00e$ i& -)ur in$e= )r 'u"'crip# 0)e' )u# )& #he permi''i"le ran0e.$.m)$e.\nO+ II."e 'u"$i. PROCEDURE DIVISION.ir)nmen#. i# i' p)''i"le.in VS CO. . +in1 e$i#)r.el i#em. Alphanumeric &iel$' ( alphanumeric e$i#e$ i#em' are 'e# #) SPACES.O+ II &)ll)4' ANSI N8 '#$'.-. crea#e plan ".O+ II.i$e$ #hem'el.GS AA! Alpha"e#ic. n)r can #he. Un$er CICS Call' "e#4een VS CO.in VS CO. I& D. Cann)# "e 'u"$i. Q3) What does the INITIALI ! verb do? . OCCURS DEPENDIN./ COBOL pgm from a . C)")l c)mpiler.in VS CO."in$in0 #he D. Q2) What are the different data types available in COBOL? A9! Alpha-numeric ( !. F1A Name the divisions in a COBOL program #.i'i)n' )& )#her i#em' (cann)# "e /uali&ie$!. A6! IDENTIFICATION DIVISION. OS>VS C)")l &)ll)4' ANSI KE '#$' 4hile VS CO. In CICS.le. Q%) What is && level $sed for ? . Numeric.e'. Sc)pe #ermina#)r' are 'upp)r#e$ )nl. .RM'. Q") What is ## level $sed for ? AE! Elemen#ar. ON i#em' le&# un#)uche$.What are the steps o+ go thro+gh whi!e creating a COBOL program e6ec+ta"!e# D. CICS #ran'la#)r (i& CICS p0m!. DATA DIVISION. EVA+UATE i' 'upp)r#e$ )nl.Re&erence m)$i&ica#i)n e0@ <S-VAR(6@9! i' 'upp)r#e$ )nl. FI++ER .O+ II. #hi' i' n)# p)''i"le.9 prec)mpiler(i& em"e$$e$ '/l u'e$!.9 pr)0ram. ENVIRONMENT DIVISION. alpha"e#ic (A! an$ numeric (%!.*./ COBOL II pgm # In n)n-CICS en. Numeric e$i#e$ i#em' 'e# #) *ERO.Can o+ ca!! an O/ .O+ II pr)0ram' are 'upp)r#e$.\ni& #he i#em "ein0 #e'#e$ i' a 'i0ne$ i#em.GS A6A! Search )n a ')r#e$ arra-. IS NUMERIC re#urn' TRUE i& #he i#em )nl. Q&) -o.GS A66! SEARC3 . 3)4e. Q12) What should be the sorting order for SE !"# $$? . . #hen i# ma. Q10) What is the difference between index and subscript? .er.la$se establish ? AK! IS NUMERIC can "e u'e$ )n alphanumeric i#em'. do yo$ define a table/array in COBOL? A%! N).find that e)en if the progra( access the 11th ite( in this arra'.i' a 'erial 'earch. I& i# ma#che'. Q') What is level '' $sed for ? A:! F)r RENAMES clau'e.>DESCENDIN. 'i0ne$ numeric ( pac1e$ $ecimal i#em' an$ un'i0ne$ numeric ( pac1e$ $ecimal i#em'. 5 an$ .c)n'i'#' )& 2-%. &ine el'e repea# #he pr)ce'' 4i#h #he le&# hal& )r #he ri0h# hal& $epen$in0 )n 4here #he i#em lie'.A8! F)r c)n$i#i)n name'. Q#) What does the I( N)*!+IC . the progra( does not abend* What is wrong with it? .'earch ( #he #a"le mu'# "e ')r#e$ ( ASCENDIN.c)n#ain 2-%.i' a "inar. C)mpare #he i#em #) "e 'earche$ 4i#h #he i#em a# #he cen#er. SEARC3 A++ .. ?E7 clau'e #) "e u'e$ ( $a#a l)a$e$ in #hi' )r$er! "e&)re u'in0 SEARC3 A++. Q1%) &' progra( has an arra' defined to ha)e 10 ite(s* +ue to a bug.\nQ1. USIN.OUTPUT PROCEDURE IS para-6 T3RU para-9.in FI+E SECTION an$ SE+ECT clau'e in FI+E CONTRO+.IVIN. &ile-A i' #he )u# &ile &r)m #he SORT an$ mu'# "e $e'cri"e$ u'in0 an FD en#r.. Q12) What is the use of E3 $4 5E state(ent? .#ha# para0raph #) "e per&)rme$.IVIN. &ile9 .>DESCENDIN. &ile-6.in FI+E SECTION an$ SE+ECT clau'e in FI+E CONTRO+. &ile-A.GS . &ile-9 ( &ile-A 'h)ul$ n)# "e )pene$ e=plici#l-. can "e 'u"'#i#u#e$ ". #) "e per&)rme$.) #ow do 'ou define a sort file in /"$ that runs the "010$ progra(? A6K! Per&)rmin0 a SECTION 4ill cau'e all #he para0raph' #ha# are par# )& #he 'ec#i)n. &ile-6 i' #he ')r# (4)r1! &ile an$ mu'# "e $e'cri"e$ u'in0 SD en#r. Per&)rmin0 a PARA.A68! S-n#a=@ SORT &ile-6 ON ASCENDIN.e "een ')r#e$. OUTPUT PROCEDURE i' e=ecu#e$ a&#er all rec)r$' ha. INPUT PROCEDURE i' e=ecu#e$ "e&)re #he ')r# an$ rec)r$' mu'# "e RE+EASE$ #) #he ')r# 4)r1 &ile &r)m #he inpu# pr)ce$ure. &ile-9 i' #he inpu# &ile &)r #he SORT an$ mu'# "e $e'cri"e$ u'in0 an FD en#r.. ?E7 1e-. Rec)r$' &r)m #he ')r# 4)r1 &ile mu'# "e RETURNe$ )ne a# a #ime #) #he )u#pu# pr)ce$ure.in FI+E SECTION.RAP3 4ill cau'e )nl. USIN. can "e 'u"'#i#u#e$ ".INPUT PROCEDURE IS para-6 T3RU para-9 ..\ne '#m# <3EN -A28 A+SO FA+SE impera#i.e EVA+UATE SC+CODE A+SO AD.e '#m# <3EN -A28 A+SO (A>CDE! impera#i.e.e '#m# END-EVA+UATE Q20) #ow do 'ou co(e out of an E3 $4 5E state(ent? ."rea1B i' re/uire$ &)r EVA+UATE i.e '#m# '#m# <3EN OT3ER impera#i.e '#m# <3EN -A28 A+SO BA9B impera#i. .e '#m# END-EVA+UATE END-EVA+UATE <3EN OT3ER impera#i. c)n#r)l c)me' )u# )& #he EVA+UATE a' '))n a' )ne ma#ch i' ma$e.e '#m# END-EVA+UATE EVA+UATE SC+CODE A+SO TRUE <3EN 622 A+SO AD. <3EN 622 A+SO TRUE impera#i. Q16) What are the different for(s of E3 $4 5E state(ent? 22B impera#i.e '#m# impera#i. impera#i.e '#m# <3EN (D5 !>7 D E impera#i.GS A96! 7e'.\n. $i'pla.replacin0 Ne=# Sen#ence 4i#h C)n#inue OOO Q2. . F)r e=ample@ 26 <S-TOP PIC (6! 26 <S-TOP-RED REDEFINES <S-TOP PIC (9!.4ri#in0 #he &)ll)4in0 c)$e e=ample. 'ee #he e&&ec# ".u#.! )nl. Chec1 )u# ". DISP+A7 <S-TOP 4ill 'h)4 6 4hile DISP+A7 <S-TOP-RED 4ill 'h)4 69.a# #he en$ )& #he la'# 9 '#a#emen#'. OOO N)#e#here i' a $)# (.'#a#emen#' (')rr.Bline AB. G'en#ence'H END-PERFORM Q2%) When would 'ou use in-line perfor(? A98! The.. GUNTI+H . #ha# i'.#he. #he c)n#r)l 0)e' #) #he ne=# 'en#ence in #he para0raph.Bline 9B.Bline 6B $i'pla.) What does E7-5 do ? A9K! 7e'.. )ne i& 'en#ence &)ll)4e$ ".Q22) What is a scope ter(inator? Gi)e exa(ples* A9A! PERFORM .!.appear )ne line here "ecau'e )& &)rma##in0 re'#ric#i)n'! I& 6 H 2 #hen ne=# 'en#ence en$ i& $i'pla.. Ne=# Sen#ence 4)ul$ #a1e #he c)n#r)l #) #he 'en#ence a&#er i# &in$' a &ull '#)p (. I& -)u MOVE B69B #) <S-TOP-RED.A $i'pla. Re$e&ine' Ju'# cau'e' ")#h &iel$' #) '#ar# a# #he 'ame l)ca#i)n.appear #) "e 'imilar. .\nS)me in'#alla#i)n mi0h# ha.ith a field of 01322) ? AA6! 7e'.er punche$ 4i#h #he numeric Q88) #ow is sign stored in a co(p-8 field? .#ime' #he rea')n &)r SOCK i' an un-ini#ialiLe$ numeric i#em. I& n)ne )& #he'e are help&ul.a'icall.e #) $e&ine ')me $a#a'e#' (S7SA.oned +eci(al fields? AA9! Pac1e$ Decimal &iel$'@ "i#' ! )& #he '#)ra0e.alue '#)re$ in #he la'# "i#e.-)u nee$ #) c)rrec#in0 #he )&&en$in0 $a#a. The'e $ump' pr).&ir'#.OUT e#c ! in #he MC+. E=amine #ha# p)''i"ili#. U'e #hem. E=amine #he c)mpila#i)n )u#pu# REF li'#in0 #) 0e# #he . F)r e=ample i& -)ur num"er i' 5622.e "a#ch pr)0ram $e"u00in0 #))l'. -)u 4ill ha.i$e -)u a $ump &)r run #ime a"en$P' ( i# can "e 0enera#e$ al') ". i# '#)re' he= 2C in #he la'# "-#e. 'i0n i' ).alue in #he la'# ni""le (E A' a $e&aul#.GS AAA! I# i' '#)re$ in #he la'# ni""le.i$e #he )&&'e# )& #he la'# in'#ruc#i)n a# 4hich #he a"en$ )ccurre$.in'#alla#i)n' pr).ice' #hru a''em"l. *)ne$ Decimal &iel$'@ .callin0 ')me 'u"r)u#ine' )r OS 'er. Q82) #ow is sign stored in 9ac:ed +eci(al fields and .Q2&) Can I redefine an 01222) field . Man. Man. Si0n i' '#)re$ a' a he= .lan0ua0e!. he= 6C i& . u'e Ju$0emen# an$ DISP+A7 #) l)caliLe #he ')urce )& err)r. T) 0e# cap#ure #he run#ime $ump'.er" an$ #he line num"er )& #he ')urce c)$e a# #hi' )&&'e#. Then -)u can l))1 a# #he ')urce c)$e #) &in$ #he "u0. Q81) What do yo$ do to resolve (OC4# error? 4 5( AA6! .\nill a (91&) CO*7 field o. :any bytes .'#)ra0e &)rma# 4hile COMP-A i' pac1e$ $ecimal &)rma#.Sin0le preci'i)n &l)a#in0 p)in#. Q"2) -o.i# i' ON i& -.$py ? AA%! <ill )ccup. Q39) -o.. .en. .. 4here nDK in #hi' e=ample.D)u"le preci'i)n &l)a#in0 p)in#. he= 6D i& #he num"er i' -626.e bet. do yo$ define a variable of CO*743? CO*742? AAK! N) pic#ure clau'e #) "e 0i. Q82) #ow (an' b'tes does a S6>=) "0&9-8 field occup' ? AAN! <ill #a1e E "-#e'..$py ? .alue in #he la'# ni""le.. he= 9C i& -)ur num"er i' 629. Q8%) -o. :any bytes does a (91#) (I5N T+AILIN5 (!7A+AT! field o. Si0n i' '#)re$ a' he= . E=ample 26 <S-VAR USA. OFF i& 5.N "-#e' ()ne e=#ra "-#e &)r 'i0n!.E COMP-6. Q8<) What is the differen. U'e' N "-#e'. is si6n stored in a CO*7 field ? 4 5( AAE! In #he m)'# 'i0ni&ican# "i#.-)ur num"er i' 626.eneral &)rmula i' INT((n>9! 5 6!!. Q8=) -o.een CO*7 8 CO*743 ? AA8! COMP i' a "inar.e. Q3') What is CO*743? CO*742? AA:! COMP-6 . U'e' E "-#e'. COMP-9 .e. he= 9D i& #he num"er i' Q629 e#c.\n7)u mi0h# 'ee ')me 4a'#a0e )& mem)r-. #hen i& -)u $) n)# 'peci&.4)r$ 'iLe i' E "-#e'.in6 file for:ats fro: COBOL pro6ra:s> AEE! Fi=e$ .#he S7NC clau'e.ANISATION IS SECUENTIA+. #hen #he "inar$a#a i#em 4ill '#ar# &r)m a$$re'' E.E.+OC? CONTAINS 2 . Can "e S7NC3RONI*ED +EFT )r RI.3T.e the follo.i:$: si=e of a 23 level ite: in COBOL I? in COBOL II? AEA! In CO. S%(E! COMP 4ill '#ar# &r)m "-#e A ( a''umin0 #ha# i# '#ar#' &r)m 2 !. Q"3) What is the :a.O+ II@ 6:KKK968 Q"") -o. "u# #he acce'' #) #hi' c)mpu#a#i)nal &iel$ i' &a'#er. do yo$ referen. I& m&ir'# . F)r e=ample.l)c1 File RECORDIN.AE2! E "-#e'. I& -)u 'peci&. )n main &rame #he mem)r. U'e OR.aria"le i' =(A! an$ ne=# )ne i' '%(E! c)mp.i'i"le ".i:$: val$e that .an be stored in (91&) CO*7? AE6! %%%%%%%% Q"2) What is CO*7 (<NC? AE9! Cau'e' #he i#em #) "e ali0ne$ )n na#ural ")un$arie'. #he a$$re'' re')lu#i)n i' &a'#er i& #he.are l)ca#e$ a# 4)r$ ")un$arie' in #he mem)r-. Thi' mean' #ha# each 4)r$ 4ill '#ar# &r)m an a$$re'' $i. U'e . MODE IS F.$a#a i#em'. . F)r "inar.S7NC. Q"3) What is the :a.\nRECORD ?E7 IS.ANISATION IS SECUENTIA+. .ANISATION IS SECUENTIA+.!.ANISATION IS SECUENTIA+. Q"%) What are different file O7!N :odes available in COBOL? AE8! Open &)r INPUT.U'e OR. U'e RECORDIN. E TEND Q"#) In the ?CL@ ho.ANISATION IS SECUENTIA+. . U'e RECORDIN.U'e OR.A in MC+ DC. ?SDS VSAM &ile .+OC? CONTAINS 2.+OC? CONTAINS Varia"le . RE+ATIVE ?E7 IS Prin#er File U'e OR. do yo$ define the files referred to in a s$bro$tine ? . OUTPUT.l)c1 File U'e OR. U'e RECORDIN.U'e OR. E TEND.ANISATION IS INDE ED. ESDS VSAM &ile U'e OR. U'e RECORDIN. MODE IS F.+OC? CONTAINS.ANISATION IS RE+ATIVE.hi. D) n)# c)$e #he E "-#e' &)r rec)r$ len0#h in FD ie MC+ rec len0#h 4ill "e ma= rec len0#h in p0m 5 E Varia"le Un"l)c1e$ U'e OR.ANISATION IS SECUENTIA+. I-O. $) n)# u'e . MODE IS V.ill O7!N a file for . A+TERNATE RECORD ?E7 IS RRDS File . (U'e RECFMDF. MODE IS F.h yo$ .Fi=e$ Un"l)c1e$ .ritin6? 4 5( AE:! OUTPUT. D) n)# c)$e E "-#e' &)r rec)r$ len0#h in FD ie MC+ rec len0#h 4ill "e ma= rec len0#h in p0m 5 E. Q"') What is the :ode in .+OC? CONTAINS 2. $) n)# u'e . MODE IS V.\nord fro: it? AEN! Can re4ri#e (rec)r$ len0#h mu'# "e 'ame!. A '#a#icall. e.calle$ 'u"r)u#ine 4ill n)# "e in i#' ini#ial '#a#e #he ne=# #ime i# i' calle$ unle'' -)u e=plici#l. a &ile i' )pene$ &)r inpu# an$ an a##emp# i' ma$e #) 4ri#e #) i#. and Ayna:i.. A $-namicall.O+ p0m ( #he MC+ ()r #he $a#a'e# la"el!. 4ill #ran'la#e #) a D7NAMIC call!. #he calle$ 'u"r)u#ine i' lin1-e$i#e$ in#) #he callin0 pr)0ram . linBin6 ? A86! In '#a#ic lin1in0. 7)u ch))'e '#a#ic>$-namic lin1in0 ". 4hile in $-namic lin1in0.0. Q"&) Can yo$ +!W+IT! a re. #he 'u"r)u#ine ( #he main pr)0ram 4ill e=i'# a' 'epara#e l)a$ m)$ule'. (E.calle$ r)u#ine 4ill al4a-' "e in i#' ini#ial '#a#e.ord in an !(A( file? Can yo$ A!L!T! a re.#he DD car$' Ju'# a' -)u 4)ul$ &)r &ile' re&erre$ #) in #he main pr)0ram. "u# n)# $ele#e.en i& -)u ch))'e NOD7NAM. 7)u 4ill 0e# &ile '#a#u' A% )n an OPEN. a CA++ i$en#i&ier (a' )pp)'e$ #) a CA++ li#eral!.ch))'in0 ei#her #he D7NAM )r NOD7NAM lin1 e$i# )p#i)n. Q%2) What is file stat$s 39 ? A82! Mi'ma#ch in +REC+ )r .u'e INITIA+ )r -)u $) a CANCE+. Q"9) What is file stat$s 92? 4 5( AE%! +)0ic err)r.+OC?SI*E )r RECFM "e#4een -)ur CO. . Q%3) What is (tati.AEK! Suppl.\n9E "i# a$$re''in0F AMODE(A6! . Q%") What is ((+AN5!@ NO((+AN5! ? A8E! The'e are c)mpiler )p#i)n' 4i#h re'pec# #) 'u"'crip# )u# )& ran0e chec1in0. linBin6? A8A! D7NAM.e a .Ei#her 9E "i# )r A6 "i# a$$re''in0 $epen$in0 )n RMODE. . n) run #ime err)r 4ill "e &la00e$ i& -)ur in$e= )r 'u"'crip# 0)e' )u# )& #he permi''i"le ran0e.Re'i$e' in . Q%3) What .E i' #he $e&aul# an$ i& ch)'en. Q%%) -o. do yo$ set a ret$rn .e )r "el)4 6: Me0 line. RMODE(AN7! . RETURN-CODE 'h)ul$ n)# "e $eclare$ in -)ur pr)0ram.Q%2) What is A*OA!12")@ A*OA!133)@ +*OA!12") and +*OA!1AN<)? 1appli. RMODE(9E! .ode to the ?CL fro: a COBOL pro6ra:? A88! M).a'icall.Can re'i$e a").AMODE '#an$' &)r A$$re''in0 m)$e an$ RMODE &)r Re'i$encm)$e. NOSSRAN.able to only *C(/!(A !nterprise (erver)D A89! The'e are c)mpile>lin1 e$i# )p#i)n'.alue #) RETURN-CODE re0i'#er. U'e #hi' &)r A6 "i# pr)0ram' #ha# call 9E "i# pr)0ram'.A6 "i# a$$re''in0 AMODE(AN7! .ir#ual '#)ra0e "el)4 6: Me0 line.o:piler option . (OS>VS C)")l p0m' u'e 9E "i# a$$re''e' )nl-!.o$ld yo$ $se for dyna:i. AMODE(9E! . .\nO+ II.run in 9E "i# a$$re''in0 m)$e. crea#e plan ".9 prec)mpiler (i& em"e$$e$ SC+ u'e$!. I.in VS CO. VS C)")l II p0m' can run ei#her in 9E "i# )r A6 "i# a$$re''in0 m)$e'.an yo$ s$b:it a Eob fro: COBOL pro6ra:s? A8:! <ri#e MC+ car$' #) a $a#a'e# 4i#h >>======= S7SOUTD (A. VI. Re&erence m)$i&ica#i)n e.in VS CO.O+ II pr)0ram' are 'upp)r#e$. Sc)pe #ermina#)r' are 'upp)r#e$ )nl."in$in0 #he D.Q%') -o. +in1 e$i#)r.in OS>VS C)")l.O+ II &)ll)4' ANSI N8 '#$'.@ <S-VAR(6@9! i' 'upp)r#e$ )nl. III.O+ II.0.INTRDR! 4here BAB i' )u#pu# cla''.$table? A8N! D.O+ II. EVA+UATE i' 'upp)r#e$ )nl.9 pr)0ram. De&ine a N2 "-#e rec)r$ la-)u# &)r #he &ile. .es bet. VII. II. Q%#) What are the differen.een O( C( COBOL and C( COBOL II? A8K! OS>VS C)")l p0m' can )nl. IV.E IS POINTER i' 'upp)r#e$ )nl.hile . an$ $a#a'e# 'h)ul$ "e )pene$ &)r )u#pu# in #he pr)0ram. I& D. Un$er CICS Call' "e#4een VS CO.RM'.reatin6 a COBOL pro6ra: e. USA.O+ II. OS>VS C)")l &)ll)4' ANSI KE '#$' 4hile VS CO. . CICS #ran'la#)r (i& CICS p0m!.in VS CO. C)")l c)mpiler.e.in VS CO. V. Q%&) What are the steps yo$ 6o thro$6h . Rep)r# 4ri#er i' 'upp)r#e$ )nl.\n)l$ &ea#ure' (READ7 TRACE.Q%9) Can yo$ .O TO'. an$ I# )&&er' enhance$ CICS 'upp)r#.er". Q'2) What are the differen. SEARC3 an$ STRIN. PERFORM. e#c! I# permi#' pr)0ram' #) "e l)a$e$ an$ a$$re''e$ a"). I# in#r)$uce' ne4 &ea#ure' (EVA+UATE. REPORT-<RITER. #hi' i' n)# p)''i"le.0.7 CONTE T.er"' are READ.en #) an e=i#.. n)# e. TO TRUE. In CICS. . ') #ha# all '#a#emen#' "e#4een #he . SET.O+ II . Q62) What is an in line PERFORM? When would you use it? Anything else to say about it? A:9! The PERFORM an$ END-PERFORM '#a#emen#' "rac1e# all CO. .O+ II 'upp)r#' '#ruc#ure$ pr)0rammin0 ".!. CA++. EVA+UATE.)&#en i# 4ill re&erence )#her PERFORM para0raph'. O#her c)mm)n CO.O+ e/ui.een COBOL and COBOL II? A:2! There are a# lea'# &i. ISAM. IF .it s.all an O( C( COBOL p6: fro: a C( COBOL II p6: ? A8%! In n)n-CICS en.pli. The in line PERFORM &)r rea$a"ili#. i# i' p)''i"le.'h)ul$ n)# e=cee$ a pa0e len0#h .alen# i' #) PERFORM )r PERFORM T3RU a para0raph.ir)nmen#.u'in0 in line Per&)rm' an$ e=plici# 'c)pe #ermina#)r'. END-IF. The CO.er" an$ i#' 'c)pe #ermina#)r are 0r)upe$ #)0e#her.e $i&&erence'@ CO.ope ter:inator? A:6! A 'c)pe #ermina#)r "rac1e#' i#' prece$in0 .e #he 6:-me0a"-#e line I# $)e' n)# 'upp)r# man. Q'3) What is an e.O+ II '#a#emen#' "e#4een #hem..es bet. In line PERFORM' 4)r1 a' l)n0 a' #here are n) in#ernal . e. E#c.\nCONTINUE 0i. E AMINE.c)n&u'e' m)'# main&rame pr)0rammer'.E-COUNTER.&O*O+ in the &O*O+ '' i-. (Thi' i' n)# )ne )& CO. CURRENTDA7.O+ II a pr)0ram c)mpile$ 4i#h a A6 "i# m)$e can "e Ba"). a' #h)u0h #he.O+ IIB' &iner implemen#a#i)n'!. Q6/) What is the signifi!an!e of 0abo1e the line0 and 0below the line0? A:8! .e' c)n#r)l #) #he ne=# .le-entation? A::! Par#ial li'#@ REMAR?S. In a n)rmal call #he.*A A:K! (6p!ain ca!! " conte6t " comparing it to other ca!!s.O+ II.#he calle$ pr)0ram. E 3I. READ7 TRACE an$ RESET TRACE. F+O<.c)n#e=# are pr)#ec#e$ &r)m m)$i&ica#i)n ".M in#r)$uce$ MVS> A archi#ec#ure in #he 6%N2B' a pr)0ramB' .e&)re I.'#)ra0e line. PA. NOMINA+ ?E7.e' c)n#r)l #) #he . Q6)) What &O*O+ !onst u!t is the &O*O+ '' E.4ere 1ep# un$er an ima0inar.er" a&#er #he e=plici# 'c)pe #ermina#)r. I#B' 'a&e'# #) u'e CONTINUE ra#her #han NE T SENTENCE in CO.are a"le #) "e m)$i&ie$.ir#ual '#)ra0e 4a' limi#e$ #) 6: me0'.A+(A$E -eant to e. <i#h CO.IT. TIME-OF-DA7. 4h) #en$ #) "e a li#eral min$e$ 0r)up. COUNT.Q63) What is the diffe en!e between "E#$ %E"$E"&E and &O"$'"(E? A:A! NE T SENTENCE 0i. STATE.e #he lineB ima0er.er" &)ll)4in0 #he ne=# peri)$.! Q66) What was e-o1ed f o.la!e? A:E! EVA+UATE can "e u'e$ in place )& #he ne'#e$ IF T3EN E+SE '#a#emen#'. . Pr)0ram' c)mpile$ 4i#h a 9E "i# m)$e can )nla$$re'' 6: M" )& 'pace. The parame#er' pa''e$ in a call ". F. (Thi' B"el)4 #he lineB. Ba").e #he 6: M" line.\n.. OUTPUT PROCEDURE ')r#' all)4 &)r $a#a manipula#i)n "e&)re an$>)r a&#er #he ')r#. Q67) 'f you we e .7 .TRACT FROM '#a#emen#'. The )#her c)mm)n u'a0eP' are "inar. Th)'e )& u' 4h)B.t o an inde5? AK2! <a1e up .IVIN.O+F i# i' per&)rme$ #hr)u0h MC+ an$ P.! USIN.a PIC (%%%! 4here a .7 .c)$e re&erence. I# i' #he par# )& #he calle$ pr)0ram 4here #he'e 'hare i#em' are $e&ine$. ')r#' are c)mpara"le #) e=#ernal ')r#' 4i#h n) e=#ra &ile pr)ce''in0F 9! INPUT PROCEDURE.u'a0e.MDSORT.t and an inde5 in a table definition? A:%! A 'u"'crip# i' a 4)r1in0 '#)ra0e $a#a $e&ini#i)n i#em. . I# i' un$er'#an$a"le 4i#h)u# an. apprecia#e #he le'')n m)re #han )#her'.i' #he $e&aul#. 7)u SET an in$e= #) a . efe able 9 a subs! i. AK9! C)mp i' a "inar.Q62) A:N! What is the lin3age se!tion? The lin1a0e 'ec#i)n i' par# )& a calle$ pr)0ram #ha# Blin1'B )r map' #) $a#a i#em' in #he callin0 pr)0ramB' 4)r1in0 '#)ra0e. Q64) What is the diffe en!e between a subs! i. 4hile c)mp-A in$ica#e' pac1e$ $ecimal. F*1A (6p!ain the difference "etween an interna! and an e6terna! sort8 the pros and cons8 interna! sort s nta6 etc.alue.an$ $i'pla-. An in$e= i' a re0i'#er i#em #ha# e=i'#' )u#'i$e #he pr)0ramB' 4)r1in0 '#)ra0e.assing a table 1ia lin3age8 whi!h is . AK6! An e=#ernal ')r# i' n)# CO.alue an$ SET i# UP .alue mu'# "e m). Di'pla.-)u ha.enB# "een pa-in0 a##en#i)nI I#B' n)# p)''i"le #) pa'' an in$e= .alue an$ DO<N . An in#ernal ')r# can u'e #4) $i&&eren# '-n#a=P'@ 6.ia lin1a0e.e ma$e #hi' mi'#a1e. #-picall. F*2A What is the difference "etween comp and comp-$ +sage# (6p!ain other COBOL +sageGs. The in$e= i' n)# par# )& #he callin0 pr)0ram' 4)r1in0 '#)ra0e.e$ #) #he 'u"'crip# an$ #hen incremen#e$ )r $ecremen#' "ADD TO an$ SU.\nO+ II #he )p#i)nal clau'e <IT3 TEST .$e&aul# #he #e'# i' per&)rme$ "e&)re #he per&)rm. (<e" n)#e@ Thi' chan0e i' n)# )ne )& CO.in0 #heir a'')cia#e$ .alue' #) #he rela#e$ $a#a i#em. before or after the perfor( execution? AKE! In CO. E. AK:! INITIA+I*E m). )p#i)n can "e u'e$ #) ). when is the conditional tested.&)r in-line PERFORMS an$ EVA+UATE '#a#emen#'. .A+($E state-ent is the o de of the W:E" !lauses signifi!ant? AK8! A"')lu#el-.alua#i)n )& #he <3EN clau'e' pr)cee$' &r)m #)p #) ")##)m an$ #heir 'e/uence can $e#ermine re'ul#'. Q=%) -n a "010$ -.O+ IIB' "e##er 'peci&ica#i)n'. Q6/) 'n an E. The REP+ACIN. Q66) AKK! What is %E$ $O $R(E all about8 anyway? In CO.! .9E!?0!& state(ent.el' can "e 'e# ra#her #han m).Q63) AKA! When is a s!o.A What is the defa+!t va!+e@sA for an INI%I&LI'( and what Be word a!!ows for an override of the defa+!t.EFORE )r <IT3 TEST AFTER can "e a$$e$ #) all per&)rm '#a#emen#'.e' 'pace' #) alpha"e#ic &iel$' an$ Ler)' #) alphanumeric &iel$'..O+ II #he NN le.e te -inato -andato y? Sc)pe #ermina#)r' are man$a#)r. F*. F)r rea$a"ili#-. i#B' rec)mmen$e$ c)$in0 prac#ice #) al4a-' ma1e 'c)pe #ermina#)r' e=plici#.erri$e #he'e $e&aul#'.\nQ62) What is +E".i# 4ill )ccup. .aria"le in <OR?IN.l)ca#i)n.in0 79222 Pr)"lem. In a 'e/uen#ial 'earch #he #a"le i' 'earche$ &r)m #)p #) ")##)m. Q=6) What is the difference between a binar' search and a se@uential search? What are the pertinent "010$ commands# AK%! In a "inar. T)#all.A.y state-ent? AN2! REP+ACIN.alue '#)re$ in #he la'# "i#e.') #4) 4)r$' e/ual #) N "-#e'. &ns: 7)u can REDEFINE a Varia"le &r)m )ne PICTURE cla'' #) an)#her PICTURE cla'' ".#) "e u'e$ m)re #han )nce in #he 'ame c)$e "..u'e&ul in ')l.chan0in0 #he replace .here in '%(E! c)mp-A a' )ne 4)r$ i' e/ual #) 6>9 "-#e.i' . .e #) "e in a 'peci&ic 'e/uence. &ns: 3ere '%(E!c)mp i' 'mall in#e0er .$: in &O*O+ ''? AKN! +EN. The "inar.e$B #) 'earch &)r e/ual #). <e can REDEFINE a Sin0le Varia"le in#) ') man.A "-#e'.T3 ac#' li1e a 'pecial re0i'#er #) #ell #he len0#h )& a 0r)up )r elemen#ari#em. 0rea#er #han )r le'' #han c)n$i#i)n' un#il #he elemen# i' &)un$.E Sec#i)n i#'el&.er.REDEFINES 4e can INITIA+ISE #he . 4hile 'e/uen#ial 4)r1' 4ell 4i#h 'maller )ne'.alue in #he la'# ni""le (E "i#' ! )& #he '#)ra0e.'u"-.! Wh do we code s4@)Acomp. Q27) What is the .9 "-#e'(E 4)r$'!..er punche$ 4i#h #he numeric . SEARC3 A++ i' u'e$ &)r "inar'earche'F SEARC3 &)r 'e/uen#ial.aria"le'.i# 4ill )ccup.alue.oint of the REP+A&'". o.u'in0 #he 'ame mem)r. *)ne$ Decimal &iel$'@ A' a $e&aul#. 'i0n i' ). COBOL Interview F+estions &nswers 1 2ow is sign stored in <acBed 7ecima! fie!ds and 'oned 7ecima! fie!ds# &ns: Pac1e$ Decimal &iel$'@ Si0n i' '#)re$ a' a he= .'earch #he #a"le elemen# 1e. all)4' &)r #he 'ame c)p.E 4)r$' e/ual #) 9 "-#e' an$ 'i0n 4ill )ccup.tion of a !o. ') (ir)nicall-! #he elemen#' $) n)# ha. Inspite of Bnowing comp-$ wi!! occ+p !ess space.6>9 "-#e' #)#all. The #a"le i' Bhal.'earch i' much &a'#er &)r lar0er #a"le'.(Thi' &acili#.alue' mu'# "e in a'cen$in0 )r $e'cen$in0 'e/uence. 9ive some advantages of 1(7(=IN(/ c!a+se.-STORA.\ne #) $e&ine ')me $a#a'e#' (S7SA.er. The'e $ump' pr). Can I redefine an ?@255A fie!d with a fie!d of ?@155A # &ns: 7e'. E=amine #he c)mpila#i)n )u#pu# REF li'#in0 #) 0e# #he .lan0ua0e!.O+ .")un$' chec1in0.NE Name the divisions in a COBOL program.E.RAP3 4ill cau'e )nl.c)n'i'#' )& 2-%. Man. is HHHHHHHH. Man. 3)4e. -)u 4ill ha. M program has an arra defined to have 15 items. &ns: SEVEN in CO..E i& -)u 4an# arra. alpha"e#ic (A! an$ numeric (%!. What is the difference "etween performing a /(C%ION and a <&1&91&<2# &ns: Per&)rmin0 a SECTION 4ill cau'e all #he para0raph' #ha# are par# )& #he 'ec#i)n. I& n)ne )& #he'e are help&ul. +sed for # &ns: F)r RENAMES clau'e. #) "e per&)rme$.&ir'#.i$e #he )&&'e# )& #he la'# in'#ruc#i)n a# 4hich #he a"en$ )ccurre$. i& #he i#em "ein0 #e'#e$ i' a 'i0ne$ i#em.e.#ime' #he rea')n &)r SOCK i' an un-ini#ialiLe$ numeric i#em.ice' #hru a''em"l. 7)u ma.c)n#ain 2-%.%he ma6im+m n+m"er of dimensions that an arra can have in COBOL--.O+ . .en u'e "a#ch pr)0ram $e"u00in0 #))l'. T) 0e# cap#ure #he run#ime $ump'. ENVIRONMENT DIVISION. What is !eve! . PROCEDURE DIVISION. IS NUMERIC re#urn' TRUE i& #he i#em )nl. E=amine #ha# p)''i"ili#.#ha# para0raph #) "e per&)rme$. Per&)rmin0 a PARA.er" an$ #he line num"er )& #he ')urce c)$e a# #hi' )&&'e#.. De&aul# i' NOSSRAN. DATA DIVISION. &ns: IDENTIFICATION DIVISION.OUT e#c ! in #he MC+. What do o+ do to reso!ve /OC-* error# &ns: There i' a nee$ e$ #) c)rrec# #he )&&en$in0 $a#a. What are the different data t pes avai!a"!e in COBOL# &ns: Alpha-numeric ( !. 7+e to a "+g8 I find that even if the program access the 11th item in this arra 8 the program does not a"end. 5 an$ . Then -)u can l))1 a# #he ')urce c)$e #) &in$ #he "u0. #hen i# ma.callin0 ')me 'u"r)u#ine' )r OS 'er.in'#alla#i)n' pr). What is wrong with it# &ns: Mu'# u'e c)mpiler )p#i)n SSRAN.i$e -)u a $ump &)r run #ime a"en$' ( i# can "e 0enera#e$ al') ". What does the I/ N0M(1IC c!a+se esta"!ish# &ns: IS NUMERIC can "e u'e$ )n alphanumeric i#em'. u'e Ju$0emen# an$ DISP+A7 #) l)caliLe #he ')urce )& err)r. 'i0ne$ numeric ( pac1e$ $ecimal i#em' an$ un'i0ne$ numeric ( pac1e$ $ecimal i#em'.N8 an$ T3REE in CO.\n2ow is sign stored in a comp-$ fie!d# &ns: I# i' '#)re$ in #he la'# ni""le. Cann)# "e 'u"$i.le. What care has to "e taBen to force program to e6ec+te a"ove 1. F)r e=ample i& -)ur num"er i' 5622. Can I redefine an ?@255A fie!d with a fie!d of ?@155A # &ns: 7e'.i# i' )n i& -.i$e$ #hem'el. 2ow is sign stored in a COM< fie!d # &ns: In #he m)'# 'i0ni&ican# "i#. F)r e=ample@ 26 <S-TOP PIC (6! 26 <S-TOP-RED REDEFINES <S-TOP PIC (9!.e. n)r can #he.. he= 6D i& #he num"er i' -626. What are some e6amp!es of command terminators# &ns: END-IF.i'i)n' )& )#her i#em' (cann)# "e /uali&ie$!.'earch.. i# '#)re' he= 2C in #he la'# "-#e.e. END-EVA+UATE Can I redefine an ?@155A fie!d with a fie!d of ?@255A# &ns: 7e'. What is ** !eve! +sed for # &ns: Elemen#ar.!eve! +sed for # &ns: F)r $e&inin0 c)n$i#i)n name'. Re$e&ine' Ju'# cau'e' ")#h &iel$' #) '#ar# a# #he 'ame l)ca#i)n. %he codes "eing +sed can "e the same over the different !eve!s8 meaning a cit code of 51 can "e in an n+m"er of states8 and the same app!ies to state and region code .e SI*E(MA !. )&& i& 5. DISP+A7 <S-TOP 4ill 'h)4 6 4hile DISP+A7 <S-TOP-RED 4ill 'h)4 69. I& -)u MOVE B69B #) <S-TOP-RED. he= 9D i& #he num"er i' -629 e#c. e&&icien# en)u0h. W2&% I/ 1(<O1%-I%(M# &ns: A REPORT-i#em i' a &iel$ #) "e prin#e$ #ha# c)n#ain' EDIT S7M. hat is the difference "etween search and search a!! in the ta"!e hand!ing# &ns: Search i' a linear 'earch an$ 'earch all i' a "inar.UFSI*E can "e 9?. C)mpile )p#i)n 'h)ul$ ne.e'.er ha. What is -. Meg !ine# &ns: Ma1e 'ure #ha# lin1 )p#i)n i' AMODEDA6 an$ RMODEDAN7.'en#ence 4i#hin a para0raph. he= 6C i& -)ur num"er i' 626. .. mu'# "e #he )nl."e 'u"$i.What does (?I% do# &ns: D)e' n)#hin0 I I& u'e$.O+S Co+ are writing report program with ) !eve!s of tota!s:cit 8state8region and co+ntr .el i#em.\n.BFI+E SECTIONB 9.in0 &iel$ 4here #he &ir'# #ran'&erre$ charac#er 4ill "e '#)re$ 2ow do we get c+rrentdate from s stem with cent+r # &ns: .in an inclu$e$ pr)0ram. I# c)n'i'#' )& PC.M! an$ ') are l)a$e$ &r)m #he pr)0ram li"rar. AC.E SECTIONB E. 4ha# #he pr)0ram i' all)4e$ #) $) 4i#h #h)'e 'e0men# an$ h)4 #he D.u'in0 In#rin'ic &unc#i)n.-STORA.#he le&#m)'# p)'i#i)n 4i#hin recei. &ns: SI SECTIONS 6.(J)"li" )r '#epli"! a'')cia#e$ 4i#h #he J)".BFI+E SECTIONB 9.B<OR?IN.B<OR?IN.B+IN?A. can "e acce''e$. @ Pr)0ram 'peci&ica#i)n "l)c1. 6.$a#a name.el &)r each rec "u# a$$ #) #he hi0her le.-STORA. D7NAMICallcalle$ m)$ule' are #h)'e #ha# are n)# ")un$ 4i#h #he callin0 pr)0ram a# lin1 e$i# #ime (IE<+ &)r I. F)r D7NAMIC callin0 )& a m)$ule #he D7NAM c)mpiler )p#i)n mu'# "e ch)'en. each le.el.(Pr0 C)mmunica#i)n .B+IN?A.O+ II. Rec)r$-name. A$$ #) #he l)4e'# le.A+.E 'ec#i)n.E 'ec#i)n'.el "enea#h i# mu'# al') "rea1. In&)rma#i)n #) 4hich 'e0men# in D. What is the Importance of 9LOB&L c!a+se &ccording to new standards of COBOL &ns: <hen an.IMS a' an e=pan'i)n )& in&)rma#i)n c)n#aine$ in #he PS.+O.el )nl.a $irec#l. &ns: T) c)rrec# an earlier an'4er@All calle$ m)$ule' cann)# run '#an$al)ne i& #here/uire pr)0ram .)n "rea1.-#e' (S%(6N! COMP-A!.BREPORT SECTIONB :.el &ir'#. What is the difference "etween a 7CN&MIC and /%&%IC ca!! in COBOL.BSCREEN SECTIONB 8. el'e #he lin1a0e e$i#)r 4ill n)# 0enera#e an e=ecu#a"le a' i# 4ill e=pec# null a$$re'' re')lu#i)n )& all calle$ m)$ule'. an$ #here&)re "ec)me' par# )& #he e=ecu#a"le l)a$ m)$ule. i' #) "e acce''e$..l)"al Clau'e i'26 $a#a-6 PIC %(8! IS . .ia #he +IN?A. #here are )nl.E SECTIONB.i$e$ #he 'ai$ name ha' "een $eclare$ #) "e a 0l)"al name ".E SECTIONB A. &ile-name .A+ F)rma# )& .B+OCA+-STORA.l)c1' are 0enera#e$ ". A STATICall.B+OCA+-STORA. FUNCTION CURRENT-DATE What is </B > &CB# &ns: PS. @ Acce'' C)n#r)l . What is the ma6im+m !ength of a fie!d o+ can define +sing COM<-$# &ns: 62 .l)c1!.E SECTIONB In CO. "ecau'e i& -)u ha. In&)rm a")u# h)4 a 'peci&ic pr)0ram i' #) "e acce'' )ne )r m)re IMS D. c)n$i#i)n name )r In$e= $e&ine$ in an Inclu$in0 Pr)0ram can "e re&erence$ ".aria"le' pa''e$ #) #hem .calle$ m)$ule i' )ne #ha# i' ")un$ 4i#h #he callin0 m)$ule a# lin1 e$i#. 2ow man /ections are there in 7ata 7ivision#.e a "rea1 a# a hi0he'# le. in )r$er #) 'pee$ up #he acce'' #) #he applica"le D.DB'.show.)r in$irec#l..E SECTIONB E. Pr). What is the <+rpose of <OIN%(1 <hrase in /%1IN9 command &ns: The Purp)'e )& POINTER phra'e i' #) 'peci&.+O.E SECTIONB A. 7o o+ do o+r checBing for "reaBs and how do o+ do add to each !eve!# &ns: Al4a-' c)mpare )n #he hi0he'#-le.\n#hen $a#a i' acce''e$ . m).$) n)# c)n#ain an.2ow can I te!! if a mod+!e is "eing ca!!ed 7CN&MIC&LLC or /%&%IC&LLC# &ns: The ON+7 4a. Thi' #-pe )& callin0 i' 1n)4n a' IMP+ICITE callin0 a' #he name )& #he m)$ule i' implie$ ".acce''e$ . Can "e acce''e$ ".e 62 #) 4'-n. +DS i' e''en#iall.ia a u'er pr)0ram an$ can )nl.alue Ler). i& i# i' "ein0 calle$ STATICA++7 #hen i# 4ill "e 'een in #he l)a$ m)$ule.alue 62 #ha# i' ini#ialiLe$ in #he l))p. Rea$ #he &)ll)4in0 c)$e. 9! U'e 'c)pe #ermina#)r' &)r ne'#in0. What g+ide!ines sho+!d "e fo!!owed to write a str+ct+red COBOL program# &ns: 6! U'e BEVA+UATEB '#m# &)r c)n'#ruc#in0 ca'e'. 26 4'-n PIC %(9! .44 and 4v44# &ns: PIC %. I# ha' un'#ruc#ure$ E1 (E2%: "-#e'! &i=e$ 'iLe CI' 4hich $) n)# c)n#ain c)n#r)l &iel$' an$ #here&)re &r)m VSAMB' '#an$p)in# #he. What is the difference "etween <IC 4. The B#a"le en#rie'B mu'# "e crea#e$ .44 is different from <IC 4v44# .D. a-para.e&)re an$ #e'# a&#er in #he Per&)rm '#m# &)r 4ri#in0 D)-<hile c)n'#ruc#i)n'.aria"le.aria"le. mean' an implie$ $ecimal p)in#.#he c)n#en#' )& #he 4)r1in0 '#)ra0e .ia a u'er pr)0ram. 2ow is <IC 4."e l)0icall. Callin0 a pr)0ram name li#eral (CA++!. #he en#ire +DS mu'# "e mappe$ in#) '#)ra0e. There i' n) &ree'pace. "-para. m).e 8 #) 4'-n. an$ n) acce'' &r)m C)")l. i# 4ill n)# #a1e #he . $)e' n)# ma1e a D7NAMIC call.ia "a'e an$ $i'placemen# #-pe pr)ce''in0. WhatIs a L7/@Linear 7ata /etA and whatIs it +sed for # &ns: +DS i' a VSAM $a#a'e# in name )nl-. <hen pa''e$. What is <ic 4v44 Indicates# &ns: PICTURE %. I& #he m)$ule i' "ein0 calle$ D7NAMICA++7 #hen i# 4ill n)# e=i'# in #he main m)$ule.i' #) l))1 a# #he )u#pu# )& #he lin1a0e e$i#)r (IE<+!)r #he l)a$ m)$ule i#'el&.%% i' T3REE-POSITION numeric &iel$ 4i#h implie$ )r a''ume$ $ecimal p)'i#i)n.9 an$ IMS &a'# pa#h $a#a'e#'.%% i' a FOUR-POSITION &iel$ #ha# ac#uall.%% i' a #hree p)'i#i)n Numeric &iel$ 4i#h an implie$ )r a''ume$ $ecimal p)in# a&#er #he &ir'# p)'i#i)nF #he . Callin0 a 4)r1in0 '#)ra0e . per&)rm "-para 4'-n #ime'.l)0ical rec)r$'. A!U'e in-line Per&)rm '#m# &)r 4ri#in0 B$) B c)n'#ruc#i)n'.a #a"le )& $a#a main#aine$ )n $i'1. c)n#ainin0 a pr)0ram name. 2ow man times wi!! "-para "e e6ec+ted # &ns: 8 Time' )nl-.c)n#ain' a $ecimal p)in# 4here a' PIC %. E! U'e Te'# .\n%% i' a #hree p)'i#i)n numeric &iel$ 4i#h an implie$ )r a''ume$ $ecimal p)in#.%% i' a &)ur p)'i#i)n &iel$ #ha# ac#uall.c)n#ain' a $ecimal p)in# 4here a' %. .&ns: PIC %.\nDocuments Similar To COBOL Interview Questions Answers 1\nMorse Code - Sound Patterns\nAero2 Competitive Part\nHow to Type Polytonic Greek\nC++ Quiz 2nd\nQNUE -- Welcome Pack.pdf\nIBE Session 1\n10267A ENU StudentHandbook Vol1\nEjemplo Logica Difusa\nRapid Start Technology User Guide for Uefi1\nJitendra Jeet Mishra\nCriptografia Unidad 1 fase 2 Diseño y construcción.


Surprise! 10% Off OPI- Nail Lacquer- GelColor - Pastel-Can't Find Czechbook - .5 FL OZ\nOPI- Nail Lacquer- GelColor - Pastel-Can't Find Czechbook - .5 FL OZ\nOPI- Nail Lacquer- GelColor - Pastel-Can't Find Czechbook - .5 FL ...\nO.P.I OPI- Nail Lacquer- GelColor - Pastel-Can't Find Czechbook - .5 FL OZ Walmart $17.99 $16.25\nO.P.I OPI- Nail Lacquer-GelColor - DS Pewter - .5 FL OZ Walmart $17.99 $16.74\nOPI- Nail Lacquer- GelColor - Pastel - Are We There Yet - .5 FL O ...\nOPI- Nail Lacquer- GelColor - Pastel - Are We There Yet - .5 FL OZ\nO.P.I OPI- Nail Lacquer- GelColor - Pastel - Are We There Yet - .5 FL OZ Walmart $19.95 $17.95\nOPI- Nail Lacquer- GelColor- Pastel-Gargantuan Green Grape - .5 F ...\nOPI- Nail Lacquer- GelColor- Pastel-Gargantuan Green Grape - .5 FL OZ\nO.P.I OPI- Nail Lacquer- GelColor- Pastel-Gargantuan Green Grape - .5 FL OZ Walmart $17.99 $14.00\nOPI- Nail Lacquer- GelColor - Pastel - Do You Lilac It? - .5 FL O ...\nO.P.I OPI- Nail Lacquer- GelColor - Pastel - Do You Lilac It? - .5 FL OZ Walmart $17.99 $14.00\nO.P.I OPI- Nail Lacquer-GelColor - OPI...Eurso Euro - .5 FL OZ Walmart $17.99 $14.50\nO.P.I OPI- Nail Lacquer-GelColor-Suzi-First Lady Nails -.5 FL OZ Walmart $19.95 $13.95\nO.P.I OPI- Nail Lacquer- GelColor - Don't Bossa Nova Me- .5 FL OZ Walmart $23.99\nOPI Nail Lacquer, OPI Euro Centrale Collection 2013, 0.5 Fluid Ou ...\nOPI Nail Lacquer, OPI Euro Centrale Collection 2013, 0.5 Fluid Ounce\nO.P.I OPI Nail Lacquer, OPI Euro Centrale Collection 2013, 0.5 Fluid Ounce - Can't Find My Czechbook E75 Walmart $8.49\nO.P.I OPI- Nail Lacquer-GelColor-On Pinks and Needles - .5 FL OZ Walmart $15.95\nO.P.I OPI- Nail Lacquer-GelColor-Starry-Eyed for Dear - .5 FL OZ Walmart $19.95 $9.99\nO.P.I OPI- Nail Lacquer-GelColor - Mod About You - .5 FL OZ Walmart $17.99 $16.25