View previous topic :: View next topic
|
Author |
Message |
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
sathyaraj
New User
Joined: 28 Sep 2007 Posts: 71 Location: India.
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I was not offended at all...
/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 |
|
|
|