View previous topic :: View next topic
|
Author |
Message |
jegan_selvan
New User
Joined: 23 Oct 2006 Posts: 24 Location: India
|
|
|
|
Hi,
Greetings!
Recently i attended an interview. I am unable to give solution for the question asked by them in COBOL .
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
|