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

Cobol Interview Question


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 02, 2010 6:07 pm
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

Superior Member


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

PostPosted: Tue Feb 02, 2010 9:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top