Page 1 of 1

Pass a varaible to a rexx program

PostPosted: Thu May 24, 2012 3:58 pm
by Viswanathchandru
Dear all,

I'm trying to pass a varaible to a rexx program through a rexx program. I tried in this way but i'm not able to get that variable.

/* rexx*/
   pull date
  date1 = substr(date,1,2)
call result 'date1'
where result is another rexx code that is present in the same PDS as the previous one and that looks this way.
/* rexx */
   say date1
. Here as said, i'm not able to get the date1 variable. Please guide me.

Regards,
Viswa

Re: Help required.

PostPosted: Thu May 24, 2012 4:09 pm
by Akatsukami
First, give your thread a meaningful title.

Second, of course you can't get the DATE1 variable like that; enclosing it in quotes (single or double) makes it a literal.

Third, I don't see that the RESULT script is parsing any arguments. Naturally, it won't use any, no matter how many you call it with.

Re: Help required - For passing arguments/variables b/w rexx

PostPosted: Thu May 24, 2012 4:18 pm
by Viswanathchandru
Hello Akatsukami,


Thanks, For addressing the post. yes. I got it now. it was my mistake. I missed to arg the value. Thanks again!


Regards,
Viswa