View previous topic :: View next topic
|
Author |
Message |
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Hi All,
These are the interview question asked in an interview. please tell me the answers for the below questions
What name will be there in the Load module if i compile a cobol program by giving different program id(eg:ABCDE) in the Identification division and the Cobol pgm name is different in the PDS as xx.yyy.zzzz(ABCD).
i said the compile itself will not be successful.
what will happen if we dont mention the SQLCA
EXEC Include SQLCA
END-EXEC.
in a COBOL-DB2 program
i said the errors,warnings and feedback will not be passed to the Cobol program.
In a VSAM(KSDS) file i want to update the Primary key at a particular location through COBOL Program.
i didnt answer this
In a GDG i am defining the Limit as 10 and creating 11th Version what will happen?
i said the 11 version will be created but the 10 version will not be there.
While executing a query in spufi if you get a -805 what will you do?
i didnt answer this |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
What name will be there in the Load module if i compile a cobol program by giving different program id(eg:ABCDE) in the Identification division and the Cobol pgm name is different in the PDS as xx.yyy.zzzz(ABCD).
i said the compile itself will not be successful. |
This is a poorly worded question -- if the question is asking about the member name of the module in the PDS, it will be ABCD. If the question is asking about the CSECT name within the load module for the main program, ABCDE will be the answer. Your answer that the compile will not be successful is not right.
Quote: |
In a VSAM(KSDS) file i want to update the Primary key at a particular location through COBOL Program.
i didnt answer this |
Another poorly worded question. If the requirement is to update a record with a primary key, read for update and rewrite does it. If the question is to change the primary key of a record, delete the old record and write the record with the new key.
Quote: |
In a GDG i am defining the Limit as 10 and creating 11th Version what will happen?
i said the 11 version will be created but the 10 version will not be there. |
Terminology is critical to IT. You should be aware that GENERATION and VERSION are both valid terms for a GDG and mean extremely different things. Your post uses "version" but implies "generation" -- it is a rookie mistake to confuse the two and says a lot about your lack of experience. Assuming you meant generation, the oldest generation will roll off (be uncataloged and maybe scratched depending upon the GDG definition) and the 11th generation will be cataloged to replace it. Your answer about the 10th <generation> is again not right since the 10th generation is presumably the newest. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
What name will be there in the Load module |
in the load module is the key phrase - the entry point will be the same as Program-ID.
depending on your JCL, the load module name in the load pds will be the same as your source module pds name.
the compile will not fail; there is no compiler check for Program-id = source file name.
Quote: |
what will happen if we dont (sic) mention the SQLCA |
if the SQLCA is not added by the precompiler, then you will have compile errors due to lack of reference names, e.g. SQLCODE.
Quote: |
In a VSAM(KSDS) file i want to update the Primary key at a particular location through COBOL Program. |
does not seem to be a question.
Quote: |
In a GDG i am defining the Limit as 10 and creating 11th Version what will happen? |
the limit of 10 is on generations; not versions.
Quote: |
While executing a query in spufi if you get a -805 what will you do? |
assume the sys-programmers are a stupid as your interviewer and they have failed to install SPUFI and DB2 properly. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Internally (bits and bytes) in the load module will contain the name on the ID section but the name of the load module, as well as its entry point can be anything you want as specified in the link edit control cards. The load module can even have multiple entry points (looks like multiple alias names in a PDS listing) though that leads to maintenance problems when people don't realize that is the case. The name of the source PDS has no bearing on the compile process at all except (except if you use debuggers) that the tools you use might use it for something (like generating JCL or linkedit cards to make the load module the same name as Dick said, or to create debug or listing files of the same name,e tc) |
|
Back to top |
|
|
|