For Programmers: Free Programming Magazines  


Home > Archive > Cobol > July 2006 > Few Interview Questions.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Few Interview Questions.
arrbee

2006-07-03, 3:55 am

Hi,

The below are few of the interview questions I've faced recently.
Appreciate if you could provide answers.

1). What happens if you add a copybook to linkage section instead of
adding it to a working-storage section in a sub-program?
2). There are select queries on a table in a COBOL-DB2 program. After
pre-compilation, each select query is replaced by equivalent cobol
statements. If you look at them, is it possible to find out which
statement belongs to which query?
3). What is the basic consideration to use static / dynamic call and
justification?
4). While writing a new COBOL program, how do you decide upon whether a
varaible should be declared as COMP, COMP-1, COMP-2, COMP-3? What is
the basis and justification?
5). A field of a DB2 table is updated. How do you test it? What is the
we exactly look in the job to know whether the field is updated
properly or not?
6). There are different calls in COBOL, Call by content, Call by value
and Call by reference. Is it possible that a single CALL statement have
all these varieties? When do you go for each one of these? What is the
basis and justification?
7). When do we use null indicator of a field? Does the usage of it have
any benefits?
8 ). What are the other ways of passing data to a JCL to program? (I
know passing of data using PARM, Instream data and datasets).
9). Can you have multiple indexes on a table or array? What is the
advantage?
10). What are the advantages of declaring the VARCHAR in 49 level in a
COBOL-DB2 program?

Please clear my doubts.

TIA.

2006-07-03, 7:55 am

In article <1151911951.812281.136460@m73g2000cwd.googlegroups.com>,
arrbee <arrbee@gmail.com> wrote:
>Hi,
>
>The below are few of the interview questions I've faced recently.
>Appreciate if you could provide answers.


Please do your homework.

DD

Pete Dashwood

2006-07-03, 7:55 am


"arrbee" <arrbee@gmail.com> wrote in message
news:1151911951.812281.136460@m73g2000cwd.googlegroups.com...
> Hi,
>
> The below are few of the interview questions I've faced recently.
> Appreciate if you could provide answers.


And exactly what form will that 'appreciation' take...?

>
> 1). What happens if you add a copybook to linkage section instead of
> adding it to a working-storage section in a sub-program?


Nothing at all. For something to happen it would need to be referenced on
the USING clause of the called Procedure Division.

> 2). There are select queries on a table in a COBOL-DB2 program. After
> pre-compilation, each select query is replaced by equivalent cobol
> statements. If you look at them, is it possible to find out which
> statement belongs to which query?


Yes.

> 3). What is the basic consideration to use static / dynamic call and
> justification?


As Doc would say: "Do whatever the person who signs your timesheets
requires.". Both are justifiable... or not.

> 4). While writing a new COBOL program, how do you decide upon whether a
> varaible should be declared as COMP, COMP-1, COMP-2, COMP-3? What is
> the basis and justification?


Toss a coin. If it stands on edge, use Comp-2.

> 5). A field of a DB2 table is updated. How do you test it? What is the
> we exactly look in the job to know whether the field is updated
> properly or not?


The third sentence of this question is meaningless gibberish. You test
whether the field was updated or not by using SPUFI, or running an SQL query
against the table, or waiting until the cheques are processed...

> 6). There are different calls in COBOL, Call by content, Call by value
> and Call by reference. Is it possible that a single CALL statement have
> all these varieties?


Sure.
....call 'a-taxi' using
by reference yellow-pages
by value 'elite-taxis'
by content group-of-drunks
on overflow
perform Fatty-gets-out-and-walks
end-call


When do you go for each one of these?

When you're too drunk to walk home, obviously...


What is the
> basis and justification?


Good question... (Launch into a diatrible about the pointlessness of
existence and the lack of justification for Humanity to be here. Mention
Nietzsche, Kant, Descartes, and Aristotle. At least 2 pages using both sides
of the paper.)



> 7). When do we use null indicator of a field?


When YOU use it may be different form when I use it, so the 'we' is just
confusing the issue.

