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
 

 

Mainframe Developer Interview Questions

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

New User


Joined: 21 Dec 2014
Posts: 11
Location: India

PostPosted: Wed Jan 07, 2015 8:58 pm    Post subject: Mainframe Developer Interview Questions
Reply with quote

Hello everybody...

Today I faced an interview for the position of "Mainframe Developer"..

I was asked below questions..

1) If you have multiple steps in a JCL.. and you want to start execution from step 5.. what shoul you do?

2) If you have multiple input files for a single DDNAME.. and for an occassion if you want only first input file and not the rest.. what you will do?

3) In a JCL, if you want to start execution from the step 5 and dont want to execute further steps.. what will you do?

4) If a CEO wants to see all employees of the company from an online screen.. how will be the design of the MAP from the developer point of view?

5) What is the difference between XCTL and LINK?

6) What are the different ways you can pass data between transaction?

7) What you know about static call and dynamic call? What you will prefer in what occasion?

8) How you can delete a record from a PS file in COBOL?

9) How you write logic in COBOL to check if a value of one string is the mirror image of the value of a second string? Both strings with PIC X(100).

10) can't remember.. will update if remind it..

Anyways.. I answered most of the question right as per my understanding [Hopeful].. Interested people can discuss here..

It will be interesting to see different answers.. something new may come out of the discussion..
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Jan 08, 2015 3:13 am    Post subject:
Reply with quote

Welcome!!

Why don't you please post your answers too? Or let us know what you couldn't answer.
Back to top
View user's profile Send private message
Milin

New User


Joined: 21 Dec 2014
Posts: 11
Location: India

PostPosted: Thu Jan 08, 2015 10:45 am    Post subject:
Reply with quote

1) If you have multiple steps in a JCL.. and you want to start execution from step 5.. what shoul you do?
My ANS: RESTART parameter in job statement

2) If you have multiple input files for a single DDNAME.. and for an occassion if you want only first input file and not the rest.. what you will do?
My ANS: put DD DUMMY after first input file.. so it will be end of file and following files wont be considered

3) In a JCL, if you want to start execution from the step 5 and dont want to execute further steps.. what will you do?
My ANS: RESTART=STEP5 in the job statement and then put COND for the sixth step such that all steps after STEP5 will be bypassed

4) If a CEO wants to see all employees of the company from an online screen.. how will be the design of the MAP from the developer point of view?
My ANS: On master screen we can allow redirection to employee screen through EIBAID concept of key triggering.. on employee screen.. certain options can be provided such as display.. edit.. delete.. and based on the checked option redirection to the employee detail display screen..

5) What is the difference between XCTL and LINK?
My ANS: both of them do the same job i.e calling the program.. XCTL is preferred over LINK due to overhead and performance reasons.. in LINK option if we modify the subprogram.. then we only need to compile subprogram.. while in the case of XCTL.. we will need to compile main program and sub program as well..

6) What are the different ways you can pass data between transaction?
My ANS: certain ways we can achieve this.. on way is COMMAREA.. another is QUEUE if data amount is significant.. we can use EXEC CICS RETURN for this.. we can also use EXEC CICS LINK.. if we want to open any file.. we can pass the SET statement through COMMAREA WS variable..

7) What you know about static call and dynamic call? What you will prefer in what occasion?
My ANS: dynamic call is flexible but slow as far as performance is considered.. but static call is fast and unflexible.. also we need to compile both main program and sub program in case of changes for static call.. whereas in case of dynamic call.. we just need to compile subprogram..

8) How you can delete a record from a PS file in COBOL?
My ANS: I answered something.. but they said i was not correct.. they said we cant do this with PS file something like that.. i think PS file sud be copied first into a VSAM file and then we can use file handling operation.. but I forgot to mention this PS to VSAM copy process and directly answered with file handling operations.. i said that we can open the file in I-O mode and then use READ routine.. and the use DELETE [filename] RECORD statement for this task..

9) How you write logic in COBOL to check if a value of one string is the mirror image of the value of a second string? Both strings with PIC X(100).
My ANS: just answered with high level logic without any syntax or something.. i guess logic was alright.. but I could have mentioned INSPECT element concept.. i had read that when i got home after interview.. was sad about that..

Anyways.. so these were my answers.. and now i am expecting someone here to correct me and to add something really interesting to this knowledge.. icon_rolleyes.gif icon_biggrin.gif icon_smile.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Jan 08, 2015 1:19 pm    Post subject: Reply to: Mainframe Developer Interview Questions
Reply with quote

In 3) you need to change more than just the COND for step six.

4) is a plain dumb question. It has about a billion answers not knowing their system and not so many once their system is known.

5) you need to put a lot of work into.

6) I'm not sure what you mean by the last part of your answer.

7) you need to put work into.

8) you certainly can't delete from a PS. If you want to do that, you just write to a new PS without the record to be deleted.

