Interview Q&As For COBOL: Answer
Interview Q&As For COBOL: Answer
If you see any answers to questions that you know are wrong, please send email to
[email protected], so we can remove or correct them. Thanks for your help. Please use this
ONLY for Interview Questions and Answers. If you are looking for help and want to aska
question, use the Message Board. Other users will help you there.
Topic: COBOL
Question: What is the diffenence between Structured Cobol Programming and Object
Oriented COBOL programming ?
Topic: COBOL
Answer: They appear to be similar, that is, the control goes to the next sentence in the
paragraph. But, Next Sentence would take the control to the sentence after it finds a fullstop
(.). Check out by writing the following code example, one if sentence followed by 3 display
statements (sorry they appear one line here because of formatting restrictions) If 1 > 0 then
next sentence end if display 'line 1' display 'line 2'. display 'line 3'. *** Note- there is a dot (.)
only at the end of the last 2 statements, see the effect by replacing Next Sentence with Continue
*** Hope this helps!
Topic: COBOL
Question: what is difference between next sentence and continue
Topic: COBOL
Question: I understand the possible causes for S0C1 & S0C4 abends, but what are they really?
Answer: A S0C1 occurs if the CPU attempts to execute binary code that isn't a valid machine
instruction; e.g. if you attempt to execute data. A S0C4 is a memory protection violation. This
occurs if a program attempts to access storage beyond the areas assigned to it.
Topic: COBOL
Topic: COBOL
Question: What is the diffenence between Structured Cobol Programming and Object
Oriented COBOL programming ?
Answer: ?????????
Topic: COBOL
Question: I HAVE HEARD ABOUT VSCOBOL AND COBOL II. IS THERE ANY OTHER
CATEGORY/CLASSIFICATION IN COBOL ? KINDLY GIVE ME A DETAILED
EXPLANATION. I WOULD ALSO LIKE TO KNOW WHAT COBOL 370 IS.
Answer: ?????????????
Entered on: August 25, 1999
Submitted by: Mallika
Topic: COBOL
Answer:
Topic: COBOL
Answer: ?
Topic: COBOL
Answer: The Q&A submitted by sivakumar on March 24,1998 is absolutely wrong. Dear
Sivakumar, for your kind information: 9(4) COMP uses only 2 bytes and 2 bytes is not = 4
words. 9(4) COMP-3 uses 3 bytes. 3 bytes is more than 2 bytes. Hence COMP is preferred over
COMP-3 in this case.
Topic: COBOL
Question: What divisions,sections and paragraphs are mandatory for a COBOL program?
Topic: COBOL
Question: Can JUSTIFIED be used for all the data types?
Answer: No,it can be used only with alphabetic and alphanumeric data types.
Topic: COBOL
Question: Ans we to bala s bandlas question what happens when we move a comp-3 field to an
edited ( say z(9).zz-)
Answer: the edititing characters r to be used with data items with usage clause as display
which is the default.when u try displaying a data item with usage as computational it does not
give the desired display format becoz the data item is stored as packed decimal.So if u want
this particular data item to be edited u have to move it into a data item whose usage is diplay
and then have that particular data item edited in the format desired.
Topic: COBOL
Question: rrr
Answer: Planning and Implementation Guide for prasad question: On the web at
www.ibm.com/year2000 www.year2000.com www.itaa.org/index.html
Topic: COBOL
Question: what happens when we move a comp-3 field to an edited ( say z(9).zz-) ?
Answer: ????
Topic: COBOL
Question: What are the causes for S0C1, S0C4, S0C5, S0C7, S0CB abends
Topic: COBOL
Question: Question: What will happen if you code GO BACK instead of STOP RUN in a stand
alone COBOL program i.e. a program which is not calling any other program.
Answer: Both give the same results when a program is not calling any other program. The
answer given by Mr.Krishnan that when go back is coded the program goes into infinite loop is
not correct. Goback will give the control to the system even though it is a single program.
Topic: COBOL
Answer: Global variables are accessible only to the batch program whereas external variables
can be referenced from any batch program residing in the same system library.
Topic: COBOL
Topic: COBOL
Answer: In using COBOL on PC we have only flat files and the programs can access only
limited storage, whereas in VS COBOL II on M/F the programs can access upto 16MB or 2GB
depending on the addressing and can use VSAM files to make I/O operations faster.
Topic: COBOL
Answer: because, Occurs clause is there to repeat fields with same format, not the records.
Topic: COBOL
Topic: COBOL
Answer: PSB : Program specification block. Infor about how a specific program is to be access
one or more IMS DB. It consist of PCB(Prg Communication Block). Information to which
which segment in DB can be accessed, what the program is allowed to do with those segment
and how the DB is to be accessed. ACB : Access Control Blocks are generated by IMS as an
expansion of information contained in the PSB in order to speed up the access to the applicable
DBD's.
Topic: COBOL
Question: Question: What's a LDS(Linear Data Set) and what's it used for ?
Answer: LDS is a VSAM dataset in name only. It has unstructured 4k (4096 bytes) fixed size
CIs which do not contain control fields and therefore from VSAM's standpoint they do not
contain any logical records. There is no freespace, and no access from Cobol. Can be accessed
by DB2 and IMS fast path datasets. LDS is essentially a table of data maintained on disk. The
'table entries' must be created via a user program and can only be logically accessed via a user
program. When passed, the entire LDS must be mapped into storage, then data is accessed via
base and displacement type processing.
Topic: COBOL
Question: answer to anon question for difference between next and continue cluase
Answer: FOR ANON , Dear friend the difference between the next and continue verb is that in
the continue verb it is used for a situation where there in no eof condition that is the records
are to be accessed again and again in an file , whereas in the next verb the indexed file is
accessed sequentially ,hence when index clase is accessed sequentially read next record
command is used,i hope that is satisfactory
Topic: COBOL
Question: What is the Importance of GLOBAL clause According to new standards of COBOL
Answer: When any data name, file-name , Record-name, condition name or Index defined in
an Including Program can be referenced by a directly or indirectly in an included program,
Provided the said name has been declared to be a global name by GLOBALFormat of Global
Clause is01 data-1 pic 9(5) IS GLOBAL.
Answer: The Purpose of POINTER phrase is to specify the leftmost position whithin Receiving
field where the first transfered character will be stored
Topic: COBOL
Topic: COBOL
Question: what is the difference between search and search all in the table handling?
Topic: COBOL.
Question: What is the maximum length of a field you can define using COMP-3?
Topic: COBOL
Question: What will happen if you code GO BACK instead of STOP RUN in a stand alone
COBOL program i.e. a program which is not calling any other program.
Topic: COBOL
Topic: COBOL
Answer: The ONLY way is to look at the output of the linkage editor (IEWL)or the load
module itself. If the module is being called DYNAMICALLY then it will not exist in the main
module, if it is being called STATICALLY then it will be seen in the load module.Calling a
working storage varible, containing a program name, does not make a DYNAMIC call. This
type of calling is known as IMPLICITE calling as the name of the module is implied by the
contents of the working storage varible. Calling a program name literal (CALL
Topic: COBOL
Question: What is the difference between a DYNAMIC and STATIC call in COBOL.
Answer: To correct an earlier answer:All called modules cannot run standalone if they require
program varibles passed to them via the LINKAGE section. DYNAMICally called modules are
those that are not bound with the calling program at link edit time (IEWL for IBM) and so are
loaded from the program library (joblib or steplib) associated with the job. For DYNAMIC
calling of a module the DYNAM compiler option must be choosen, else the linkage editor will
not generate an executable as it will expect ull address resolution of all called modules. A
STATICally called module is one that is bound with the calling module at link edit, and
therefore becomes part of the executable load module.
Topic: COBOL
Question: What is the defference between PIC 9.99 and 9v99?
Answer: PIC 9.99is a FOUR-POSITION field that actually contains a decimal point where as
PIC 9v99 is THREE-POSITION numeric field with implied or assumed decimal position.
Topic: COBOL
Answer: PIC 9.99 is a four position field that actually contains a decimal point where as 9v99
is a three position numeric field with an implied or assumed decimal point.
Topic: COBOL
Answer: PICTURE 9v99 is a three position Numeric field with an implied or assumed decimal
point after the first position; the v means an implied decimal point.
Topic: COBOL
Topic: COBOL
Question: read the following code. 01 ws-n pic 9(2) value zero. a-para move 5 to ws-n. perform
b-para ws-n times.b-para. move 10 to ws-n.how many times will b-para be executed ?
Answer: 5 times only. it will not take the value 10 that is initialized in the loop.
Topic: COBOL
Question: What is the difference between SEARCH and SEARCH ALL? What is more
efficient?
Answer: SEARCH is a sequential search from the beginning of the table. SEARCH ALL is a
binary search, continually dividing the table in two halves until a match is found. SEARCH
ALL is more efficient for tables larger than 70 items.
Topic: COBOL
Topic: COBOL
Question: What care has to be taken to force program to execute above 16 Meg line?
Answer: Make sure that link option is AMODE=31 and RMODE=ANY.Compile option should
never have SIZE(MAX).BUFSIZE can be 2K, effecient enough.
Topic: COBOL
Answer: 1. You can REDEFINE a Variable from one PICTURE class to another PICTURE
class by using the same memory location.2. By REDEFINES we can INITIALISE the variable
in WORKING-STORAGE Section itself.3. We can REDEFINE a Single Variable into somany
subvariables.(This facility is very useful in solving Y2000 Problem.)
Topic: COBOL.
Answer: Here s9(4)comp is small integer ,so two words equal to i byteso totally it will occupy 2
bytes(4 words).here in s9(4) comp-3 as one word is equal to 1/2 byte.4 words equal to 2 bytes
and sign will occupy 1/2 byteso totally it will occupy 3 bytes.
Topic: COBOL
Question: The maximum number of dimensions that an array can have in COBOL-85 is
________.
Topic: COBOL
Answer: The linkage section is used to pass data from one program toanother program or to
pass data from a PROC to a program.
Topic: COBOL
Answer: Indexing uses binary displacement. Subscripts use the value of the occurrence.
To TOP
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Answer: lkjkj
Topic: JCL
Answer: ddd
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Answer: TIME=1440
Topic: JCL
Topic: JCL
Topic: JCL
Question: How to pass the temp dataset form one JOB step
to another?
Topic: JCL
Topic: JCL.
Topic: JCL
Topic: JCL
Topic: JCL
Answer: 15.
Answer: Jcl which changes during run time ie the values for
the jcl such as pgm name ,dd name will change .ie same jcl
can be used for various job, equvalent to dynamic sql...
Topic: JCL
Topic: JCL
Topic: JCL
Answer: CICS
Answer: 5
Answer: DB2PM
Entered on: September 02, 1998
Submitted by: Anon
Topic: jcl
Answer: RCT
Question: GDG?
Topic: JCL
Topic: JCL
Topic: JCL
Answer: SIX
Topic: JCL
Answer: 3273
Topic: JCL
Answer: 56 KB
Topic: JCL
Answer: SIX
Topic: JCL
Answer: 255
Answer: Documentation.
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Answer: No ,
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
To TOP
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Answer: lkjkj
Topic: JCL
Answer: ddd
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Answer: TIME=1440
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL.
Topic: JCL
Topic: JCL
Topic: JCL
Answer: 15.
Topic: JCL
Topic: JCL
Topic: JCL
Answer: CICS
Answer: 5
Answer: DB2PM
Topic: JCL
Answer: RCT
Question: GDG?
Topic: JCL
Topic: JCL
Topic: JCL
Answer: SIX
Topic: JCL
Answer: 3273
Topic: JCL
Answer: 56 KB
Topic: JCL
Answer: SIX
Topic: JCL
Answer: 255
Answer: Documentation.
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Answer: No ,
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
Topic: JCL
To TOP