View previous topic :: View next topic
|
Author |
Message |
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you used TRACE R to trace what happens |
|
Back to top |
|
|
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
before that it shows the error message. |
since You do not tell the error message any suggestion will only be a guess
anyway there is a quote/apost mismatch in the first say |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
But isn't it just so nice when the OP returns to the forum to let us know how it went ........................... |
|
Back to top |
|
|
|