Thread View: bit.listserv.tsorexx
1 messages
1 total messages
Started by Joe Denison
Tue, 12 Mar 2013 18:19
When does "0E604" = "0E953" ?
Author: Joe Denison
Date: Tue, 12 Mar 2013 18:19
Date: Tue, 12 Mar 2013 18:19
26 lines
3222 bytes
3222 bytes
Can anyone explain why the results of this REXX exec indicate that the contents of the variables "aaa" and "bbb" match, even though based on the output of the SAY instruction just prior to the comparison, they clearly "do not match"?
I can fix it by specifying the strictly equal operator in the comparison (e.g., "=="), but I don't understand why the comparison seems to have incorrect results with just the "=".
EDIT MY.REXX(DSINFOA) - 01.03 Member DSINFOA saved
Command ===> tso dsinfoa Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /*REXX EXEC*/
000002 Address TSO
000003 bbb="5E604"
000004 aaa="0E953"
000005 IF LEFT(aaa,1)="0" then
000006 DO /*Replace 1st char of "bbb" with a "0" */
000007 bbb="0"||RIGHT(bbb,LENGTH(bbb)-1)
000008 END
000009 say length(bbb) bbb length(aaa) aaa
000010 IF aaa=bbb then say "These two items match: aaa="aaa "bbb="bbb
000011 ELSE say "They don't match, duh!!!"
000012 EXIT
****** **************************** Bottom of Data ****************************
5 0E604 5 0E953
These two items match: aaa=0E953 bbb=0E604
***
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads