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: 4648
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 RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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