Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

REXX Question about a Hex number

17 views
Skip to first unread message

Ed Benoit

unread,
Oct 15, 2009, 4:21:19 PM10/15/09
to
Hello All,
I have a RBA number X'000557F1CF63' I wish to take the X and the start
end ' off. and my result would be 000557F1CF63

What instruction should I used.

Ed.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Robert Zenuk

unread,
Oct 15, 2009, 4:31:01 PM10/15/09
to
Several ways... Here is one...

/* rexx */
rba = "X'000557F1CF63'"
parse var rba "X'" newrba "'"
say rba '=' newrba


Carefully watch the ' versus the " in this code. Copy and paste it...

Rob

In a message dated 10/15/2009 1:21:28 P.M. US Mountain Standard Time,

Walter Pachl

unread,
Oct 15, 2009, 4:41:42 PM10/15/09
to
substr(rba,3,length(rba)-3)

Ed Benoit

unread,
Oct 15, 2009, 5:12:18 PM10/15/09
to
Rob,
What am I doing incorrect?
I copied and paste
ICSTARBA IS = X'000557F1CF63' from DB2.

PARSE VAR ICSTARBA "X'" NEWRBA "'"

SAY ICSTARBA '=' NEWRBA

NEWRBA GIVE ME UNPRINTERABLE CHARACTERS

Ed

Mickey

unread,
Oct 15, 2009, 5:21:22 PM10/15/09
to
try x2d(000557f1cf63)

--------------------------------------------------
From: "Ed Benoit" <Ibm...@AOL.COM>
Sent: Thursday, October 15, 2009 5:11 PM
To: <TSO-...@VM.MARIST.EDU>
Subject: Re: [TSO-REXX] REXX Question about a Hex number

Walter Pachl

unread,
Oct 15, 2009, 5:50:38 PM10/15/09
to
Add Trace R before these statements and let's see (or see yourself)

----- Original Message -----
From: "Ed Benoit" <Ibm...@AOL.COM>
To: <TSO-...@VM.MARIST.EDU>

Sent: Thursday, October 15, 2009 11:11 PM
Subject: Re: [TSO-REXX] REXX Question about a Hex number

Ed Benoit

unread,
Oct 15, 2009, 6:44:01 PM10/15/09
to
This is the value of ICSTARBA when I do a ISPF Test Mode.and view the
veriable icstarba in the ISPF Table.

ICSTARBA N X'000557F1CF63'


124 *-* PARSE VAR ICSTARBA "X'" NEWRBA "'"
>>> ""
125 *-* SAY 'ICSTARBA =' NEWRBA
>>> "ICSTARBA = "
ICSTARBA =
126 *-* /**/
128 *-* ADDRESS ISPEXEC
129 *-* 'TBADD' TBLNAMEB
>>> "TBADD IBMUSERB"

Any ideas?
Ed.

Robert Zenuk

unread,
Oct 15, 2009, 8:20:52 PM10/15/09
to
If the value is not the character string you first presented but the actual
hex value, the try the second set of instructions...

/* rexx */
say 'Variable value includes the "X"'


rba = "X'000557F1CF63'"
parse var rba "X'" newrba "'"
say rba '=' newrba

say
say 'Variable already contains the hex value'
rba = '000557F1CF63'X
newrba = c2x(rba)
say 'RBA =' newrba

Rob

In a message dated 10/15/2009 3:43:48 P.M. US Mountain Standard Time,

Walter Pachl

unread,
Oct 16, 2009, 2:51:43 AM10/16/09
to
idea:
Your Rexx variable ICSTARBA is either empty
or contains '000557F1CF63'X (as Rexx would have it) and the '00'x stop
processing somehow
Try a
Say c2x(ICSTARBA)
UNfortunately I have no access to MVS :-(
Regards
Walter

----- Original Message -----
From: "Ed Benoit" <Ibm...@AOL.COM>
To: <TSO-...@VM.MARIST.EDU>
Sent: Friday, October 16, 2009 12:43 AM
Subject: Re: [TSO-REXX] REXX Question about a Hex number

Walter Pachl

unread,
Oct 16, 2009, 5:40:31 AM10/16/09
to
Took my scooter, went to MVS and saw this:
/* REXX */
Trace R
ICSTARBA = '000557F1CF63'X

PARSE VAR ICSTARBA "X'" NEWRBA "'"
Say '>'NEWRBA'<'
Say c2x(ICSTARBA)
----------------------------------------------------------------------
3 *-* ICSTARBA = '000557F1CF63'X
>>> "??:1::"

4 *-* PARSE VAR ICSTARBA "X'" NEWRBA "'"
>>> ""
5 *-* Say '>'NEWRBA'<'
>>> "><"
><
6 *-* Say c2x(ICSTARBA)
>>> "000557F1CF63"
000557F1CF63

Ed Benoit

unread,
Oct 16, 2009, 3:43:41 PM10/16/09
to
Hello All,

I think I pose the incorrect question regarding my REXX Hex number
This is my problem.
After DB2 fetch before doing anything ICSTARBA look like ::1::
AFTER SAY C2X(ICSTARBA) ICSTARBA look like 000557F1CF63 this is good
I use ISPF Break Point
ISPF 7.8.
After I do a tbadd into a table using
ispf option 4 the table entry look like
ICSTARBA N X'000557F1CF63' this is good
On my display screen it look like .�1��
I want it to look like 000557F1CF63 on my tbdispl screen.
How can I make it look like 000557F1CF63 on my tbdispl screen
NOTE: In assembly I used a vdefine with hex (6) byte and it work on my
tbdispl screen

Robert Zenuk

unread,
Oct 16, 2009, 4:25:40 PM10/16/09
to
You may have to store the value twice. Once as a HEX value and again as a
DISPLAY value. You will only display the DISPLAY value in your TBDISPL...

If you are loading a "temporary" ISPF table directly from DB2 exclusively
for TBDISPL and do not care about the actual hex value, simply do the
ICSTARBA = c2x(ICSTARBA) prior to your TBADD and store the DISPLAY value.

Rob




In a message dated 10/16/2009 12:43:49 P.M. US Mountain Standard Tim,
0 new messages