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
 

 

REXX Query on it sequence

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: REXX Query on it sequence
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 03, 2009 2:09 pm    Post subject:
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    Post subject: REXX Query on it sequence
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 03, 2009 2:23 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Mon Aug 03, 2009 2:24 pm    Post subject: Reply to: REXX Query on it sequence
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

Site Director


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

PostPosted: Mon Aug 03, 2009 7:41 pm    Post subject:
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: 401
Location: Mumbai

PostPosted: Tue Aug 04, 2009 12:30 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Aug 04, 2009 9:40 pm    Post subject: Reply to: REXX Query on it sequence
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 05, 2009 11:17 am    Post subject:
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    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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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