View previous topic :: View next topic
|
Author |
Message |
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi,
I have a mail REXX pgm (PGM1) and i need to call another REXX pgm (PGM2) from that PGM1.
I have to call another pgm named PGM3 from PGM1 by passsing some parameter which ll be used by the PGM3.
Can anyone please help me how to achieve the above ones. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Have you read about the CALL function ? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Directly by name usually works best:
Code: |
/* REXX PGM1 */
Say PGM1
PGM2
Say PGM1
parm = '1 2 3 4'
PGM3 parm
Say PGM1
Exit 0
|
Code: |
/* REXX PGM2 */
Say PGM2
Exit 0
|
Code: |
/* REXX PGM3 */
Say PGM3 Arg(1) Arg(2) Arg(3) Arg(4)
Exit 0
|
|
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi Kelvin,
Thaks for the help. I ll try this .
@ Expat
Thanks for the hint. As i am new to REXX programming so unaware of these terms. Surely i ll check it out and try to implement the same. |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi ...
I just need one more hint regarding validating a string.
I am having a variable names Var1. I need to check if the first 3 characters are either AAA or BBB or CCC then i ll procced further.
I have used like below,
Code: |
Var2 = Substr(VAR1,1,3)
Var2 = AAA | BBB | CCC
If Var2 = 1 then do
----
---
---
end
|
I dont know whether i was doing correct or not... But i am not getting my value.
Can any1 help me out to achieve this. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You COULD code
If Left(var1,3) = 'AAA' | Left(var1,3) = 'BBB' | Left(var1,3) = 'CCC' Then ... |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Thanks For the help Kelvin.
It works fine for me. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
siva102 wrote: |
Thanks For the help Kelvin.
It works fine for me. |
Who is Kelvin |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The temperature Lord? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Believe me, I've been called worse ... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
superk wrote: |
Believe me, I've been called worse ... |
mm..that's an easy name to pronounce, for me too, even being from a non-english back-ground...what you have been called, I wonder.
On the other hand, when I was in Phoenix, it was fun to listen different sounds made for my name too. One lady called me "Ad" and that's it; for a long time I used to think it was not me who she is calling up! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Anuj wrote: |
for a long time I used to think it was not me who she is calling up! |
No Comment
Robert wrote: |
The temperature Lord? |
Minus 273 - sounds about right for my physics test scores |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
superk wrote: |
Believe me, I've been called worse ... |
Try to live with a name like "Martial".
My friends used to call me "Martial Marso" because it sounds almost like "Marcel Marceau", the famous pantomime.
And this is how I got my favorite nickname! |
|
Back to top |
|
|
|