Using LISTDS with system symblos



IBM's Command List programming language & Restructured Extended Executor

Using LISTDS with system symblos

Postby gidonlando » Tue Aug 16, 2011 7:34 pm

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...
gidonlando
 
Posts: 21
Joined: Wed Jun 15, 2011 10:22 am
Has thanked: 0 time
Been thanked: 0 time

Re: Using LISTDS with system symblos

Postby MrSpock » Tue Aug 16, 2011 9:03 pm

Can't you translate the symbolic value first, then run the LISTDS command?
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Using LISTDS with system symblos

Postby gidonlando » Wed Aug 17, 2011 11:09 am

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?
gidonlando
 
Posts: 21
Joined: Wed Jun 15, 2011 10:22 am
Has thanked: 0 time
Been thanked: 0 time

Re: Using LISTDS with system symblos

Postby mongan » Wed Aug 17, 2011 1:31 pm

Here is an example to get the system symbol:
sysname = mvsvar('symdef','sysname')

Then change the dsn using overlay or parse or ..
User avatar
mongan
 
Posts: 211
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Using LISTDS with system symblos

Postby gidonlando » Wed Aug 24, 2011 8:45 pm

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...
gidonlando
 
Posts: 21
Joined: Wed Jun 15, 2011 10:22 am
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post