Page 1 of 1

Using LISTDS with system symblos

PostPosted: Tue Aug 16, 2011 7:34 pm
by gidonlando
Hello all,
This isn't strictly a REXX question but I encountered while working on a REXX.

I'm trying to use the LISTDS command on a library name containing a system symbol.
It looks something like this:
LISTDS SYS1.&SYSNAME..PREPROC
(I can't copy my exact work because the computer i use for internet is not the computer i use for the MF).
The command returns a "member not found "message because it's looking for the system symbol literally, it isn't translating it to the actual library name.

Does anyone know if it is possible to use LISTDS with system symbols?
Help would be appreciated...

Re: Using LISTDS with system symblos

PostPosted: Tue Aug 16, 2011 9:03 pm
by MrSpock
Can't you translate the symbolic value first, then run the LISTDS command?

Re: Using LISTDS with system symblos

PostPosted: Wed Aug 17, 2011 11:09 am
by gidonlando
LISTDS runs on a list of libraries that are generated dynamiclly within the REXX. I don't know the names of the libraries in advance. I might be able to have the REXX recognise when a library has a system symbol in it and only then translate, do you know of a command the translates a system symbol into its value?

Re: Using LISTDS with system symblos

PostPosted: Wed Aug 17, 2011 1:31 pm
by mongan
Here is an example to get the system symbol:
sysname = mvsvar('symdef','sysname')

Then change the dsn using overlay or parse or ..

Re: Using LISTDS with system symblos

PostPosted: Wed Aug 24, 2011 8:45 pm
by gidonlando
Thanks a lot everyone.
I ended up isolating the system symbols from the DSN,translated the value using mvsvar and then inserted it back in the DSN using REXX "insert" function.

Not the most elegent way but it worked.
btw, if anyone has a "cleaner" way of executing this operation i'd like to know.

thanks again all...