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 display comp-3 data in viewable format?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
mohan sundaram

New User


Joined: 27 May 2012
Posts: 2
Location: india

PostPosted: Thu Jul 26, 2012 1:14 pm    Post subject: How to display comp-3 data in viewable format?
Reply with quote

Hi
i am coding rexx program which display few fields into screen.i try to display 10 COMP-3 fields .It is not coming proper format.Could you please help me?

my fields is
AMOUNT PIC S9(07)V99 COMP-3.

CODE
SAY 'Owning retail amount ===>'C2X(SUBSTR(RRECORD.I,107,5))

OUT PUT:
Owning retail amount ===>000000400C (actuall value 4.00)
NOTE: i am not getting period .Please help me
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1777
Location: Bloomington, IL

PostPosted: Thu Jul 26, 2012 3:17 pm    Post subject:
Reply with quote

Native Rexx does not, I think, provide a built-in function to do what do want. Some third-party extensions such as OpenSoftware's REXXTOOLS package do, but you may not have them installed. Basically, you must that returned string, strip off leading zeroes, interpret the sign (C = positive, D = negative, F = unsigned, treated as positive in computations), and insert the decimal point (a radix point in a fixed-point number is always implied; you have to know where goes).

If no one else comes up with a good answer in the next few hours, I'll look at it again when I get to my office.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Jul 26, 2012 5:58 pm    Post subject: Reply to: How to display comp-3 data in viewable format?
Reply with quote

search my posts for pack/unpack rexx examples

as far as the decimal point ...
COBOL knows because You declare things
REXX does not because it is a declareless language.

You will have to do Your own formatting for each variable! full stop
Back to top
View user's profile Send private message
mohan sundaram

New User


Joined: 27 May 2012
Posts: 2
Location: india

PostPosted: Fri Jul 27, 2012 11:01 am    Post subject: Re: Reply to: How to display comp-3 data in viewable format?
Reply with quote

Thanks for reply.Please provide your email id ..
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1894
Location: UK

PostPosted: Fri Jul 27, 2012 11:19 am    Post subject:
Reply with quote

Just curious - why do you need Enrico's email id to do search?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Fri Jul 27, 2012 4:48 pm    Post subject: Reply to: How to display comp-3 data in viewable format?
Reply with quote

I must be in a very good mood today icon_cool.gif

http://www.ibmmainframes.com/viewtopic.php?t=57577&highlight=pack+unpack
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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