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

how to make comp-3 as readable form


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sairam442
Warnings : 1

New User


Joined: 23 Nov 2006
Posts: 3
Location: banglore

PostPosted: Fri Dec 29, 2006 9:56 am
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri Dec 29, 2006 10:11 am
Reply with quote

Hi There,

Move to corresponding normal variable of output file.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Dec 29, 2006 1:01 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Dec 30, 2006 6:49 am
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Sat Dec 30, 2006 8:34 am
Reply with quote

Quote:
PS: 0001234M is "readable" but you have to know the "language".

Awesome... icon_smile.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jan 02, 2007 12:56 am
Reply with quote

Yo Sairam, (just got back from seeing the latest Rocky moive) icon_lol.gif

You still out there? If you want help you have to cooperate.
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 trying to make sense of keylists TSO/ISPF 11
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top