Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I copy a file from a "Librarian PDS"?

1,083 views
Skip to first unread message

Jeff

unread,
Aug 14, 1998, 3:00:00 AM8/14/98
to
I have recently been placed at a site that still uses "Librarian" PDS's. The
only way currently is to use JCL to copy down the file, or to use a home
grown CLIST [I would post an example, but I don't have e-mail at work]. By
researching the home grown utility I found a reference to a command calles
LAMBASTE. I have tried to duplicate the module which accesses the LAMBASTE
command, but it only gives me a return code of -19, with no message.

I did find a way to use FILEAID to copy the file to a regular PDS, but I
want to understand the usage of he LAMBASTE command. Of course there is no
documentation of this command, or how to access the LIBRARIAN files from
REXX?

Any suggestions?

Bill Lynch

unread,
Aug 15, 1998, 3:00:00 AM8/15/98
to

I faced the same problem in 1991 when we converted from ROSCOE to
TSO/ISPF. I wrote a couple of COBOL program which are called by REXX
programs to retrieve source & Librarian info (date added, last update,
-LANG, etc.). The secret is FAIRMODS (FAIR = File Access Interface
Routines, IIRC). You need to get a copy of Librarian's FAIRMODS manual,
which details the interface records, calls, etc. Post again if you need
more info & I'll see if I can find the doc on FAIRMODS.

Another possibility, you can allocate the appropriate datasets, OSJOB,
SYSPRINT, etc., and call the Librarian program from a REXX program (you
don't get the Librarian info that you get via the FAIRMODS approach). I
call the Librarian program to -ADD and -DEL modules when copying
production source down & when moving source from test to stage.

Bill Lynch

Jeff

unread,
Aug 15, 1998, 3:00:00 AM8/15/98
to
>-LANG, etc.). The secret is FAIRMODS (FAIR = File Access Interface

Never heard of it. Where would the program be? Load Module, Clist, REXX? Is
there a group of PDS's associated with FAIRMODS? Like FILEAID has several
PDS's with the FILEAID as the first node of the PDS name:
FILEAID.PROD.LOAD
FILEAID.PROD.CLIST
etc.

>SYSPRINT, etc., and call the Librarian program from a REXX program (you

What is the "Librarian" program?

I really just need to be able to copy a program down from the librarian PDS
and get an error code if the member is not found.

It would be nice to be able to scan for a string across an entire Librarian
PDS. Currently this is done through a batch job using a pgm called LIBVS. I
haven't had a chance to convert it to REXX yet.

Any further info would be greatly appreciated.

Bill Lynch

unread,
Aug 16, 1998, 3:00:00 AM8/16/98
to
Jeff wrote:
>
> >-LANG, etc.). The secret is FAIRMODS (FAIR = File Access Interface
>
> Never heard of it. Where would the program be? Load Module, Clist, REXX? Is
> there a group of PDS's associated with FAIRMODS? Like FILEAID has several
> PDS's with the FILEAID as the first node of the PDS name:
> FILEAID.PROD.LOAD
> FILEAID.PROD.CLIST

Probably something like that - talk to the sysprog who supports
Librarian. It's a load module which you either EXEC
PGM=librarian_program or CALL.

> etc.
>
> >SYSPRINT, etc., and call the Librarian program from a REXX program (you
>
> What is the "Librarian" program?

If your site is using Librarian, people are executing the "Librarian
program" to store & retrieve source. I wrote "Librarian program" because
the name is an installation variable, so the program I execute for
Librarian services is not necessarily the same name that you'd use (and
I'm not certain what it is, something like ADRLIBRN).

Regarding the FAIRMODS modules, these are load modules which you CALL
with a standard parm list (I'll bet your next paycheck they're in the
same loadlib as the "Librarian program <g>). I don't know which loadlib
because I don't use a STEPLIB or JOBLIB to use them.

>
> I really just need to be able to copy a program down from the librarian PDS
> and get an error code if the member is not found.
>
> It would be nice to be able to scan for a string across an entire Librarian
> PDS.

A librarian master is not a PDS - they use their own file structure (at
least you don't have to compress it).

> Currently this is done through a batch job using a pgm called LIBVS. I
> haven't had a chance to convert it to REXX yet.

Librarian provides good scan capabilities - use FAIRSCAN (another one!)
instead of the scan option of the Librarian. The Librarian ENQs on the
index while it's scanning - this will tie up the Librarian master
(that's
what they call it) and lock out compiles, other scans, etc. FAIRSCAN
does not issue any ENQs, so there's no contention.

I'll send myself a copy of your post to remind me to look for some more
info when I'm at work.

Bill Lynch

Richard Brady

unread,
Aug 18, 1998, 3:00:00 AM8/18/98
to
Jeff,

I tried to send this direct, but your address doesn't work very well.

I enclose some JCL to scan for strings. The lines could be placed in a dataset
and the JCL could be rendered in Rexx. The master file is the librarian file.
The scan searches all modules from xxxxaa to xxxx9999 for each of these four
strings:
'we
'WE
"we
"WE
Does this help?

Jeff wrote:

> I have recently been placed at a site that still uses "Librarian" PDS's. The
> only way currently is to use JCL to copy down the file, or to use a home
> grown CLIST [I would post an example, but I don't have e-mail at work]. By
> researching the home grown utility I found a reference to a command calles
> LAMBASTE. I have tried to duplicate the module which accesses the LAMBASTE
> command, but it only gives me a return code of -19, with no message.
>
> I did find a way to use FILEAID to copy the file to a regular PDS, but I
> want to understand the usage of he LAMBASTE command. Of course there is no
> documentation of this command, or how to access the LIBRARIAN files from
> REXX?
>

> Any suggestions?


TEMP.JCL

Jeff

unread,
Aug 18, 1998, 3:00:00 AM8/18/98
to
>I tried to send this direct, but your address doesn't work very well.

I purposely don't include my e-mail. Up until I started using this
newsgroup, I never received any SPAM, save from Microsoft, which I
requested. Now every day since I first mistakenly published my e-mail on a
few newsgroups I have received 4 or 5 junk e-mails.....oh well.

>
>I enclose some JCL to scan for strings. The lines could be placed in a
dataset
>and the JCL could be rendered in Rexx. The master file is the librarian
file.
>The scan searches all modules from xxxxaa to xxxx9999 for each of these
four
>strings:
>'we
>'WE
>"we
>"WE
>Does this help?


Very helpful. Problem being I have tried to allocate the Librarian PDS's,
dsorg=da, using TSO ALLOC command, but it keeps teeling me the allocated DSN
must be a sequential (dsorg=ps) or partitioned (dsorg=po) . Where Librarian
PDS's are neither of these.

But this helps.

Richard Brady

unread,
Aug 19, 1998, 3:00:00 AM8/19/98
to
Jeff,

Perhaps your signature could tell us which characters to remove from your
address inorder to contact you?

Otherwise, I include two more rexx execs - one to move source from the librarian
to a pds and the other to print or display to the terminal a librarian file.
Perhaps these will be equally useful.

I cannot contact the newsgroups from work where these execs reside - I can send
email. This just makes the task a little harder.

Rich

LIBMOVE.REX
LIBPR.REX

Bill Lynch

unread,
Aug 19, 1998, 3:00:00 AM8/19/98
to
Richard Brady wrote:
>
> Jeff,
>
> Perhaps your signature could tell us which characters to remove from your
> address inorder to contact you?

Same problem here - I sent a big chunk of COBOL code (the program my
REXX execs call that actually opens/reads/closes the Librarian master,
along with a description of the FAIR routines). It didn't bounce, so I
figured you'd received it.

Bill Lynch

Jeff

unread,
Aug 19, 1998, 3:00:00 AM8/19/98
to
"ALLOC DDN(MASTER) DSN('XX01.SOURCE') SHR REUSE";
"ALLOC DDN(SYSPRINT) DUMMY REUSE";
"ALLOC DDN(OSJOB) DSN(NEWXFER.PLI("CURR")) REUSE";
/* MOVE EACH ONE TO THE PDS CALLED NEWXFER.PLI (IN MY AREA) */
"ALLOC DDN(INDEX) DUMMY REUSE";
"ALLOC DDN(LIST) DUMMY REUSE";
"ALLOC DDN(BACKUP) DUMMY REUSE";
"ALLOC DDN(SYSPUNCH) DUMMY REUSE";
"ALLOC DDN(SYSUDUMP) DUMMY REUSE";
"ALLOC DDN(SYSIN) DSN(TEMPX$#$) REUSE OLD INPUT";
"BCALL LIBRIAN 'NRJS,NJTA,DEPTH=55,OEX=LIBROEX1,'"

I recognise all of these commands except the BCALL. Is that part of TSO MVS
REXX?
Another problem I have is when the MASTER pds is allocated an error message
tells me I have to "allocate either a member of a pds or a sequential
dataset". I can get around this by including DSORG(PS) to force the
Librarian PDS to a flat file. You obviously don't have the same problem, any
suggestions?

At our site all of the Librarian PDS's have different passwords. When I use
the home-grown utility the selection list displays the password. Any way to
extract all of the passwords to a flat file, without terminal cut and paste?

Richard Brady

unread,
Aug 21, 1998, 3:00:00 AM8/21/98
to
Most of our librarian files are DSORG=DA also. A few are PS. See the second
exec which access multiple librarian files some DA some PS.

BCALL searchs the linklist for the program name. CALL is equivalent, but you
must use the loadlib name, too as

"CALL 'SYS1.CAI.LOADLIB(LIBRIAN)' 'NRJS,NJTA,DEPTH=55,OEX=LIBROEX1,'";

CALL is part of TSO MVS I believe.

By the way, librian is an alias for afolibr in our system.

Good luck.

Jeff

unread,
Aug 21, 1998, 3:00:00 AM8/21/98
to
>BCALL searchs the linklist for the program name. CALL is equivalent, but
you
>must use the loadlib name, too as

I normally use :

"ISPEXEC SELECT PGM(program name) PARM(parms as they appear in JCL)"

this works nicely when converting JCL to REXX. Which is how I solved my
little program.

>By the way, librian is an alias for afolibr in our system.


Thanks for the hint, I will look for this module.

I have found a way to do this using program LIBVS using the above ISPEXEC
example converted directly from the JCL. I had to check the program out,
which generated a JCL stream. I then extracted the JCL from JES and
converted it to REXX. The allocation of the Librarian PDS's is the same as
you mentioned. I must have been doing something wrong, because I can
allocate them now.

I will post my several solutions on monday.


Joe R. Wyatt

unread,
Sep 1, 1998, 3:00:00 AM9/1/98
to
The fairmods are covered lightly here, so I won't go into them other than to say,
"You can only read the data and directory information with the fairmods." They
have no "write" or "update" facility using them. There are a couple of things I
do need to say about this though...

First, try to find the librarian util manual. It's been a while since I worked
with the beast, but I seem to recall there being a module discussed there that
would allow you to "read" a member.

Second, the "LAMBASTE" program probably calls the LAMB file access program. Lamb
is an access method that can be specified on the dd card (or in your svc 99 parm
list) on a librarian master to obtain read access as if it were a pds. Lamb is a
seperate cost option and it is not guaranteed that you have it, but that is what
makes sense to me.

Joe Wyatt

Bill Lynch wrote:

> Jeff wrote:
> >
> > I have recently been placed at a site that still uses "Librarian" PDS's. The
> > only way currently is to use JCL to copy down the file, or to use a home
> > grown CLIST [I would post an example, but I don't have e-mail at work]. By
> > researching the home grown utility I found a reference to a command calles
> > LAMBASTE. I have tried to duplicate the module which accesses the LAMBASTE
> > command, but it only gives me a return code of -19, with no message.
> >
> > I did find a way to use FILEAID to copy the file to a regular PDS, but I
> > want to understand the usage of he LAMBASTE command. Of course there is no
> > documentation of this command, or how to access the LIBRARIAN files from
> > REXX?
>

> I faced the same problem in 1991 when we converted from ROSCOE to
> TSO/ISPF. I wrote a couple of COBOL program which are called by REXX
> programs to retrieve source & Librarian info (date added, last update,

> -LANG, etc.). The secret is FAIRMODS (FAIR = File Access Interface

> Routines, IIRC). You need to get a copy of Librarian's FAIRMODS manual,
> which details the interface records, calls, etc. Post again if you need
> more info & I'll see if I can find the doc on FAIRMODS.
>
> Another possibility, you can allocate the appropriate datasets, OSJOB,

> SYSPRINT, etc., and call the Librarian program from a REXX program (you

Jeff

unread,
Sep 2, 1998, 3:00:00 AM9/2/98
to

>The fairmods are covered lightly here, so I won't go into them other than
to say,
>"You can only read the data and directory information with the fairmods."
They
>have no "write" or "update" facility using them. There are a couple of
things I
>do need to say about this though...


I only need to read the data. There is a home grown change management
package for updating the LIB PDS's.

>
>First, try to find the librarian util manual. It's been a while since I
worked

Non-existant. Everybody uses the home grown. They even have an entire group
of programs we can't even read, even though we are responsible for them.

>with the beast, but I seem to recall there being a module discussed there
that
>would allow you to "read" a member.
>
>Second, the "LAMBASTE" program probably calls the LAMB file access program.
Lamb
>is an access method that can be specified on the dd card (or in your svc 99
parm
>list) on a librarian master to obtain read access as if it were a pds.
Lamb is a
>seperate cost option and it is not guaranteed that you have it, but that is
what
>makes sense to me.


I did get LAMBASTE to work as well as LIBVS and FILEAID Somewhere in this
thread I posted the solutions I came up with.

Thanks for the suggestion.

Jeff

unread,
Sep 3, 1998, 3:00:00 AM9/3/98
to
>I missed the beginning of the thread but there is a JCL parameter for
Librarian
>to input a single member as if it were a member of a PDS in the JCL, which
>matches the Subject title and I haven't seen mentioned.


As the newsgroup says REXX. Yes the JCL option is "SUBSYS=(LAM,PSWD='XXXX')"
or something to that effect. I cannot simulate this option in REXX. Running
JCL in the background while having REXX wait for it to finish is not an
option.

I have posted several solutions. The seem to be proprietary and require
passwords with the exception of a FileAid solution which requires neither,
but is a bit time consuming.

DMcRitchie

unread,
Sep 4, 1998, 3:00:00 AM9/4/98
to
Hi Group,

I missed the beginning of the thread but there is a JCL parameter for Librarian
to input a single member as if it were a member of a PDS in the JCL, which
matches the Subject title and I haven't seen mentioned.

David McRitchie
The REXX Macros Toolbox
http://members.aol.com/dmcritchie/home.htm

Neal Kostanski

unread,
Sep 6, 1998, 3:00:00 AM9/6/98
to
On Thu, 3 Sep 1998 21:02:39 -0400
Jeff <a...@A.COM> wrote

"As the newsgroup says REXX. Yes the JCL option is "SUBSYS=(LAM,PSWD='XXXX')"
or something to that effect. I cannot simulate this option in REXX. Running
JCL in the background while having REXX wait for it to finish is not an
option."

The LAM software is an OPTION of CA-LIBRARIAN and is not available at all
installations. If the option is not available at your location, then you will
need to run a librarian batch job step before your rexx program or run ELIPSE
from TSO. These steps are described in the various manuals or your site might
have them on BOOK MANAGER.

Regrads,
Neal Kostanski
Ross Products, Division of Abbott Laboratories

Jeff

unread,
Sep 8, 1998, 3:00:00 AM9/8/98
to
>need to run a librarian batch job step before your rexx program or run
ELIPSE
Is ELIPSE part of TSO or ISPF? I have seen it at only one place of the many
I have worked.

There is absolutely no documentation on Librarian at the site I am currently
working.

Bill Lynch

unread,
Sep 9, 1998, 3:00:00 AM9/9/98
to
Jeff wrote:
>
> >need to run a librarian batch job step before your rexx program or run
> ELIPSE
> Is ELIPSE part of TSO or ISPF? I have seen it at only one place of the many
> I have worked.

ELIPS is Librarian's ISPF interface. Try the PF1 key - is has online
doc. My site has two options:

1. L.E = edit mode (actually, I suspect the "E" in "L.E" is "ELIPS")

2. L.U = Librarian utilities

Most of us, by far, use the L.E option most of the time (I use L.U
occasionally to copy a Librarian module to a PDS or flat file).
Everything else can be done from the ELIPS panel.

Bill Lynch

Joe R. Wyatt

unread,
Sep 14, 1998, 3:00:00 AM9/14/98
to
Elipse is an ISPF interface to the Librarian kludge er.. uh.. system. If it is
installed in your environment it would be something clever like "e" off of your
main librarian panel.

Jeff wrote:

> >need to run a librarian batch job step before your rexx program or run
> ELIPSE
> Is ELIPSE part of TSO or ISPF? I have seen it at only one place of the many
> I have worked.
>

be...@bigfoot.com

unread,
Sep 15, 1998, 3:00:00 AM9/15/98
to
The following works for me.

/* REXX EXEC -- RETRIEVE LIBRARIAN MEMBER */
ARG LIBR LMBR LCFILE
CALL MSG "OFF"
QUOTE = "'"
CALL FREE_LIBR
"DELETE" LCFILE
"ALLOC DS('"LIBR"') DD(MASTER) SHR REU"
"ALLOC DD(INDEX) DUMMY REU"
"ALLOC DD(LIST) DS(*) REU"
"ALLOC DD(OSJOB) DS(*) REU"
"ALLOC DD(SYSPRINT) DUMMY REU"
"ALLOC DD(SYSIN) DSORG(PS) RECFM(F,B) LRECL(80),
BLKSIZE(0) SPACE(1 1) TRACKS"
"ALLOC DD(SYSPUNCH) DSORG(PS) RECFM(F,B) LRECL(80),
BLKSIZE(0) SPACE(5 5) TRACKS"
"ALLOC DD(LCOPY) DSORG(PS) RECFM(F,B) LRECL(80),
BLKSIZE(0) SPACE(5 5) TRACKS DS("LCFILE")"
NEWSTACK
QUEUE '-OPT UTILITY '
QUEUE '-PUNCH' LMBR
QUEUE '-END '
"EXECIO 3 DISKW SYSIN (FINIS"
DELSTACK
"CALL 'SYS2.LIBR.LOADLIB(LIBRARN)' 'NJTA,NJT,NRJS'"
IF RC = 12 THEN
DO
CALL FREE_LIBR
RETURN 12
END
NEWSTACK
"EXECIO 3 DISKR SYSPUNCH (SKIP"
"EXECIO * DISKR SYSPUNCH (FINIS"
NREC = QUEUED() - 2
"EXECIO "NREC" DISKW LCOPY (FINIS"
QUEUE
DELSTACK
CALL FREE_LIBR
RETURN 0

FREE_LIBR:
"FREE DD(MASTER,LIST,INDEX,OSJOB,SYSPRINT,LCOPY)"
"FREE DD(SYSPUNCH,SYSIN) DELETE"
RETURN

morvel...@gmail.com

unread,
Jan 7, 2015, 12:30:23 PM1/7/15
to
I'm sorry , i dont speak english but I try..., i have a question , i copy with PGM=AFOLIBR , but i need this programm replace, i've searched a command that can replace, because with copy i need to first delete an then execute the copy, How to copy pds to librarian?




El lunes, 14 de septiembre de 1998 02:00:00 UTC-5, Joe R. Wyatt escribió:

Jaime Cruz

unread,
Jan 7, 2015, 7:04:41 PM1/7/15
to
You will have to use a Librarian utility. That is a proprietary data
set format, I don't believe there are any documented APIs that you can
use. Same with Panvalet.

--
Jaime A. Cruz
Secretary
Nassau Wings Motorcycle Club
http://www.nassauwings.org/

AMA District 34
http://www.AMADistrict34.com/
Pop's Run
http://www.popsrun.org/
0 new messages