View previous topic :: View next topic
|
Author |
Message |
sairam442 Warnings : 1 New User
Joined: 23 Nov 2006 Posts: 3 Location: banglore
|
|
|
|
hi,
this question was faced in ibm interview.
i hav a one comp-3 variable.
i hav one input file and output file.
i hav to read a comp-3 variable and write it to output file and it should be in readable form. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
Move to corresponding normal variable of output file. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
this question was faced in ibm interview. |
Didn't you ask ... did they mean for a COBOL Code or a JCL form ?
In case it was a Non-Cobol question... below sort card would help you get it...
Code: |
INREC FIELDS=(1,3,PD,TO=ZD,LENGTH=5,...) |
Here I assumed input field is starting from 1st column... to convert a 3-byte packed decimal field to a 5-byte decimal field... |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Sairam,
Sometimes the ques you ask before you ans the ques gets you more points than the ans.
Suppose the com-3 # looked like this X'0001234D'. How do you want it to look: -1234 or 0001234- or come other combo of those 2 or 0001234M?
The ans to that ques determines what ans you will give.
PS: 0001234M is "readable" but you have to know the "language". |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
PS: 0001234M is "readable" but you have to know the "language". |
Awesome... |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Yo Sairam, (just got back from seeing the latest Rocky moive)
You still out there? If you want help you have to cooperate. |
|
Back to top |
|
|
|