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: 10255
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: 2038
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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