9) high-level answers can be fine. "Reverse one field and compare to the other" seems fine. How that is implemented can depend on other factors not contained in the question. However, how would you use INSPECT in this?
Back to top
View user's profile Send private message
Milin

New User


Joined: 21 Dec 2014
Posts: 11
Location: India

PostPosted: Thu Jan 08, 2015 1:33 pm    Post subject: Re: Reply to: Mainframe Developer Interview Questions
Reply with quote

Bill Woodger wrote:
In 3) you need to change more than just the COND for step six.

4) is a plain dumb question. It has about a billion answers not knowing their system and not so many once their system is known.

5) you need to put a lot of work into.

6) I'm not sure what you mean by the last part of your answer.

7) you need to put work into.

8) you certainly can't delete from a PS. If you want to do that, you just write to a new PS without the record to be deleted.

9) high-level answers can be fine. "Reverse one field and compare to the other" seems fine. How that is implemented can depend on other factors not contained in the question. However, how would you use INSPECT in this?


Hi bill,

Thanks for this.

3) i believe we can play with COND parameter such that the steps will get bypassed.. isn't that?

6) I wanted to say that the file open command can be written into the WS-COMMAREA and then we can execute EXEC CICS LINK..END-EXEC sentence.. i remember that we need to use DFHEMPT master terminal program in this process.. isn't that the scenario of "passing data between transaction/programs?"

9) They said that to me in the interview also, "Do you know INSPECT element?" that's how i got to know that INSPECT should be useful in that case.. further i am refreshing my knowledge right now.. may be I will get to know this..

I have worked on mainframe systems for 2 years.. i left the job one year back to start some business.. but as i dropped my idea.. i return to this field.. somewhat in the phase of refreshing my knowledge.. hopefully i will get my form back icon_biggrin.gif

anyways.. Bill, can you please see my understanding mentioned above? I am keen to know more and more now..
Back to top
View user's profile Send private message
Milin

New User


Joined: 21 Dec 2014
Posts: 11
Location: India

PostPosted: Sun Jan 11, 2015 8:42 pm    Post subject:
Reply with quote

Updating few answers with correction:

3) In a JCL, if you want to start execution from the step 5 and dont want to execute further steps.. what will you do?

Correct Ans: RESTART=STEP5 in the job statement.. and COND=((0,EQ,STEP5),(0,NE,STEP5)) in all the later steps.. or another way as below:

