COBOL interview questions.

All sort of Mainframes Interview Questions.
Post Reply
Sushil
Registered Member
Posts: 23
Joined: Sat Nov 23, 2013 2:56 am

COBOL interview questions.

Post by Sushil »

Hi,

I was asked many questions in an interview. The following questions are those I did not had an answer - could someone please help:

1.What is meant by Reference Modofication.

Can anybody give me explaination with an example. Actually, I read about them after interview but if we've to give definition what would it be?

2. Can we use $ and Z together to a field? - I was not sure.

4.What is INITIAL ? Interviewer hinted that we use it in program name: I looked for and it says for sub-program it is used. But at my office I've not seen any of the Sub-program using it? How come the documents says to use it and the programs work without it? Possibly I've got it all wrong, need to help to understadn this concept.

Please help.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: COBOL interview questions.

Post by Robert Sample »

1. Reference modification allows you to select bytes from a variable. An example:

Code: Select all

77  WS-VAR PIC X(10) VALUE 'ABCDEFGHIJ'.
.
.
.
DISPLAY WS-VAR (5 : 3).
would display EFG on the system output device. Reference modification can use variables for either the starting position or length, so it can be used in many ways.

2. The Enterprise COBOL Language Reference Manual has a chapter titled Symbols used in the PICTURE clause and you can look at the chart in this chapter to see which characters are allowed with which other characters.

4. The Identification Section chapter of the Enterprise COBOL Language Reference Manual tells you about the INITIAL attribute for programs.
Sushil
Registered Member
Posts: 23
Joined: Sat Nov 23, 2013 2:56 am

Re: COBOL interview questions.

Post by Sushil »

Thanks Robert.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”