IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Ineterview Questions Asked at MNC


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sreekanth1984

New User


Joined: 23 Mar 2010
Posts: 22
Location: Bangalore

PostPosted: Wed Oct 19, 2011 11:13 am
Reply with quote

Following questions are asked in an interview. I posted along with my answers.... Please correct me......

Question 1. A new column is added to DB2 table which is having data. COBOL program is reading the DB2 table and

writing output to a file. What are the changes that we need to do on DB2 part and COBOL part and in JCL….?

My Ans:

On DB2 part thru ALTER statement we need to add the column, apart from that no other changes. On COBOL part if we

want to use new added column we need to change the cursor statement to include the column in select statement and

precompile and bind the program. On RUN JCL there is no change, if the file has enough space to accumulate new

column.

Interviewer is not convinced with this answer.....and expecting some more changes on DB2 part....

My concern:

If the new column is added to DB2 table, is the existing data gets invalidated? Do we need to DROP the existing table

and then create the table with new column?

But I have tested this scenario, I have added new column to the existing table. But the data is not get

invalidated/corrupted. I have run the COBOL program which was using this table with out any changes done to the

program. It has completed successfully. I didn't precompile and rebound the program as I am not done changes to this

program.

Question 2.In a COBOL DB2 program, only COBOL statements are changed do we need bind the program?

My Ans:

Yes we need to bind the programm. Reason is as COBOL statements are changed, we need to compile the program. New

time stamps are generated for DBRM and COBOL load module and we need to bind the program.


Question 3. How to specify RESTART in a JCL?

My Ans: On the Job card RESTART=STEPNAME


Question 4.Difference between MAXCC and RETURN?

My Ans: MAXCC lists the maximum completion codes of all steps in JCL and RETURN will give last step completion

code. Assumed similar to LASTCC

Question 5. By looking into COBOL code updo procedure division, how will we know whether file used in the program is

PS or VSAM file?

My Ans: By looking SELECT statement we can say the file is VSAM or PS. Based on the Key, access mode.

My doubt is processing VSAM ESDS file and PS file is same, we can't distinguish between them.

Question 6: Can we write PROC inside a PROC in JCL?

My Ans: Yes

Question 7.In a COBOL-DB2-CICS program, how will CICS know about the DB2 table and about the VSAM file that has been

used in the program?

My Ans: In RCT DB2 table will be defined, which is done through binding process. In FCT we will define file

attributes.

Question 8. What are the entries in PPT?

My Ans: Mapset and Program.....Interviewer was expecting more details....


Thanks....
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Wed Nov 02, 2011 1:49 am
Reply with quote

Question 1: Null's need to be handled

Question 5: ESDS should have ORGANIZATION IS SEQUENTIAL
PS should not have an organization type mentioned in COBOL

Ouestion 6: Nested proc's are possible but restart and overrides become difficult

Question 8 : Program name, Language and Status should be enough.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Nov 02, 2011 1:55 am
Reply with quote

Elixir wrote:
Question 1: Null's need to be handled


In what way would NULLs need to be handled?
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Wed Nov 02, 2011 11:26 pm
Reply with quote

New_Column_name Type NOT NULL
Also put some values to new column based on some condition if required.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Nov 03, 2011 12:05 am
Reply with quote

If the new column is not null then you have to provide a default value when you define it.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Nov 05, 2011 1:00 am
Reply with quote

The part of this I'll never understand, is why do these questions bounce around between such disparate topics so often? I can understand where a position for a COBOL/CICS/DB2 role might need to know some of these, but what's the point of questions 3,4,5 & 6 for someone applying for that role?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sat Nov 05, 2011 1:20 am
Reply with quote

Quote:
My doubt is processing VSAM ESDS file and PS file is same, we can't distinguish between them.
Actually, if you click on the manuals link at the top of this page, find the COBOL Language Reference manual, and read section 4.2.3 -- you will find that you CAN tell the difference between a VSAM ESDS and sequential file as the ASSIGN must be in the format AS-ddname for a VSAM ESDS file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Nov 05, 2011 10:08 am
Reply with quote

Hello,

Quote:
but what's the point of questions 3,4,5 & 6 for someone applying for that role?
At nearly every site i've supported, even the "junior" (not to be confused with trainee/fresher/rookie/etc) developers are expected to understand these concepts. Most expect the code developers to also be able to test what they've written. These "disciplines" are needed by those who write their own batch test jobs.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Nov 05, 2011 2:50 pm
Reply with quote

As an interviewee how would you make sure that you get a perfect Interviewer for the job you are applying for - go by politically correct version of my signature, Kevin, and you'll understand why such question might come.

In a way you are correct Kevin - however, these days, I observe a trend of employing a "generic candidate" instead of "master-of-something-candidate". They need labour not the programmers or analyst.
Back to top
View user's profile Send private message
db2sysdba.zos

New User


Joined: 04 Oct 2011
Posts: 25
Location: INDIA

PostPosted: Mon Nov 28, 2011 7:07 pm
Reply with quote

Hi sreekanth1984,

Quote:
Interviewer is not convinced with this answer.....and expecting some more changes on DB2 part....

I hope your interviewer was expecting this answer.

When you add a column to a table, the table space is placed into advisory
REORG-pending status.


So you need to reorg the tablespace.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Mon Nov 28, 2011 8:06 pm
Reply with quote

When you add a column to a table, it is generally a good idea to update the DCLGEN that is customarily used to declare the table. You do not *have* to do this, but you will get extra credit from the interviewer if you point this out. You should also recompile all programs that use the DCLGEN, even if they don't refer to the new column. Again, you don't *have* to, but it is a good practice. YMMV.
Back to top
View user's profile Send private message
chaky

New User


Joined: 28 May 2009
Posts: 20
Location: Bangalore

PostPosted: Mon Dec 12, 2011 1:34 pm
Reply with quote

Apart from all other things explained earlier, adding one more thing.

For adding a new column into DB2 table, one should unload the data and then load it again after the new column is added into the table. By doing this we will not be atleast making sure that data is not hampered by any kind of operation.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Comp interview questions Mainframe Interview Questions 5
No new posts Interview Questions on Cobol DB2 program Mainframe Interview Questions 5
No new posts Mainframe Interview Questions CICS,CO... Mainframe Interview Questions 6
No new posts Viewing executing process in NDM .. q... IBM Tools 0
No new posts INCLUDE condition questions DFSORT/ICETOOL 1
Search our Forums:

Back to Top