>Does the usage of it have
> any benefits?


None that are detectable, but, like the rest of the universe, all the
evidence isn't in yet so it MIGHT prove to be valuable somewhere sometime...


> 8 ). What are the other ways of passing data to a JCL to program?


Another gibberish pidgin English sentence. No idea what this means. Maybe
the test should be in Swahili...? Couldn't possibly ACCEPT this question as
written...


(I
> know passing of data using PARM, Instream data and datasets).


> 9). Can you have multiple indexes on a table or array?


Only if you pay extra.

>What is the
> advantage?


Nothing, apart from snob value.

> 10). What are the advantages of declaring the VARCHAR in 49 level in a
> COBOL-DB2 program?


It means you don't have to declare it somewhere else...?
(As Doc will no doubt observe, this is no answer...:-))
>
> Please clear my doubts.


Here in CLC? For free...!!!??? It's a job for your pschiatrist...
>
> TIA.
>

You're welcome...

Pete.


Howard Brazee

2006-07-03, 6:55 pm

On Tue, 4 Jul 2006 01:14:07 +1200, "Pete Dashwood"
<dashwood@enternet.co.nz> wrote:

>
>As Doc would say: "Do whatever the person who signs your timesheets
>requires.". Both are justifiable... or not.


I wonder how commons shops are that don't have a standard for this.
Michael Mattias

2006-07-03, 6:55 pm

"Howard Brazee" <howard@brazee.net> wrote in message
news:nc8ia2l3ja3l1sj2tda7i0hfi3tlg349pd@
4ax.com...
> On Tue, 4 Jul 2006 01:14:07 +1200, "Pete Dashwood"
> <dashwood@enternet.co.nz> wrote:
>
>
> I wonder how commons shops are that don't have a standard for this.


All those shops who code for "more work in the future" perhaps? After all,
coding dynamic/static changes the number of programs which have to be
changed or at the least recompiled when some business rule changes.

Ooops! Never mind... anybody who has to ask this question probably doesn't
think beyond the next coffee break anyway...



MCM





Howard Brazee

2006-07-03, 6:55 pm

On Mon, 03 Jul 2006 14:32:07 GMT, "Michael Mattias"
<michael.mattias@gte.net> wrote:

>
>All those shops who code for "more work in the future" perhaps? After all,
>coding dynamic/static changes the number of programs which have to be
>changed or at the least recompiled when some business rule changes.


I agree. Fortunately, I haven't worked at one.

>Ooops! Never mind... anybody who has to ask this question probably doesn't
>think beyond the next coffee break anyway...


I assume you mean the first question above there.
Roger While

2006-07-03, 6:55 pm


"Pete Dashwood" <dashwood@enternet.co.nz> schrieb im Newsbeitrag
news:4gsjh7F1oknu2U1@individual.net...
>
> "arrbee" <arrbee@gmail.com> wrote in message
> news:1151911951.812281.136460@m73g2000cwd.googlegroups.com...
>
> And exactly what form will that 'appreciation' take...?
>
>
> Nothing at all. For something to happen it would need to be referenced on
> the USING clause of the called Procedure Division.
>


Really ? and when the copy book defines a VALUE clause ?

>
> Yes.
>
>
> As Doc would say: "Do whatever the person who signs your timesheets
> requires.". Both are justifiable... or not.


He-he. One checks that the program is callable, the other not.
>
>
> Toss a coin. If it stands on edge, use Comp-2.
>


Use COMP-5 :-)
(Or equivalent 2002 BINARY-xxx)

>
> The third sentence of this question is meaningless gibberish. You test
> whether the field was updated or not by using SPUFI, or running an SQL
> query against the table, or waiting until the cheques are processed...
>
>
> Sure.
> ...call 'a-taxi' using
> by reference yellow-pages
> by value 'elite-taxis'
> by content group-of-drunks
> on overflow
> perform Fatty-gets-out-and-walks
> end-call
>
>


Agreed :-)

> When do you go for each one of these?
>
> When you're too drunk to walk home, obviously...
>


He-he.
>
> What is the
>
> Good question... (Launch into a diatrible about the pointlessness of
> existence and the lack of justification for Humanity to be here. Mention
> Nietzsche, Kant, Descartes, and Aristotle. At least 2 pages using both
> sides of the paper.)
>
>
>
>
> When YOU use it may be different form when I use it, so the 'we' is just
> confusing the issue.
>
>
> None that are detectable, but, like the rest of the universe, all the
> evidence isn't in yet so it MIGHT prove to be valuable somewhere
> sometime...
>
>
>
> Another gibberish pidgin English sentence. No idea what this means. Maybe
> the test should be in Swahili...? Couldn't possibly ACCEPT this question
> as written...
>
>
> (I
>
>
> Only if you pay extra.
>
>
> Nothing, apart from snob value.
>
>
> It means you don't have to declare it somewhere else...?
> (As Doc will no doubt observe, this is no answer...:-))
>
> Here in CLC? For free...!!!??? It's a job for your pschiatrist...
> You're welcome...
>
> Pete.
>



Howard Brazee

2006-07-03, 6:55 pm

On Mon, 3 Jul 2006 18:03:34 +0200, "Roger While" <simrw@sim-basis.de>
wrote:

>
>Really ? and when the copy book defines a VALUE clause ?


I get a warning message saying that the VALUE is ignored.
Roger While

2006-07-03, 6:55 pm


"Howard Brazee" <howard@brazee.net> schrieb im Newsbeitrag
news:u9gia25frunai9jid1c3320vcjrffcfbcf@
4ax.com...
> On Mon, 3 Jul 2006 18:03:34 +0200, "Roger While" <simrw@sim-basis.de>
> wrote:
>
>
> I get a warning message saying that the VALUE is ignored.


:-) At least that. Referencing the fields might be an interseting problem
:-)

Roger


Roger While

2006-07-03, 6:55 pm

Of course, one scenario is absolutely legal -
ie. When all top-level items in the copy book have the
attribute BASED :-)

Roger

"Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag
news:e8bfps$nh2$02$1@news.t-online.com...
>
> "Howard Brazee" <howard@brazee.net> schrieb im Newsbeitrag
> news:u9gia25frunai9jid1c3320vcjrffcfbcf@
4ax.com...
>
> :-) At least that. Referencing the fields might be an interseting problem
> :-)
>
> Roger
>



Roger While

2006-07-03, 6:55 pm

In other words, the answer is indeterminable without knowing
the contents of the copy book :-)

Roger

"Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag
news:e8bifd$6vu$01$1@news.t-online.com...
> Of course, one scenario is absolutely legal -
> ie. When all top-level items in the copy book have the
> attribute BASED :-)
>
> Roger
>
> "Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag
> news:e8bfps$nh2$02$1@news.t-online.com...
>
>



Howard Brazee

2006-07-03, 6:55 pm

On Mon, 3 Jul 2006 18:14:44 +0200, "Roger While" <simrw@sim-basis.de>
wrote:

>
>:-) At least that. Referencing the fields might be an interseting problem
>:-)
>
>Roger


I've never had any problem. Just remember that nothing's initialized
by a VALUE clause in the LINKAGE SECTION.
Alistair

2006-07-03, 6:55 pm


Pete Dashwood wrote:
> "arrbee" <arrbee@gmail.com> wrote in message
> news:1151911951.812281.136460@m73g2000cwd.googlegroups.com...
>
> And exactly what form will that 'appreciation' take...?
>


Doc's injunction to do his own homework applies. I presume this
chap/chappess is going for a job as a Cobol EXPERT rather than as a
programmer. I scored 97% on the Tekcheck test for Cobol and would
wonder why any one would ask the questions raised here.

BTW, Pete, the following one of your answers is remiss in being
incomplete in so far as it failed to mention the world's greatest
philosopher, Homer (Simpson, that is).

