IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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 All times are GMT + 6 Hours
Forum Index -> CLIST & REXX
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts JCL for replacing code in Cobol JCL & VSAM 8
No new posts Calling Assembler from REXX PL/I & Assembler 5
No new posts REXX/CLIST tool for BCSR and EDSR CLIST & REXX 2
No new posts Calling Rexx program from Cobol CLIST & REXX 12
No new posts REXX script to beautify XML CLIST & REXX 1

Back to Top