MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Passing paramters from jcl to rexx

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 46
Topics: 29

PostPosted: Tue May 04, 2004 1:27 am    Post subject: Passing paramters from jcl to rexx Reply with quote

Hi,
Anybody please post a reply how to access parameters from the jcl in a rexx program.(rexx is in batch execution)



Thanks
Krishna
Back to top
View user's profile Send private message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 46
Topics: 29

PostPosted: Tue May 04, 2004 2:45 am    Post subject: Reply with quote

Hi,
Its working fine... Thanks a lot...

Krishna
Back to top
View user's profile Send private message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 46
Topics: 29

PostPosted: Tue May 04, 2004 2:59 am    Post subject: Reply with quote

Hi,
This reply for your changed program. Even if I mentioned

PARSE ARG NAME alone(1 argument) in REXX program, its accepting both SAI

and MADRAS....



Krishna
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Tue May 11, 2004 7:41 pm    Post subject: Reply with quote

try (note the period/fullt stop)
PARSE ARG NAME .
_________________
Regards,
Mike.
Back to top
View user's profile Send private message
Maton_Man
Beginner


Joined: 30 Jan 2004
Posts: 123
Topics: 0

PostPosted: Wed May 12, 2004 2:00 am    Post subject: Reply with quote

Why don't follow your own advice Ravi and read TSO/E REXX Reference- Chapter 5. Parsing ... Smile

The '.' is a place holder. In Mike's example he is:

1. Using PARSE to maintain case
2. Using ARG to accept parameter input
3. Accepting one parameter into a variable called NAME the value of which will be everything from the first non-blank character up to the first blank character.
4. Discarding everything beyond the first blank character into the '.' placeholder.

So in this case you are passing the parameters 'Kris Madras' to the rexx 'Hello' and it is putting Kris into NAME and everything else into '.' Be aware also that the parameter buffer is padded with spaces, so if you were to do:

PARSE ARG NAME SURNAME

Then SURNAME would be equal to 'Madras ' (I have not put all the spaces in, just enough to demonstrate the effect.

The period is a useful device for removing these trailing spaces so a more useful PARSE statement in your case would be:

PARSE ARG NAME SURNAME .

Which would put 'Kris' into NAME, 'Madras' into SURNAME and spaces into '.'

You can use multiple period placeholders anywhere in a parse statement to ignore parts of the string you are not interested in.
_________________
My opinions are exactly that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group