View previous topic :: View next topic
|
Author |
Message |
sparrow
New User
Joined: 26 Mar 2007 Posts: 57 Location: Pune
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I don't understand. Where in your code did you substitute the variable "V" for the second node? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
sparrow
New User
Joined: 26 Mar 2007 Posts: 57 Location: Pune
|
|
|
|
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 |
|
|
sparrow
New User
Joined: 26 Mar 2007 Posts: 57 Location: Pune
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|