Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to make comp-3 as readable form

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: how to make comp-3 as readable form
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: 1187
Location: Bangalore,India

PostPosted: Fri Dec 29, 2006 10:11 am    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Fri Dec 29, 2006 1:01 pm    Post subject: Re: how to make comp-3 as readable form
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Sat Dec 30, 2006 8:34 am    Post subject: Re: how to make comp-3 as readable form
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    Post subject:
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    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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Convert Hex to readable format. harpreet_Saini19 DFSORT/ICETOOL 7 Wed Sep 14, 2016 5:46 am
No new posts Need help to populate date in COMP-3 ... chetanambi DFSORT/ICETOOL 3 Tue Jun 21, 2016 12:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us