Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Interpret instruction not working in REXX Code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Interpret instruction not working in REXX Code
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: 1746
Location: Bloomington, IL

PostPosted: Fri Feb 07, 2014 11:47 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us