Page 1 of 1

Problem In Comparison Operator

PostPosted: Wed Feb 08, 2012 12:09 pm
by utpalpal07
Hi all,
Can anybody please tell me why my this program is not getting executed.
***************************** Top of Data ******************************
/*REXX*/
/* REXX SHOWING UNTIL/WHILE LOOPS*/
A = 6; B = 1; C = 1
DO WHILE A \= B
SAY "B= " B
B = B + 1 ;
END
DO UNTIL A = C
SAY "C= " C
C = C + 1 ;
END
**************************** Bottom of Data ****************************



I'm getting error:

4 +++ DO WHILE A :
IRX0013I Error running SSS, line 4: Invalid character in program
***


actually i'm getting problem in using the "NOT EQUAL TO" operator. I'm using this "\" operator. but its not working.
If anyone can give me the proper key for "not equal to" it 'll be very helpful for me.

Re: Problem In Comparison Operator

PostPosted: Wed Feb 08, 2012 1:02 pm
by NicC
The error message says that the Rexx interpreter thinks that you have a colon (:) after your A. To find what the 'not' operator is you have access to manuals including the Rexx Language Reference. That information is in there. Do not connfuse what might be legal on the PC with what might be legal on the mainframe. To be portable you should use <>. Ususally on the mainframe you use the symbol usually found on the top of the top left key - accessed via Alt Gr in Windoze.

And, please do not colour code your posts - using the full editor you can highlight your code and click the 'Code' button. This will preserve spacing and give you a nice blue on black presentation like this..
coded                   data

Re: Problem In Comparison Operator

PostPosted: Wed Feb 08, 2012 1:05 pm
by steve-myers
See "TSO/E REXX Reference" for your release.

Re: Problem In Comparison Operator

PostPosted: Wed Feb 08, 2012 1:33 pm
by utpalpal07
Hi,
This is the code and in 4th line i've used the "\"(NOT) operator. but it becomes invisible. and code gives error.
the error is shown below.

/*REXX*/                               
/* REXX SHOWING UNTIL/WHILE LOOPS*/   
A = 6; B = 1; C = 1                   
DO WHILE A  =  B                       
   SAY "B= " B                         
   B = B + 1 ;                         
END                                   
DO UNTIL A = C                         
   SAY "C= " C                         
   C = C + 1 ;                         
END                                   



                                                               
         4 +++ DO WHILE A :                                         
IRX0013I Error running SSS, line 4: Invalid character in program
***                                                           



Thanks,
Utpal

Re: Problem In Comparison Operator

PostPosted: Wed Feb 08, 2012 1:39 pm
by enrico-sorichetti
looks You are having problems whit the codepage of Your terminal ...
try ^= or <>
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IKJ4BK90

Re: Problem In Comparison Operator

PostPosted: Wed Feb 08, 2012 1:44 pm
by utpalpal07
Hi Enrico,
it worked... thanks. I was problem in using the not operator.

thanks & Regards
Utpal

Re: Problem In Comparison Operator

PostPosted: Wed Feb 08, 2012 6:22 pm
by steve-myers
The ¬ character is not well defined in ASCII. Most of the time the ^ character (Shift-6 in PC keyboards) will become the EBCDIC ¬ character when entered through most 3270 emulators.