>
> What is the
>
> Good question... (Launch into a diatrible about the pointlessness of
> existence and the lack of justification for Humanity to be here. Mention
> Nietzsche, Kant, Descartes, and Aristotle. At least 2 pages using both sides
> of the paper.)
>


2006-07-03, 6:55 pm

In article <4gsjh7F1oknu2U1@individual.net>,
Pete Dashwood <dashwood@enternet.co.nz> wrote:
>
>"arrbee" <arrbee@gmail.com> wrote in message
>news:1151911951.812281.136460@m73g2000cwd.googlegroups.com...


[snip]

>
>It means you don't have to declare it somewhere else...?
>(As Doc will no doubt observe, this is no answer...:-))


zzzZZZZzzz... zzzAAAWWWWwwwkkkkhhhh... huh? whuh? Oh, I'm sorry, I was...
thinking about something, did someone ask about me?

DD
Pete Dashwood

2006-07-04, 7:55 am


"Roger While" <simrw@sim-basis.de> wrote in message
news:e8bf4u$vg2$01$1@news.t-online.com...
>
> "Pete Dashwood" <dashwood@enternet.co.nz> schrieb im Newsbeitrag
> news:4gsjh7F1oknu2U1@individual.net...
>
> Really ? and when the copy book defines a VALUE clause ?


It will cause a compile error (warning) so, again, nothing happens.


>
>
> He-he. One checks that the program is callable, the other not.
>
> Use COMP-5 :-)
> (Or equivalent 2002 BINARY-xxx)
>
>
> Agreed :-)
>
>
> He-he.
>
>



Pete Dashwood

2006-07-04, 7:55 am


"Alistair" <alistair@ld50macca.demon.co.uk> wrote in message
news:1151950439.168434.225330@b68g2000cwa.googlegroups.com...
>
> Pete Dashwood wrote:
>
> Doc's injunction to do his own homework applies. I presume this
> chap/chappess is going for a job as a Cobol EXPERT rather than as a
> programmer. I scored 97% on the Tekcheck test for Cobol and would
> wonder why any one would ask the questions raised here.
>
> BTW, Pete, the following one of your answers is remiss in being
> incomplete in so far as it failed to mention the world's greatest
> philosopher, Homer (Simpson, that is).


Quite right. I consider myself chastised... Doh!!! :-)

Pete.


John Culleton

2006-07-04, 9:55 pm

arrbee wrote:

> Hi,
>
> The below are few of the interview questions I've faced recently.
> Appreciate if you could provide answers.


Well I see a couple of problems here. If in fact you have faced
these questions on interviews, and if in fact the folks here gave
you the correct answers then on your next interview you might get
hired for a job you could not do. Either you know your stuff in
these areas or you don't. If you don't you had best take some
courses or read some manuals until you do. Programming is more
than just knowing the right answers in an interview.

The other problem is that the folks on this news group are being
most unhelpful to you. They aren't treating you as a fellow
programer needing help with a specific problem at work. They are
treating you as someone who is either:
a) trying to cheat on an interview
b) a student too lazy to do his/her homework
c) both

I remember an earnest young man who aproached me in a large
public library He had just graduated from a
fly-by-night computer school. He showed me his resume and asked
me what the words in it meant. I almost cried.


"Drink deep, or taste not of the Phyrrian spring;
A little knowledge is a dangerous thing"

(I think that was Alexander Pope but it's been half a century
since I read those lines. My memory may be faulty.)
--
John Culleton
Able Indexers and Typesetters
(I did Cobol once. I think Nixon was president, or maybe Carter.)
Holly

2006-07-05, 3:55 am

I understand your point, John, but I do think people on this newsgroup
have tried to help this poster in the past. In fact, he keeps asking
the same questions. Now it would be different if this was simply an
enthusiastic student who maybe didn't have access to the right training
and needed clarification. But it's quite different to have the gall to
post 10 pre-canned interview questions with a "TIA". I have tried to
help provide links to the exact places in the ibm and DB2 manuals where
he could look the answers up in the past, and never got a follow-up
question. I doubt he has bothered to read a manual. Looking at the
poster's history you can also see where other members have offered much
better advice on the very same questions above, obviously to no avail.


