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

Interpret instruction not working in REXX Code


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
spoorni

New User


Joined: 29 Nov 2007
Posts: 20
Location: india

PostPosted: Fri Feb 07, 2014 10:22 pm
Reply with quote

I have a REXX Code where there is the following INTERPRET instruction:

Code:
parse upper var cond 'IF ' cc test val .                     
if (cc = "MAXCC" | cc = "LASTCC"),                           
  & (test = ">" | test = "<" | test = "=",                     
    | test = "/=" | test = "<=" | test = ">="),               
    & datatype(val) = "NUM" Then Do                             
      say cc                                                   
      say test                                                 
      say val                                                 
      interpret "if" cc test val "Then OK='y'; Else OK='n'"   
      say OK                                                   
      if OK = 'n' Then Do                                     
          if Batch = 'True' Then say "Bypassing:" PARMS_rec.I 
          Iterate I                                           
      End                                                     
End                                                         

I added the SAY instructions to check the values that I am sending. Based on the input, the value of OK should be 'Y'. But for some reason the INTERPRET instruction doesnt seem to be working. Can anyone see anything wrong with this instruction?

Code'd
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Feb 07, 2014 11:47 pm
Reply with quote

Works for me.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Mon Feb 10, 2014 9:39 am
Reply with quote

Your INTERPRET statement is working perfectly for me. I think the issue maynot be related to INTERPRET instruction. I would suggest you use TRACE to track down the error.
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 Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top