Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to display COBOL Signed Var in REXX

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

New User


Joined: 13 Dec 2006
Posts: 73
Location: Hyderabad

PostPosted: Sun Aug 12, 2007 8:32 pm    Post subject: How to display COBOL Signed Var in REXX
Reply with quote

hi ,

IS THERE ANY COMMAND TO CONVERT SIGN FIELD IN COBOL INTO DISPLAYABLE VALUE IN REXX.?

MY FIELD IS S9(07) ...........
IN MY FILE IS VALUE IS LIKE 00000J
AND MY ACTUAL VALUE IS -1

...SO I NEED IN REXX LIKE -1 ....

THX IN ADVANCE...
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun Aug 12, 2007 10:22 pm    Post subject:
Reply with quote

First, please use Proper case, not UPPER CASE.

How are you going to read the COBOL field from REXX? Are you going to read the data directly from REXX?

O.
Back to top
View user's profile Send private message
avaneendra_linga

New User


Joined: 13 Dec 2006
Posts: 73
Location: Hyderabad

PostPosted: Sun Aug 12, 2007 10:28 pm    Post subject:
Reply with quote

Hey sorry ofer71...

Yeah regardng problem.....i am readng a file in rexx ,in that one of the field is S9(04)...When i read that it is not coming in displayable format .

how to convert that into displayable field?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Mon Aug 13, 2007 10:52 pm    Post subject: Re: How to display COBOL Signed Var in REXX
Reply with quote

I got this off the internet. If z is the variable containing the Zoned Decimal number, then:

Code:

z = (2 * DATATYPE(z,'W') - 1)
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us