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
 

 

Cobol Interview Question

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

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Tue Feb 02, 2010 5:30 pm    Post subject: Cobol Interview Question
Reply with quote

Hi,

Greetings!

Recently i attended an interview. I am unable to give solution for the question asked by them in COBOL icon_sad.gif .

There are three files that can be used in the cobol one at a time. The input may be randomly taken.

Input 1 - FB - 80 Record Length
Input 2 - FB - 100 Record Length
Input 3 - FB - 120 Record Length.

Only one file will be taken as the input. either input1,input2 or input3.

The layout of three input files will be having different layout and the records are delimitied with |(pipe) symbol. I have given only one file as an example.

InputFile 1
Field 1 - X(40)
Field 2 - 9(10)
Field 3 - X(30)

The input record will be as follows

Field1 | Field2 | Field 3|

jegan |1234567890|mainframe |
kuttimani |1234890 |mainframe Technology |

The output file should be of varaiable format with record length 150 for all three types of input file.

Requirement:

I need to write the output file as mentioned below

jegan|1234567890|mainframe|
kuttimani|1234890|mainframe Technology|

Thanks to provide me the solution.

Regards,

Jegan Selvan
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Tue Feb 02, 2010 6:07 pm    Post subject:
Reply with quote

I don't think there's anywhere near enough information here to provide a solution. Production systems do not use random inputs -- they are very carefully and fully specified. Since you did not use BBcode for your post, it is not at all clear from your examples what, if any, manipulations are being done to the input data to create the output data.

Honestly, this sounds more like a homework problem than an interview question -- did the interviewer expect you to reel off a couple hundred lines of COBOL off the top of your head? How would the interviewer know if what you said was correct and solved the problem?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Feb 02, 2010 9:00 pm    Post subject:
Reply with quote

If at the time of interview, what you post is the interpretation of the question asked by interviewer - no wonder, giving an answer should have been tough for sure...please rephrase your question; as Robert has asked for, too.
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


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