IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting Input to a REXX exec


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 11, 2009 7:53 pm
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 ...
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4C310/CCONTENTS?SHELF=IKJ4BK80&DN=SA22-7791-01&DT=20010706113306

reference ...
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 ...
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 11, 2009 8:06 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 11, 2009 8:09 pm
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...
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
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

Global Moderator


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

PostPosted: Wed Nov 11, 2009 8:45 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 11, 2009 8:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top