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
 

 

Getting Input to a REXX exec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Wed Nov 11, 2009 7:41 pm    Post subject: Getting Input to a REXX exec
Reply with quote

Hi,

How can I get the string that I give following my rexx exec as an input to a variable in the exec. say, when I give

TSO TEST 123

In my program I should capture this 123 in a variable say abc.

Many Thanks
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Nov 11, 2009 7:44 pm    Post subject:
Reply with quote

This should help you.
Passing Information to an Exec

Read How to pass an Arguments
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Nov 11, 2009 7:53 pm    Post subject: Reply to: Getting Input to a REXX exec
Reply with quote

what did You try by yourself...

for example googling
for "passing arguments to a rexx script"
or "passing arguments to a rexx exec"

even looking at the manuals and searching for arguments might be a good idea

guide ...
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4C310/CCONTENTS?SHELF=IKJ4BK80&DN=SA22-7791-01&DT=20010706113306

reference ...
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A370/CCONTENTS?SHELF=IKJ4BK80&DN=SA22-7790-07&DT=20060626210253

if You keep on exploiting rexx You might need the manuals links anyway
so start to get acquainted with them

ok! ok!
/good mode on - hinting mode on

meditate on ...
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A370/3.14?SHELF=IKJ4BK80&DT=20060626210253
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Wed Nov 11, 2009 7:56 pm    Post subject:
Reply with quote

Hi Enrico..

I tried googling.. sadly I was not able to open publibz site.. hence posted it..
I tried searching 'passing input to rexx exec'.. Try it for yourself to see if you could find anything useful.

Its not good to assume that everyone try to exploit this forum members.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Nov 11, 2009 8:06 pm    Post subject: Reply to: Getting Input to a REXX exec
Reply with quote

parsing arguments will usually end in a religion war
there are usually standards and habits to be considered...

keyword style ( a la TSO commands style )
<rexx_script> IN(somefile) OUT(someotherfile)

unix style
<rexx_script_name> --IN=somefile --OUT=someotherfile ( long form )
<rexx_script_name> -I somefile -O someotherfile

positional style
<rexx_script_name> somefile someotherfile

for the third approach You have two ways

parse arg in ou

or ( my preferred, but it' s a personal thing )
parse arg args
if words(args) <> 2 then do
say "expecting two arguments"
exit
end

in = word(args,1)
ou = word(args,2)

or as an alternative

parse var args in ou .
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Nov 11, 2009 8:09 pm    Post subject: Reply to: Getting Input to a REXX exec
Reply with quote

Quote:
I tried searching 'passing input to rexx exec'.. Try it for yourself to see if you could find anything useful.
Its not good to assume that everyone try to exploit this forum members.


asking what You had done Yourself is nowhere considered insulting nor impolite...
it' s a standard way to try to understand how to reply and the knowledge level of the TS
so to mimick You words... is not good to assume that I was assuming

my answer was not on the style search and go by Yourself...
and I took time to open the links to verify their accessibility
in order to post them for Your use
also when I post a about googling it means that I have
done the search with the string I suggested
and that the search has given enough results to be useful

it looks like You did not care to look at my signature

addendum
searching with Your search string gave this...
http://vm.uconn.edu/~pets/rexxp3.html

scrolling down to ....Passing Arguments to Execs
gives what You were looking for...
( color changed to reflect the color in the linked page )
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Wed Nov 11, 2009 8:44 pm    Post subject:
Reply with quote

Am teribly sorry for that..

Guess I should improve my googling skills before trying my hands on any mainframe skill..

Sorry If I had offended you.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Nov 11, 2009 8:45 pm    Post subject: Reply to: Getting Input to a REXX exec
Reply with quote

Code:
TSO TEST 123

TEST is a standard TSO command name. If you actually try your example, I do not think it will work correctly.

Quote:
sadly I was not able to open publibz site.

That is actually an IBM site! If it did not work at the moment, it should work momentarily.
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Wed Nov 11, 2009 8:50 pm    Post subject:
Reply with quote

Pedro..

You got it right.. The problem was with the member name. My bad..

I changed it and it works good now.

Thank you.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Nov 11, 2009 8:56 pm    Post subject: Reply to: Getting Input to a REXX exec
Reply with quote

I was not offended at all... icon_biggrin.gif

/philosophy on - general talk on
I think that it is the person asking that should be more flexible about the reply tone
people replying too often have seen the same question asked over and over
and to keep replying to the same questions is quite <choose an adjective You like>
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
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 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