Home > Archive > Cobol > June 2007 > 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 |
interview questions
|
|
| ebookstation@gmail.com 2007-05-30, 7:55 am |
| Hi !!
Can anyone help me out with these interview questions:
1. how can data be passed to dynamically called module without using
linkage section...
a)using same file in both calling module and called module.
b)using procedure division copybook.
c)using external variables.
d)using external variables and using same file in both calling and
called module.
e) putting data in common register.
2) 01 A PIC 9(2) value 20.
01 A PIC 9(2) value 90.
01 c PIC 9(2).
ADD A TO B GIVING C ON SIZE ERRROR DISPLAY 'OVERFLOW'
WHAT IS THE VALUE OF C?
A) NONE OF THE LISTED OPTION.
B) PROGRAM DISPLAYS 'OVERFLOW'
C) 10.
D) 110.
E) PROGRAM ABENDS
3) WHICH AMONG THE FOLLOWING ARE ADVANTAGE OF MENTIONING THE BLOCK
SIZE IN COBOL FILE DEFINITION..?
A) IN DASD THE INTER RECORD PHYSICAL SPACE IS LESSENED .SO DISK SPACE
IS SAVED.
B) IF BLOCK SIZE IS MENTIONED IN COBOL THEN WE MAY SKIP THE BLK SIZE
PARAMETER IN JCL.
C) I-0 BECOMES FASTER WHILE SEQUENTIALLY ERADING LARGE FILE ANMD IN
DASD THE INTER PHYSICAL SPACE ISLESSENED .SO DISK SPACE IS SAVED.
D)THAT HELPS COMPILE JCL EXECUETE FASTER.
4) suppose while execuetion .the JCL can't find the load module in the
library psecified in STEPLIB ,what will happen...?
a)program abend with code s0c4
b) program abend with code s0cE
c) program abend with code s0c3
d)program abend with code s806.
e) non of the listed option.
5) where does the load module of a called subroutine reside in case od
static linking..?
a) thereis no concept called static calling.
b) none of the statement is true.
c) they may reside in different load libraries but are linked togethe
with calling load in the os level.
d)they reside in the same load library where the calling module's load
reside.
e) they reside in the same load module of the calling program.
6) MOVE 3 TO WS-VLAUE.
GO TO VALUE-FOUR
VALUE-THREE
VALUE-TWO
VALUE-ONE
DEPENDING ON WS-VALUE.
WHERE WILL THE CONTROL GO AFTER EXECUETION OF THIS CODE...?\
A)CONTROL WILL GO TO VALUE-THREE.
B)CONTROL WILL GO TO VALUE-ONE.
C)CONTROL WILL GO TO VALUE-TWO
D)THIS IS MEANINGLESS CHUNK OF CODE.IT WILL WORK.
E) THE CONTROL WILL START FROM VALUE-FOUR PARA THEN FALL THRU TILL
VALUE-ONE PARA.
7) HOW TO MAKE SURE A SUBROUTINE IS CALLED DYNAMICALLY?
A) BY ADDING DYNAM IN COMPILER OPTION FOR CALLING MODULE.
B) BY ADDING DYNAM IN COMILER OPTION FOR CALLED MODULE AND USING
IDENTIFIER VARIABLE IN THE CALL STATEMENT.
C) BY ADDING DYNAM IN COMILER OPTION FOR CALLING MODULE AND USING
IDENTIFIER VARIABLE IN THE CALL STATEMENT.
D)BY ADDING DYNAM IN COMILER OPTION FOR CALLLED MODULE.
E)BY ADDING DYNAM IN COMILER OPTION FOR CALLING MODULE AND USING
LITERIAL IN THE CALL STATEMENT.
8) CAN KSDS CAN BE READ SEQUENTIALLY BACKWARD...?
A) YES THE FILE NEEDS TO BE OPEN IN EXTEND MODE.
B) NO, READ OPERATION ON KSDS CAN ONLY GO FORWARD.
C) YES THE KSDS NEEDS TO BE STARTED POINTING JUST AFTER THE LAST
RECORD ANS THEN USING READ PREVIOUS.
D)THE KSDS CAN BE STARTED FROM THE END BY MOVING HIGH VALUES TO THE
KEY BU THERE IS NO VERB AS READ PREVIOUS.
E) NONE OF THIS OPTION.
9) how to display the value of an index varibale...?
a) by using another s9(4) variable.
b) value of an index can never be displayed.
c) by using another s9(4) comp variable.
d) simply displaying the index variable itself.
e) by using another s9(4) comp-3 variable..
10) 10) ist there any upper/lower limit for the value in the record
contains clause for the FB files...?
a) no,theoretically it can have any value.
b) upper/lower limits are there but varies from installation to
installtion .
c) record contains can have values double than the block size.
d)upper limit is 2048 and lowerr limit is 2.
e) only upper limit is possible because lower limit is obviosly zero.
my answer...but im not sure..so that im looking for exact answer...
1.c
2.a
3.c
4.d
5.d
6.d
7.e
8.b
9.b
10.b
| |
|
| In article <1180503610.008994.240780@r19g2000prf.googlegroups.com>,
ebookstation@gmail.com <ebookstation@gmail.com> wrote:
>Hi !!
>Can anyone help me out with these interview questions:
Yes. I will help you by saying 'Learn the subject well enough so that you
are able to answer them on your own.'
DD
| |
| Binyamin Dissen 2007-05-30, 7:55 am |
| On 29 May 2007 22:40:10 -0700 "ebookstation@gmail.com"
<ebookstation@gmail.com> wrote:
:>Hi !!
:>Can anyone help me out with these interview questions:
Many can.
:>1. how can data be passed to dynamically called module without using
:>linkage section...
:>a)using same file in both calling module and called module.
:>b)using procedure division copybook.
:>c)using external variables.
:>d)using external variables and using same file in both calling and
:>called module.
:>e) putting data in common register.
Why would you want to avoid the linkage section?
:>2) 01 A PIC 9(2) value 20.
:>01 A PIC 9(2) value 90.
:>01 c PIC 9(2).
:>ADD A TO B GIVING C ON SIZE ERRROR DISPLAY 'OVERFLOW'
:>WHAT IS THE VALUE OF C?
:>A) NONE OF THE LISTED OPTION.
:>B) PROGRAM DISPLAYS 'OVERFLOW'
:>C) 10.
:>D) 110.
:>E) PROGRAM ABENDS
Compiler error.
:>3) WHICH AMONG THE FOLLOWING ARE ADVANTAGE OF MENTIONING THE BLOCK
:>SIZE IN COBOL FILE DEFINITION..?
:>A) IN DASD THE INTER RECORD PHYSICAL SPACE IS LESSENED .SO DISK SPACE
:>IS SAVED.
:>B) IF BLOCK SIZE IS MENTIONED IN COBOL THEN WE MAY SKIP THE BLK SIZE
:>PARAMETER IN JCL.
:>C) I-0 BECOMES FASTER WHILE SEQUENTIALLY ERADING LARGE FILE ANMD IN
:>DASD THE INTER PHYSICAL SPACE ISLESSENED .SO DISK SPACE IS SAVED.
:>D)THAT HELPS COMPILE JCL EXECUETE FASTER.
Why would you want to do that?
:>4) suppose while execuetion .the JCL can't find the load module in the
:>library psecified in STEPLIB ,what will happen...?
:>a)program abend with code s0c4
:>b) program abend with code s0cE
:>c) program abend with code s0c3
:>d)program abend with code s806.
:>e) non of the listed option.
Depends.
:>5) where does the load module of a called subroutine reside in case od
:>static linking..?
:>a) thereis no concept called static calling.
:>b) none of the statement is true.
:>c) they may reside in different load libraries but are linked togethe
:>with calling load in the os level.
:>d)they reside in the same load library where the calling module's load
:>reside.
:>e) they reside in the same load module of the calling program.
I thought static linking was out of style.
:>6) MOVE 3 TO WS-VLAUE.
:>GO TO VALUE-FOUR
:>VALUE-THREE
:>VALUE-TWO
:>VALUE-ONE
:>DEPENDING ON WS-VALUE.
:>WHERE WILL THE CONTROL GO AFTER EXECUETION OF THIS CODE...?\
:>A)CONTROL WILL GO TO VALUE-THREE.
:>B)CONTROL WILL GO TO VALUE-ONE.
:>C)CONTROL WILL GO TO VALUE-TWO
:>D)THIS IS MEANINGLESS CHUNK OF CODE.IT WILL WORK.
:>E) THE CONTROL WILL START FROM VALUE-FOUR PARA THEN FALL THRU TILL
:>VALUE-ONE PARA.
You will go to the employment for failing to write structured code.
:>7) HOW TO MAKE SURE A SUBROUTINE IS CALLED DYNAMICALLY?
:>A) BY ADDING DYNAM IN COMPILER OPTION FOR CALLING MODULE.
:>B) BY ADDING DYNAM IN COMILER OPTION FOR CALLED MODULE AND USING
:>IDENTIFIER VARIABLE IN THE CALL STATEMENT.
:>C) BY ADDING DYNAM IN COMILER OPTION FOR CALLING MODULE AND USING
:>IDENTIFIER VARIABLE IN THE CALL STATEMENT.
:>D)BY ADDING DYNAM IN COMILER OPTION FOR CALLLED MODULE.
:>E)BY ADDING DYNAM IN COMILER OPTION FOR CALLING MODULE AND USING
:>LITERIAL IN THE CALL STATEMENT.
By not calling it staticly, of course.
:>8) CAN KSDS CAN BE READ SEQUENTIALLY BACKWARD...?
:>A) YES THE FILE NEEDS TO BE OPEN IN EXTEND MODE.
:>B) NO, READ OPERATION ON KSDS CAN ONLY GO FORWARD.
:>C) YES THE KSDS NEEDS TO BE STARTED POINTING JUST AFTER THE LAST
:>RECORD ANS THEN USING READ PREVIOUS.
:>D)THE KSDS CAN BE STARTED FROM THE END BY MOVING HIGH VALUES TO THE
:>KEY BU THERE IS NO VERB AS READ PREVIOUS.
:>E) NONE OF THIS OPTION.
Depends if the KSDS is on cards.
:>9) how to display the value of an index varibale...?
:>a) by using another s9(4) variable.
:>b) value of an index can never be displayed.
:>c) by using another s9(4) comp variable.
:>d) simply displaying the index variable itself.
:>e) by using another s9(4) comp-3 variable..
By abending. The index variable will be in the dump.
:>10) 10) ist there any upper/lower limit for the value in the record
:>contains clause for the FB files...?
:>a) no,theoretically it can have any value.
:>b) upper/lower limits are there but varies from installation to
:>installtion .
:>c) record contains can have values double than the block size.
:>d)upper limit is 2048 and lowerr limit is 2.
:>e) only upper limit is possible because lower limit is obviosly zero.
Why would you specify it?
:>my answer...but im not sure..so that im looking for exact answer...
:>1.c
:>2.a
:>3.c
:>4.d
:>5.d
:>6.d
:>7.e
:>8.b
:>9.b
:>10.b
--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
| |
| Pete Dashwood 2007-05-30, 7:55 am |
|
<ebookstation@gmail.com> wrote in message
news:1180503610.008994.240780@r19g2000prf.googlegroups.com...
> Hi !!
> Can anyone help me out with these interview questions:
I have some sympathy for you because at least you posted your answers.
Unfortunately, the nature of a such an interview test is to assess YOUR
knowledge of the subject, not ours.
I don't understand why you would ask us to do this and if I was interviewing
you, I'm afraid you would fail (even if your answers below were all 100%
correct (and they are not...). See, doing what you are doing is actually
dishonest, and I'd rather have a less accomplished honest programmer than a
brilliant dishonest one.
It may be that you are doing this in all innocence, the interview having
passed. That being so, you could ask the people who set the test what
answers they were expecting. There are so many errors in the questions that
the expected answers are not would actually happen. I realize that English
is probably not your first language, neither is it the first language of the
people who set this test, but you (and they) must understand that
programming requires attention to detail and spelling is important.
(Especially in COBOL). If someone gave me this test I would first correct
the questions before I would even attempt to answer them.
It would be very easy to go through your questions and post unhelpful, smart
answers to them. Because you posted your answers, I won't do that.
My advice would be to think about what is important in your life and the
kind of person you want to be. Do you think that being a programmere means
taking the easy way? If you can be something more than you are at present,
it is very likely that you would be an asset to any programming team, even
if you didn't get 100%.
Find out who you really are and present that at your interview.
Good luck.
Pete.
| |
| Michael Mattias 2007-05-30, 7:55 am |
| <ebookstation@gmail.com> wrote in message
news:1180503610.008994.240780@r19g2000prf.googlegroups.com...
> 4) suppose while execuetion .the JCL can't find the load module in the
> library psecified in STEPLIB ,what will happen...?
> a)program abend with code s0c4
> b) program abend with code s0cE
> c) program abend with code s0c3
> d)program abend with code s806.
> e) non of the listed option.
You are kidding me, that don't ask questions like this, do they? Expecting
people to know the specific abend codes resulting from various errors? I
would think the correct answer is, "Program abends, and just as with any
abend you look up the error code to figure out why."
(Strangely enough, although I haven't worked on a mainframe in over five
years, I actually know the answer to this one. But that probably says a lot
more about my (lack of?) ability to 'set up' JCL than it does about my
ability to create an application).
(FWIW, I remember S0C3 and S0C4 are more common than the other two, but
darned if i can tell you what each means. I think one is invalid address and
one is numeric exception? Oh well, that's why the manual exists, so you can
look 'em up when they happen.)
MCM
| |
| Michael Mattias 2007-05-30, 7:55 am |
| "Binyamin Dissen" <postingid@dissensoftware.com> wrote in message
news:olcq5359kgu5js8nnvu5mnj78phsogdqev@
4ax.com...
> On 29 May 2007 22:40:10 -0700 "ebookstation@gmail.com"
> <ebookstation@gmail.com> wrote:
>
> :>9) how to display the value of an index varibale...?
>
> :>a) by using another s9(4) variable.
> :>b) value of an index can never be displayed.
> :>c) by using another s9(4) comp variable.
> :>d) simply displaying the index variable itself.
> :>e) by using another s9(4) comp-3 variable..
> By abending. The index variable will be in the dump.
I like this one a lot.
MCM
| |
| hp3kpro 2007-05-30, 7:55 am |
| This smells more like a final exam than an interview to me....
Either way, you do the research.
| |
| Binyamin Dissen 2007-05-30, 7:55 am |
| On Wed, 30 May 2007 06:32:31 -0500 "Michael Mattias" <mmattias@talsystems.com>
wrote:
:>(FWIW, I remember S0C3 and S0C4 are more common than the other two, but
:>darned if i can tell you what each means. I think one is invalid address and
:>one is numeric exception? Oh well, that's why the manual exists, so you can
:>look 'em up when they happen.)
S0C3 is quite rare when unforced (and is often used to force an abend). It is
the execute of an execute (maps to interrupt code 3). I prefer an 0C6.
S0C4 is the catch-all for accessing or modifying storage that either does not
exist in your virtual memory or is protected. Maps to many different interrupt
codes, including 4, x'10' and x'11'.
S0C7 is the decimal data exception (program interrupt 7)
--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
| |
| Michael Mattias 2007-05-30, 7:55 am |
| It's still IMNSHO totally silly to ask a potential employee to have
memorized abend codes.
Given this kind of 'enlightened' management it must be a simply wonderful
place to work.
MCM
| |
| Howard Brazee 2007-05-30, 6:55 pm |
| On 29 May 2007 22:40:10 -0700, "ebookstation@gmail.com"
<ebookstation@gmail.com> wrote:
>Hi !!
>Can anyone help me out with these interview questions:
>1. how can data be passed to dynamically called module without using
>linkage section...
While we can answer those questions - we need to know your goals to be
able to "help you out".
Are you creating questions to find out whether prospective employees
are competent?
Are you trying to fool employers into thinking you are competent? (If
so, can you come up with a reason that we could morally agree to
assist you? Or at least so that we can do so without hurting our
industry and thus our material comfort?)
| |
| William M. Klein 2007-05-30, 6:55 pm |
| A) Yes, they expect you to know some of the more common ABEND codes
B) The interesting thing is that I would probably have put ""e)" because after
looking in STEPLIB, it would then look in JOBLIB (if available) and then
LINKLIST/LPA. However, I doubt that is the answer they want (but it might be) -
and I have always had some problems remembering the full library search order.
--
Bill Klein
wmklein <at> ix.netcom.com
"Michael Mattias" <mmattias@talsystems.com> wrote in message
news:qkd7i.4584$u56.2119@newssvr22.news.prodigy.net...
> <ebookstation@gmail.com> wrote in message
> news:1180503610.008994.240780@r19g2000prf.googlegroups.com...
>
> You are kidding me, that don't ask questions like this, do they? Expecting
> people to know the specific abend codes resulting from various errors? I
> would think the correct answer is, "Program abends, and just as with any abend
> you look up the error code to figure out why."
>
> (Strangely enough, although I haven't worked on a mainframe in over five
> years, I actually know the answer to this one. But that probably says a lot
> more about my (lack of?) ability to 'set up' JCL than it does about my
> ability to create an application).
>
> (FWIW, I remember S0C3 and S0C4 are more common than the other two, but darned
> if i can tell you what each means. I think one is invalid address and one is
> numeric exception? Oh well, that's why the manual exists, so you can look 'em
> up when they happen.)
>
> MCM
>
>
| |
| Clark F Morris 2007-06-05, 9:55 pm |
| On Wed, 30 May 2007 19:44:08 GMT, "William M. Klein"
<wmklein@nospam.netcom.com> wrote:
>A) Yes, they expect you to know some of the more common ABEND codes
>
>B) The interesting thing is that I would probably have put ""e)" because after
>looking in STEPLIB, it would then look in JOBLIB (if available) and then
>LINKLIST/LPA. However, I doubt that is the answer they want (but it might be) -
>and I have always had some problems remembering the full library search order.
A quibble. If there is a STEPLIB, the JOBLIB is ignored.
|
|
|
|
|