Pass a varaible to a rexx program



IBM's Command List programming language & Restructured Extended Executor

Pass a varaible to a rexx program

Postby Viswanathchandru » Thu May 24, 2012 3:58 pm

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
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Pass a varaible to a rexx program

 

Re: Help required.

Postby Akatsukami » Thu May 24, 2012 4:09 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day

These users thanked the author Akatsukami for the post:
Viswanathchandru (Thu May 24, 2012 4:19 pm)
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby Viswanathchandru » Thu May 24, 2012 4:18 pm

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
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post