Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

IBM interview questions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
mohanrao

New User


Joined: 11 Jun 2005
Posts: 13
Location: bangalore

PostPosted: Sat Apr 18, 2009 9:36 pm    Post subject: IBM interview questions
Reply with quote

I have attended IBM interview today and was asked these below questions.
Request you to kindly give your inputs on the same.

1) In a test jcl if I want to use a step say step number 5 from a cataloged procedure how will I code the same in my test jcl?

2) In my cobol program in the working storage section I have defined my tabel structure as below

01 employee
05 empno pic 9(5)
05 doj pic x(8)
05 esal pic 9(4)v9(2)

Now what if I want to perform a search -a)on empno and doj b) all the three fields ideally I will be searching the values from my data base (table) that means I will check the data from my table and those against the working -storage fields
Hence for this which search is highly effective?- Is it linear or binary?

3.In a flat file I have 100 records length of each record is 80 bytes
now in my ouput file
I want to write first 50 records on the lefthand side wherein my records will be spillted say 1st 40 bytes on one line and remaining on the next line this how 50 records are to be written on LHS and 51- 100 are to be wriiten on Refthandside in the same manner

Can you please provide a link for interview questions in specific to GDG in VSAM.

Thanks for your patience in reading my lengthy mail.
My sincere apologies for the mistakes from my side

Mohan
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Apr 18, 2009 10:02 pm    Post subject:
Reply with quote

Hello,

Suggest you post your answers to those questions and people here will tell how you did icon_smile.gif

Quote:
a link for interview questions in specific to GDG in VSAM.
I believe there is none. . .
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun Apr 19, 2009 1:48 am    Post subject:
Reply with quote

Your questions are very difficult to understand. I believe they are paraphrased from your memory. You need to be more precise if you expect any answers after you have given us your answers as Dick has asked.
Back to top
View user's profile Send private message
mohanrao

New User


Joined: 11 Jun 2005
Posts: 13
Location: bangalore

PostPosted: Sun Apr 19, 2009 7:06 pm    Post subject:
Reply with quote

Hi All,

Sorry for the inconvienence caused. I am rephrasing the questions and also providing my answers to them request you to please provides your inputs

1) There is a cataloged procedure say consisting of 10 steps.
If I want to use 5th step of that proc in my testjcl( jcl which I have developed) how will I refer that 5th step in my test jcl?

My answer to the above question : I will use procstep.stepname in my JCL

2) In the working storage section a table structure is defined as below
Code:
01 EMPLOYEE
05 EMPNAME   PIC  X(20).
05 EMPSAL    PIC  9(4)V9(2).
05 DOF       PIC  X(8)

If I want to perform a search on
1) on all the three fields
2)on EMPNAME and DOJ

Which search I will opt for ?
( here search will done against to the values that are aleardy there in the table)
That’s what the interviewer replied ,

My answer : I will declare a cursor , from the console I will accept the values for Empname, Empsal, Doj and I will do a fetch and compare the values in the table and my host variables that would be linear search

3.

Code:
A=3

Evaluate true
   When A<1
      Move 2 to B
   When A>5
      Move 3 to B
   When A=3
      Move 5 to B
End-evaluate


What would be the value of B ?

My answer : 5


4) I have a flat file of 100 records of record length 80 byres.
In the ouput file I would like to have as below

(on the left hand side 1- 40 bytes of first record and on the right handside 1-40 bytes 0f 51st record)
1--40 bytes of first record 1-40 bytes of 51st record
41-80 bytes of first record 41-80 bytes of 51st record

1--40 bytes of second record 1—40 bytes of 52nd record

41-80 bytes of second record 41-80 bytes of 52nd record .

...
.
.
.
1--40 bytes of 50th record 1-40 bytes of 100th record
41-80 bytes of 50th record 41-80 bytes of 100th record


I got confused for this and did not answer

Thanks,
Mohan
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Apr 20, 2009 8:50 am    Post subject:
Reply with quote

For 4th question I would have used ICETOOL SPLICE.

Put seq. number from 1 to 50 for first 50 rec, seq. number from 1 to 50 for last 50 rec and do splice on seq number.
if you are putting seq. number at 81,2,zd then your splice statement would be

SPLICE FROM(IN) TO(OUT) ON(81,2,CH) WITH(41,40) USING(CTL1)

In CTL1CNTL you can remove seq. number in output.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 20, 2009 9:29 am    Post subject:
Reply with quote

Hello,

Quote:
Sorry for the inconvienence caused.
Not to worry - we will work with you to get your topics the way you want them to be. May take a couple of iterations, but we'll get there icon_smile.gif

It looks like you have a good start on your questions. I made some minor formating changes to your post for alignment and readability. If i've changed anything that is not what you want, just let me know and i'll fix it.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Apr 20, 2009 6:53 pm    Post subject:
Reply with quote

2. What you've defined is not a table. Tables require an OCCURS clause. See Table Handling.
3. Correct. What would be the value of B if A=4? (Extra credit icon_smile.gif ). See EVALUATE statement in the Language Reference manual.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 20, 2009 7:07 pm    Post subject:
Reply with quote

Hello,

Maybe a database table. . .?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Apr 20, 2009 7:14 pm    Post subject:
Reply with quote

Because of the reference to WORKING STORAGE section, and "linear" and "binary" searches in the question, and because of the interviewer's answer, it looks like a COBOL table question, not a data base table question. Can you clarify, Mohan?
Back to top
View user's profile Send private message
mohanrao

New User


Joined: 11 Jun 2005
Posts: 13
Location: bangalore

PostPosted: Tue Apr 21, 2009 12:06 pm    Post subject:
Reply with quote

Hi Terry,

Interviewer asked me like this...

The table structure is like the below
01 EMPLOYEE
05 EMPNAME PIC X(20).
05 EMPSAL PIC 9(4)V9(2).
05 DOJ PIC X(8)

and he wants to perform a search (linear/binary) from these working storage variables in to the emp table (db2) and find out the best suitable option.

Please let me know if I am not clear in making you understand the question.

Regards,
Mohan
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 21, 2009 8:38 pm    Post subject:
Reply with quote

Hello,

To retrieve the data from the db2 table, you would use 2 different select statements for the 2 different requirements. Your code should not have anything to do with a linear or binary search. . .

Both selects should be driven by using keys/indexes in the table. If the predicates for the select statements are not keys, a full table traversal would be required (possibly what the interviewer meant by "linear").
Back to top
View user's profile Send private message
mohanrao

New User


Joined: 11 Jun 2005
Posts: 13
Location: bangalore

PostPosted: Wed Apr 22, 2009 12:30 am    Post subject:
Reply with quote

Hi Dick,

Thank you so much for the reply. Request you to kindly provide your inputs on the remaining questions.

Regards,
Mohan
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 22, 2009 3:14 am    Post subject:
Reply with quote

Hello,

You're welcome icon_smile.gif

The other questions have already been answered (unless i've missed something). If there is something that is not clear, post what is not clear and someone will be able to clarify.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts SAS Programming - Basic Questions Techelm All Other Mainframe Topics 3 Fri Mar 18, 2016 10:53 pm
No new posts Where can i find Interview questions ... Elixir Mainframe Interview Questions 4 Sat Feb 20, 2016 12:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us