IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to display COBOL Signed Var in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Sun Aug 12, 2007 10:22 pm
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
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

Global Moderator


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

PostPosted: Mon Aug 13, 2007 10:52 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top