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

Symbolic parameter in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sparrow

New User


Joined: 26 Mar 2007
Posts: 57
Location: Pune

PostPosted: Fri Nov 14, 2008 6:58 pm
Reply with quote

I have a problem using symbolic parameter..

I want to display the content of a Dataset, the Dataset name is no hardcoded in the program, the second node of the datset is the Symbolic parameter ( MYUID..&ABCD.NOV). I PULLed the value of ABCD from a panel and stored in a variable V. Now I am calling a subroutine which has the command,
ADDRESS TSO "LISTDS" "MYUID..&ABCD.NOV" "MEMBERS".
But when I call the subroutine this Symbolic parameter is not resolved and I am getting error message " Invalid Dataset

Please someone throw some light on this
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Nov 14, 2008 7:04 pm
Reply with quote

I don't understand. Where in your code did you substitute the variable "V" for the second node?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Nov 14, 2008 11:08 pm
Reply with quote

I got lost at where you saved the value of ABCD in V,
then you code:
Code:
ADDRESS TSO "LISTDS" "MYUID..&ABCD.NOV" "MEMBERS".

and don't use your variable V?
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Nov 14, 2008 11:38 pm
Reply with quote

Code:
ADDRESS TSO "LISTDS" "MYUID..&ABCD.NOV" "MEMBERS"

Also, rexx will not resolve stuff within quotes.

and rexx does not use ampersand notation for variables.
Back to top
View user's profile Send private message
sparrow

New User


Joined: 26 Mar 2007
Posts: 57
Location: Pune

PostPosted: Sun Nov 16, 2008 4:50 pm
Reply with quote

Sorry Dick, I forgot to mention that I have that moved the value of "V" to "ABCD".

I have coded &ABCD in the PROC. but it was not resolved.

Thanks
Back to top
View user's profile Send private message
sparrow

New User


Joined: 26 Mar 2007
Posts: 57
Location: Pune

PostPosted: Sun Nov 16, 2008 4:54 pm
Reply with quote

Pedro wrote:
Code:
ADDRESS TSO "LISTDS" "MYUID..&ABCD.NOV" "MEMBERS"

Also, rexx will not resolve stuff within quotes.

and rexx does not use ampersand notation for variables.


Hi Pedro,

Is there any other way that I can substitute my value to the second node of the Dataset ?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Nov 16, 2008 6:17 pm
Reply with quote

sparrow wrote:
Is there any other way that I can substitute my value to the second node of the Dataset ?


This is basic rule for all REXX programmers:
REXX will try to substitute everything that is not between quotes.

If you want to substitute ABCD by its value, you should write:
Code:
ADDRESS TSO "LISTDS MYUID."ABCD".NOV MEMBERS"
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sun Nov 16, 2008 9:55 pm
Reply with quote

You have to compose your command by combining constants with variables. As Marso indicated, you can just put them next to each other.

Or you can use the abuttal characters: ||
Code:
ADDRESS TSO "LISTDS MYUID." || ABCD || ".NOV MEMBERS"

Some people prefer that because it is easier to see the variable.

Use 'HI REXX' command in the editor to distinguish constants from variables.
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 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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top