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

REXX Query on it sequence


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

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Mon Aug 03, 2009 2:08 pm
Reply with quote

Hi,

I am just a beginner to the REXX language

My assumtion is that this interpreter language execute the commands one by one.

See the below example
********************************************/* REXX Example */
SAY 'Enter your Name"
PULL NAME
SAY 'Name entered is' NAME
********************************************

But when it executes, system doesnt wait to enter the name, before that it shows the error message.
How is that happening, how does it encounter an error before it goes there.
I couldnt find an answer to this in my Manual, please advice.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 03, 2009 2:09 pm
Reply with quote

Have you used TRACE R to trace what happens
Back to top
View user's profile Send private message
sibi Yohannan

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Mon Aug 03, 2009 2:19 pm
Reply with quote

I am sorry, please see the below example, there is a correction in that,
********************************************
/* REXX Example */
SAY 'Enter your Name"
PULL NAME
SAY 'Name entered is' NAME
SAY 'Current System Time is'
TIME /* This TSO command gives the System Time
********************************************

I made a mistake in the last line purposefully (no */ at the end)
But when it executes, system doesnt wait to enter the name, before that it shows the error message.
Just need to understand how the system determines the error, before it actually come across.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 03, 2009 2:23 pm
Reply with quote

Ok, I admit it. I am not psychic. So your code puts out an error message.

Any chance you might actually want to give us a clue as to what it says icon_evil.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Aug 03, 2009 2:24 pm
Reply with quote

Quote:
before that it shows the error message.


since You do not tell the error message any suggestion will only be a guess
icon_cool.gif

anyway there is a quote/apost mismatch in the first say
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 03, 2009 7:41 pm
Reply with quote

Hello,

Quote:
Just need to understand how the system determines the error, before it actually come across.
Consider there is syntax checking before actual interpretation begins. . .

Why begin execution and abend in the middle?
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Aug 04, 2009 12:30 pm
Reply with quote

As Dick says, the whole program is parsed and converted to an intermediate form before execution. You are probably seeing syntax messages as a result of the parse. But as everyone else has said, we can only guess since you have only referred to "the error message" without telling us what the error message says.

An interesting mostly off-topic note here if anyone cares. I noticed that interpreted Rexx on z/OS seems to keep the comments in the intermediate form and process them during execution, so code with large blocks of comments or multiline comments runs noticeably slower than uncommented code. This isn't true for compiled Rexx or other non-z/OS interpreters. I don't know about Rexx on CMS.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Aug 04, 2009 9:40 pm
Reply with quote

As Enrico pointed out:
Quote:
anyway there is a quote/apost mismatch in the first say

Clearly, that is the error. It will throw off the rest of the parsing of the program.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 05, 2009 11:17 am
Reply with quote

But isn't it just so nice when the OP returns to the forum to let us know how it went ...........................
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