//..... JOB .... RESTART=STEP5..
//...
//STEP5 EXEC...
//IF1 IF ( STEP5.RC = 0 & STEP5.RC <> 0) THEN
//STEP6 EXEC..
//STEP7 EXEC..
//....
// ENDIF
/*

5) What is the difference between XCTL and LINK?

Correct Ans: program called by XCTL is not expected to GO BACK to the main program.. whereas program called by LINK is. So XCTL is used to call program at the same logical level whereas LINK for the next logical level... i believe this answer makes sense..
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Sun Jan 11, 2015 10:19 pm    Post subject:
Reply with quote

3. The simplest is to edit the JCL to include just the one step and submit it

6. DFHCOMMAREA, TS Queue, TWA, CWA, containers would all work to pass data between CICS programs. Also, data can be written to a VSAM file by one program and read by a different program

9. I would use intrinsic FUNCTION REVERSE to create a copy of one of the variables, then compare the reversed data to the other variable. An alternate method would be to use reference modification to compare byte 1 of one variable to byte 100 of the other variable, then 2 to 99 ... until a mismatch is reached or all bytes have compared equal. INSPECT would not be a preferred method as the FUNCTION REVERSE would require one extra variable and a MOVE / IF statements and that's all.
Back to top
View user's profile Send private message
Milin

New User


Joined: 21 Dec 2014
Posts: 11
Location: India

PostPosted: Sun Jan 11, 2015 11:51 pm    Post subject:
Reply with quote

Robert Sample wrote:
3. The simplest is to edit the JCL to include just the one step and submit it

6. DFHCOMMAREA, TS Queue, TWA, CWA, containers would all work to pass data between CICS programs. Also, data can be written to a VSAM file by one program and read by a different program

9. I would use intrinsic FUNCTION REVERSE to create a copy of one of the variables, then compare the reversed data to the other variable. An alternate method would be to use reference modification to compare byte 1 of one variable to byte 100 of the other variable, then 2 to 99 ... until a mismatch is reached or all bytes have compared equal. INSPECT would not be a preferred method as the FUNCTION REVERSE would require one extra variable and a MOVE / IF statements and that's all.


Hi Robert,

Thanks for your input..

9) Reference modification was the one I replied with in my interview.. but then they told me that the values of the strings can be of any length.. not just X(100).. I again replied that.. we will have to check the lengths of the values of string variables.. at this stage.. they asked me how I gonna check the length.. n I was trapped there.. as it is one year from now I used mainframe.. i got confused at this stage of the interview.. They told me that we can do so by INSPECT element... that's how I got the idea..

Do you have anything to say on this. Robert? icon_rolleyes.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Jan 12, 2015 4:37 am    Post subject:
Reply with quote

COBOL does not support strings in the sense that other languages have strings (where the length varies at run time). COBOL supports variable length data in FILE SECTION and LINKAGE SECTION but every variable in WORKING-STORAGE (even with OCCURS DEPENDING ON) has a fixed length (for ODO variables, the length is the maximum occurs). Intrinsic FUNCTION LENGTH will return the current length of ODO variables in FILE or LINKAGE SECTION but the maximum possible length for WORKING-STORAGE SECTION variables. If the variable is in LINKAGE SECTION, reference modification could be used, or INSPECT (probably -- I'd have to think about it to say absolutely that it could).

This sounds like a trick question where they keep pushing until they find something the interviewee doesn't know.
Back to top
View user's profile Send private message
Milin

New User


Joined: 21 Dec 2014
Posts: 11
Location: India

PostPosted: Mon Jan 12, 2015 11:33 am    Post subject:
Reply with quote

Robert Sample wrote:
COBOL does not support strings in the sense that other languages have strings (where the length varies at run time). COBOL supports variable length data in FILE SECTION and LINKAGE SECTION but every variable in WORKING-STORAGE (even with OCCURS DEPENDING ON) has a fixed length (for ODO variables, the length is the maximum occurs). Intrinsic FUNCTION LENGTH will return the current length of ODO variables in FILE or LINKAGE SECTION but the maximum possible length for WORKING-STORAGE SECTION variables. If the variable is in LINKAGE SECTION, reference modification could be used, or INSPECT (probably -- I'd have to think about it to say absolutely that it could).

This sounds like a trick question where they keep pushing until they find something the interviewee doesn't know.


Let me write a code snippet for this... Let me try here..

01 STR1 PIC X(100).
01 STR2 PIC X(100).
01 CHARCNT1 PIC 99 VALUES ZEROS.
01 CHARCNT2 PIC 99 VALUES ZEROS.
......
......
PROCEDURE DIVISION
......
......
MOVE LOW-VALUES TO STR1
MOVE LOW-VALUES TO STR2
ACCEPT STR1
......
ACCEPT STR2
......
INSPECT STR1 TALLYING CHARCNT1 FOR CHARACTERS BEFORE INITIAL SPACES
......
INSPECT STR2 TALLYING CHARCNT2 FOR CHARACTERS BEFORE INITIAL SPACES
......
IF (CHARCNT1 != CHARCNT2) THEN
.....<<NOT MIRROR IMAGE>>
ELSE
.....<<REFERENCE MODIFICATION>>
END-IF
.....
STOP RUN.


I think it is alright from high point of view.. not sure in detail.. icon_neutral.gif icon_confused.gif icon_rolleyes.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Jan 12, 2015 12:23 pm    Post subject: Reply to: Mainframe Developer Interview Questions
Reply with quote

Here are my 100-byte "strings"

Code:
A
Z


I do your INSPECT, the counts are the same, so the second is the reverse of the first? Er. No.

What about this?

Code:
Afollowedby99blanks
99blanksfollowedbyA


Now your INSPECT says it is not a correct reversed "string".
Back to top
View user's profile Send private message
Milin

New User


Joined: 21 Dec 2014
Posts: 11
Location: India

PostPosted: Mon Jan 12, 2015 12:32 pm    Post subject: Re: Reply to: Mainframe Developer Interview Questions
Reply with quote

Bill Woodger wrote:
Here are my 100-byte "strings"

Code:
A
Z


I do your INSPECT, the counts are the same, so the second is the reverse of the first? Er. No.

What about this?

Code:
Afollowedby99blanks
99blanksfollowedbyA


Now your INSPECT says it is not a correct reversed "string".


Hi Bill,

my code snippet was just to focus on identifying lengths of the values in string variables..

in order to check whether two strings are mirror images of each other.. they should be similar in length.. if they are not of same lengths.. they cant be the mirror images of each other.. but if they carry same lengths.. we need to move on with <<REFERENCE MODIFICATION>> logic.. there we will identify whether thwo strings of same lengths are mirror images of each other or not..

i believe my code snippet is working on this logic..
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Jan 12, 2015 3:00 pm    Post subject: Reply to: Mainframe Developer Interview Questions
Reply with quote

Well, I suggest you think about it rather than just believe. Concentrate on what "BEFORE INITIAL SPACES" means and how it affects what you are trying to do.

Test it if possible. If you don't have any Mainframe access, try to download GnuCOBOL, hosted on SourceForge.Net.
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
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm
No new posts Fiserv needs to hire COBOL Developer ... shally Mainframe Jobs 0 Wed Sep 21, 2016 1:24 am
No new posts Interface from Mainframe to Confluenc... hblun CLIST & REXX 4 Tue Sep 20, 2016 5:47 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Admin Openings with CTS enikhilk Mainframe Jobs 0 Tue Sep 13, 2016 10:13 am


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