Problem In Comparison Operator



IBM's Command List programming language & Restructured Extended Executor

Problem In Comparison Operator

Postby utpalpal07 » Wed Feb 08, 2012 12:09 pm

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.
utpalpal07
 
Posts: 43
Joined: Wed Feb 08, 2012 12:02 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Problem In Comparison Operator

 

Re: Problem In Comparison Operator

Postby NicC » Wed Feb 08, 2012 1:02 pm

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
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2702
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Problem In Comparison Operator

Postby steve-myers » Wed Feb 08, 2012 1:05 pm

See "TSO/E REXX Reference" for your release.
steve-myers
Global moderator
 
Posts: 1887
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 198 times

Re: Problem In Comparison Operator

Postby utpalpal07 » Wed Feb 08, 2012 1:33 pm

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
utpalpal07
 
Posts: 43
Joined: Wed Feb 08, 2012 12:02 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Problem In Comparison Operator

Postby enrico-sorichetti » Wed Feb 08, 2012 1:39 pm

looks You are having problems whit the codepage of Your terminal ...
try ^= or <>
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IKJ4BK90
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2648
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 132 times

Re: Problem In Comparison Operator

Postby utpalpal07 » Wed Feb 08, 2012 1:44 pm

Hi Enrico,
it worked... thanks. I was problem in using the not operator.

thanks & Regards
Utpal
utpalpal07
 
Posts: 43
Joined: Wed Feb 08, 2012 12:02 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Problem In Comparison Operator

Postby steve-myers » Wed Feb 08, 2012 6:22 pm

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.
steve-myers
Global moderator
 
Posts: 1887
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 198 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post