If he plans to get a job programming and doesn't know how to look up
basic Cobol/DB2 questions in a manual, then I am afraid his future
prospects are very grim. Either that, or ours will be.

John Culleton wrote:
> arrbee wrote:
>
>
> Well I see a couple of problems here. If in fact you have faced
> these questions on interviews, and if in fact the folks here gave
> you the correct answers then on your next interview you might get
> hired for a job you could not do. Either you know your stuff in
> these areas or you don't. If you don't you had best take some
> courses or read some manuals until you do. Programming is more
> than just knowing the right answers in an interview.
>
> The other problem is that the folks on this news group are being
> most unhelpful to you. They aren't treating you as a fellow
> programer needing help with a specific problem at work. They are
> treating you as someone who is either:
> a) trying to cheat on an interview
> b) a student too lazy to do his/her homework
> c) both
>
> I remember an earnest young man who aproached me in a large
> public library He had just graduated from a
> fly-by-night computer school. He showed me his resume and asked
> me what the words in it meant. I almost cried.
>
>
> "Drink deep, or taste not of the Phyrrian spring;
> A little knowledge is a dangerous thing"
>
> (I think that was Alexander Pope but it's been half a century
> since I read those lines. My memory may be faulty.)
> --
> John Culleton
> Able Indexers and Typesetters
> (I did Cobol once. I think Nixon was president, or maybe Carter.)


Pete Dashwood

2006-07-05, 7:55 am


"John Culleton" <john@wexfordpress.com> wrote in message
news:otednXedhcSBiTbZnZ2dnUVZ_v2dnZ2d@ad
elphia.com...
> arrbee wrote:
>
>
> Well I see a couple of problems here. If in fact you have faced
> these questions on interviews, and if in fact the folks here gave
> you the correct answers then on your next interview you might get
> hired for a job you could not do. Either you know your stuff in
> these areas or you don't. If you don't you had best take some
> courses or read some manuals until you do. Programming is more
> than just knowing the right answers in an interview.
>


Good sound advice. Hope he takes it.

> The other problem is that the folks on this news group are being
> most unhelpful to you. They aren't treating you as a fellow
> programer needing help with a specific problem at work. They are
> treating you as someone who is either:
> a) trying to cheat on an interview
> b) a student too lazy to do his/her homework
> c) both
>


Now, why do you suppose that is? People here are just mean and nasty?

I for one, am tired of people who EXPECT to have their problems solved, for
free, just because they are a 'fellow programmer'... (most of them are not;
if they were, that would be different. That is one reason why people here
actually insist on seeing what has been done towards solving a problem
before offering help with it.)

The majority of the regulars here (with possible exclusion of self) are NOT
mean and nasty. But we all have our limits. On many occasions people receive
invaluable advice that they couldn't get anywhere else (without paying large
sums of money for), and they don't even say "Thanks."

I respect your right to respond however you see fit, John, and I think your
response is a measured, helpful, and fair one, but don't say that the rest
of us are a problem because we may appear unhelpful on occasion.

When you've been here as long as some of us, have posted many thousands of
lines to the forum, spent many hours/days/ws, over almost a decade,
helping people, and very often not even getting an acknowledgement, you may
have better insight into why the OP received the responses he did.


> I remember an earnest young man who aproached me in a large
> public library He had just graduated from a
> fly-by-night computer school. He showed me his resume and asked
> me what the words in it meant. I almost cried.
>

You concern is creditable, and many of us share it.
>
> "Drink deep, or taste not of the Phyrrian spring;
> A little knowledge is a dangerous thing"
>
> (I think that was Alexander Pope but it's been half a century
> since I read those lines. My memory may be faulty.)
> --
> John Culleton
> Able Indexers and Typesetters
> (I did Cobol once. I think Nixon was president, or maybe Carter.)

LOL!


arrbee

2006-07-05, 7:55 am

Thank you all..........

Pete Dashwood wrote:
> "John Culleton" <john@wexfordpress.com> wrote in message
> news:otednXedhcSBiTbZnZ2dnUVZ_v2dnZ2d@ad
elphia.com...
>
> Good sound advice. Hope he takes it.
>
>
> Now, why do you suppose that is? People here are just mean and nasty?
>
> I for one, am tired of people who EXPECT to have their problems solved, for
> free, just because they are a 'fellow programmer'... (most of them are not;
> if they were, that would be different. That is one reason why people here
> actually insist on seeing what has been done towards solving a problem
> before offering help with it.)
>
> The majority of the regulars here (with possible exclusion of self) are NOT
> mean and nasty. But we all have our limits. On many occasions people receive
> invaluable advice that they couldn't get anywhere else (without paying large
> sums of money for), and they don't even say "Thanks."
>
> I respect your right to respond however you see fit, John, and I think your
> response is a measured, helpful, and fair one, but don't say that the rest
> of us are a problem because we may appear unhelpful on occasion.
>
> When you've been here as long as some of us, have posted many thousands of
> lines to the forum, spent many hours/days/ws, over almost a decade,
> helping people, and very often not even getting an acknowledgement, you may
> have better insight into why the OP received the responses he did.
>
>
> You concern is creditable, and many of us share it.
> LOL!


Pete Dashwood

2006-07-05, 6:55 pm


"arrbee" <arrbee@gmail.com> wrote in message
news:1152100637.880481.168790@b68g2000cwa.googlegroups.com...
> Thank you all..........
>

Touche :-)

Pete.

> Pete Dashwood wrote:
>



HeyBub

2006-07-05, 6:55 pm

Holly wrote:
> I understand your point, John, but I do think people on this newsgroup
> have tried to help this poster in the past. In fact, he keeps asking
> the same questions. Now it would be different if this was simply an
> enthusiastic student who maybe didn't have access to the right
> training and needed clarification. But it's quite different to have
> the gall to post 10 pre-canned interview questions with a "TIA". I
> have tried to help provide links to the exact places in the ibm and
> DB2 manuals where he could look the answers up in the past, and never
> got a follow-up question. I doubt he has bothered to read a manual.
> Looking at the poster's history you can also see where other members
> have offered much better advice on the very same questions above,
> obviously to no avail.
>
>
> If he plans to get a job programming and doesn't know how to look up
> basic Cobol/DB2 questions in a manual, then I am afraid his future
> prospects are very grim. Either that, or ours will be.
>


Good point. A proper interview would be similar questions on arcane subjects
along with the manual containing the explanations. Sort of "open book test."

In my view, that exercise would be more useful.


john@wexfordpress.com

2006-07-10, 7:55 am


Pete Dashwood wrote:
> "John Culleton" <john@wexfordpress.com> wrote in message
> news:otednXedhcSBiTbZnZ2dnUVZ_v2dnZ2d@ad
elphia.com...


>
> Good sound advice. Hope he takes it.
>
>
> Now, why do you suppose that is? People here are just mean and nasty?
>
> I for one, am tired of people who EXPECT to have their problems solved, for
> free, just because they are a 'fellow programmer'... (most of them are not;
> if they were, that would be different. That is one reason why people here
> actually insist on seeing what has been done towards solving a problem
> before offering help with it.)
>

Yes to all you said. But I was addressing the original questioner, and
trying to explain to him/her in non-confrontational language why he was
not getting useful answers. I meant no disrespect to the members of
the group. I was simply holding up a mirror and asking in effect "Is
this you?"

COBOL forever.

John Culleton

arrbee

2006-07-13, 3:55 am

Hi, John Culleton.

Thanks for standing by me.
john@wexfordpress.com wrote:
> Pete Dashwood wrote:
>
> Yes to all you said. But I was addressing the original questioner, and
> trying to explain to him/her in non-confrontational language why he was
> not getting useful answers. I meant no disrespect to the members of
> the group. I was simply holding up a mirror and asking in effect "Is
> this you?"
>
> COBOL forever.
>
> John Culleton


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com