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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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