Thread View: comp.lang.rexx
4 messages
4 total messages
Started by Balam J. Abello
Sun, 15 Feb 1998 00:00
TSO-REXX reading LIBRARIAN datasets
Author: Balam J. Abello
Date: Sun, 15 Feb 1998 00:00
Date: Sun, 15 Feb 1998 00:00
52 lines
2937 bytes
2937 bytes
Hello,
I'm working on a Y2K project. We are spending a lot
of time searching libraries (PDS and Librarian) for
member names.
I wrote a foreground Rexx utility to scan directory
member names in a regular PDS. It works nicely and
it's very fast. The problem is that 30-40% of our
code resides in Librarian PDSs.
I talked to the CA folks and they suggested using the
ELIPS interface or FAIR. "FAIR" requires Rexx calling
a program that in turn uses the interface. Not very
clean. ELIPS is complicated and I have not been able
to figure this one out.
Does anyone know how to accomplish a Librairan directory
scan using TSO REXX?
Thanks,
Balam.
P.S. My PDS directory scan rutine follows.
/*-----------------------------------------------*/
/* Check member in a PDS type dataset. 2/10/98 */
/*-----------------------------------------------*/
chkpds:
PARSE UPPER ARG dsn mem
rc = SYSDSN(dsn)
if rc == "OK" then
do ;
address ISPEXEC
"LMINIT DATAID(DDVAR) DATASET("dsn")"
address ISPEXEC "LMOPEN DATAID(&DDVAR)"
address ISPEXEC "LMMFIND DATAID(&DDVAR) MEMBER("mem")"
if rc = 0 then say ' ' mem 'FOUND IN:' dsn '(PDS)'
address ISPEXEC "LMCLOSE DATAID(&DDVAR)"
end ;
else
say 'DATASET' dsn '(PDS) WAS NOT FOUND'
return
--
Re: TSO-REXX reading LIBRARIAN datasets
Author: John S. Giltner, Jr
Date: Sun, 15 Feb 1998 00:00
Date: Sun, 15 Feb 1998 00:00
39 lines
1841 bytes
1841 bytes
Balam J. Abello wrote: > > Hello, > > > I talked to the CA folks and they suggested using the > ELIPS interface or FAIR. "FAIR" requires Rexx calling > a program that in turn uses the interface. Not very > clean. ELIPS is complicated and I have not been able > to figure this one out. > > Does anyone know how to accomplish a Librairan directory > scan using TSO REXX? > > Thanks, > > Balam. > > P.S. My PDS directory scan rutine follows. > -- Hello, It has been a very very long time since I have used Librairan, but way back then I did not think that it used PDSs. I thought that it used direct access files using a special non-documented format. It did however have a utility to unload one of its files to a PDS. You should be able to call this routine from TSO and then run you PDS scan. Time consuming, but it should work. -- Good Luck, John G. The statements or opinions above are my own and are not guaranteed to be accurate or true.
Re: TSO-REXX reading LIBRARIAN datasets
Author: Robert Ngan
Date: Tue, 17 Feb 1998 00:00
Date: Tue, 17 Feb 1998 00:00
68 lines
3513 bytes
3513 bytes
In article <34E6F104.3232@softworld.com>, nospam@softworld.com says...
> Hello,
>
> I'm working on a Y2K project. We are spending a lot
> of time searching libraries (PDS and Librarian) for
> member names.
>
> I wrote a foreground Rexx utility to scan directory
> member names in a regular PDS. It works nicely and
> it's very fast. The problem is that 30-40% of our
> code resides in Librarian PDSs.
>
> I talked to the CA folks and they suggested using the
> ELIPS interface or FAIR. "FAIR" requires Rexx calling
> a program that in turn uses the interface. Not very
> clean. ELIPS is complicated and I have not been able
> to figure this one out.
>
> Does anyone know how to accomplish a Librairan directory
> scan using TSO REXX?
>
> Thanks,
>
> Balam.
>
> P.S. My PDS directory scan rutine follows.
>
> /*-----------------------------------------------*/
> /* Check member in a PDS type dataset. 2/10/98 */
> /*-----------------------------------------------*/
> chkpds:
>
> PARSE UPPER ARG dsn mem
>
> rc = SYSDSN(dsn)
>
> if rc == "OK" then
> do ;
> address ISPEXEC
> "LMINIT DATAID(DDVAR) DATASET("dsn")"
> address ISPEXEC "LMOPEN DATAID(&DDVAR)"
> address ISPEXEC "LMMFIND DATAID(&DDVAR) MEMBER("mem")"
>
> if rc = 0 then say ' ' mem 'FOUND IN:' dsn '(PDS)'
>
> address ISPEXEC "LMCLOSE DATAID(&DDVAR)"
> end ;
> else
> say 'DATASET' dsn '(PDS) WAS NOT FOUND'
> return
>
Since the FAIR routines are reentrant, you should be anble to invoke them with
the ADDRESS LINKPGM. I considered doing this once but the need went away.
The alternative is to try:
ADDRESS TSO "LIBLIST" mem "NOINFO DSSOURCE('"dsn"')"
IF rc > 0 THEN
SAY mem "not found"
ELSE
SAY mem "found in" dsn
I looked in the manual but it did not say any return code is set for ANY LIB/TSO
command. I'm just assuming..
--
Robert Ngan
CSC Financial Services Group
Re: TSO-REXX reading LIBRARIAN datasets
Author: Mark Zelden
Date: Tue, 17 Feb 1998 00:00
Date: Tue, 17 Feb 1998 00:00
101 lines
4716 bytes
4716 bytes
Robert Ngan wrote:
>
> In article <34E6F104.3232@softworld.com>, nospam@softworld.com says...
> > Hello,
> >
> > I'm working on a Y2K project. We are spending a lot
> > of time searching libraries (PDS and Librarian) for
> > member names.
> >
> > I wrote a foreground Rexx utility to scan directory
> > member names in a regular PDS. It works nicely and
> > it's very fast. The problem is that 30-40% of our
> > code resides in Librarian PDSs.
> >
> > I talked to the CA folks and they suggested using the
> > ELIPS interface or FAIR. "FAIR" requires Rexx calling
> > a program that in turn uses the interface. Not very
> > clean. ELIPS is complicated and I have not been able
> > to figure this one out.
> >
> > Does anyone know how to accomplish a Librairan directory
> > scan using TSO REXX?
> >
> > Thanks,
> >
> > Balam.
> >
> > P.S. My PDS directory scan rutine follows.
> >
> > /*-----------------------------------------------*/
> > /* Check member in a PDS type dataset. 2/10/98 */
> > /*-----------------------------------------------*/
> > chkpds:
> >
> > PARSE UPPER ARG dsn mem
> >
> > rc = SYSDSN(dsn)
> >
> > if rc == "OK" then
> > do ;
> > address ISPEXEC
> > "LMINIT DATAID(DDVAR) DATASET("dsn")"
> > address ISPEXEC "LMOPEN DATAID(&DDVAR)"
> > address ISPEXEC "LMMFIND DATAID(&DDVAR) MEMBER("mem")"
> >
> > if rc = 0 then say ' ' mem 'FOUND IN:' dsn '(PDS)'
> >
> > address ISPEXEC "LMCLOSE DATAID(&DDVAR)"
> > end ;
> > else
> > say 'DATASET' dsn '(PDS) WAS NOT FOUND'
> > return
> >
>
> Since the FAIR routines are reentrant, you should be anble to invoke them with
> the ADDRESS LINKPGM. I considered doing this once but the need went away.
> The alternative is to try:
> ADDRESS TSO "LIBLIST" mem "NOINFO DSSOURCE('"dsn"')"
> IF rc > 0 THEN
> SAY mem "not found"
> ELSE
> SAY mem "found in" dsn
>
> I looked in the manual but it did not say any return code is set for ANY LIB/TSO
> command. I'm just assuming..
>
> --
> Robert Ngan
> CSC Financial Services Group
I don't have an answer for your question, but as far as a search
for a member in a PDS why not skip the LMOPEN etc. and save time:
/* rexx */
PARSE UPPER ARG dsn mem
RC = sysdsn("'"dsn"("mem")'")
select
when RC = 'MEMBER NOT FOUND' then do
say mem 'WAS FOUND NOT FOUND IN' dsn
end
when RC = 'OK' then do
say mem 'WAS FOUND IN' dsn
end
when RC = 'DATASET NOT FOUND' then
say 'DATASET' dsn 'WAS NOT FOUND'
otherwise say RC '-' dsn
end /* select */
--
+--------------------------------+--------------------------------+
| Mark Zelden | Consultant |
| http://www.flash.net/~mzelden/ | CIBER Network Services, Inc. |
| mailto:mzelden@flash.net | mailto:mzelden@chi.ciber.com |
+--------------------------------+--------------------------------+
To email me remove the "DO-NOT-SPAM-" from the return address or
use one of addresses above.
Check out my MVS utilities page at:
http://www.flash.net/~mzelden/mvsutil.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads