Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Symbolic parameter in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Symbolic parameter in REXX
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

Moderator Team Head


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

PostPosted: Fri Nov 14, 2008 7:04 pm    Post subject: Reply to: Symbolic parameter in REXX
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    Post subject: Reply to: Symbolic parameter in REXX
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

Senior Member


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

PostPosted: Fri Nov 14, 2008 11:38 pm    Post subject: Reply to: Symbolic parameter in REXX
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    Post subject: Re: Reply to: Symbolic parameter in REXX
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    Post subject: Re: Reply to: Symbolic parameter in REXX
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: 1226
Location: Israel

PostPosted: Sun Nov 16, 2008 6:17 pm    Post subject:
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

Senior Member


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

PostPosted: Sun Nov 16, 2008 9:55 pm    Post subject: Reply to: Symbolic parameter in REXX
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us