Chuck,

As Level-1 has indicated, you will have to read the entire TMC and do your
executed compare (length of the DSN computed up to the .GnnnnV00) on every
entry within the TMC. There are two ways to access the TMC (both documented
in the Programming Guide); one is a sequential access method and one is a
direct-read method that reads one specific record at a time. For performance
reasons, you will want to read the entire TMC of course in the sequential
access method. I know that other products read the TMC quite often (MXG of
course comes to mind) mining it for information. And there is nothing that
says you must use the CA 1 access methods (after all, the TMC is a simple
flat-file that any program using QSAM can read). The CA 1 macros for
sequential access will require an OPEN, a GET and a CLOSE. 

One nice reason to use the CA 1 macro's for the sequential access is that
the OPEN can specify if you want the active TMC used all the time (in which
case we will dynamically allocate it and a DD statement is NOT allowed),
optionally (in which case we will dynamically allocate the TMC if there is
no DD statement) or none of the time (in which case a DD statement is
required). So, if you only want to look at the active TMC you can eliminate
the DD statement from your JCL and simply have the CA 1 OPEN macro
dynamically allocate the ACTIVE TMC for you.

Russell Witt
CA 1

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Hardee, Chuck
Sent: Friday, February 12, 2016 5:17 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Reading the CA-1 Tape Catalog

Hello Everyone,

I have posted this to the IBM Mainframe and IBM Assembler lists.

I was wondering if anyone has ever written a program to read the CA-1 Tape
Catalog for a generic name?
In a nutshell, what I am wanting to do is look up in the catalog all entries
for a GDG base name.

Currently my program issues a call to the IBM Catalog Search Interface (CSI)
program, IGGCSI00, passing the GDG name and I get back all entries that are
currently cataloged. However, if I go to CA-1's TSO Inquiry panel and put in
the GDG name modified to have a low level qualifier of "-" (CA-1's
equivalent of "*"), I get back 621 entries. Since the GDG is defined to have
150 entries, that's all I'll ever get, via MVS services. However, as can be
seen, there are more tapes available.

I have read thru the CA-1 Tape Management Programming Guide, and there
appear to be numerous macros that can be used to access the catalog, but the
narratives for the macros leave something to be desired in the name of
clarity when one isn't a CA-1 expert. And, before you ask, yes, I have asked
CA-1 support for help but I am getting the run around from them. For
whatever reason, they just don't want to seem to help. It may be a level 1
protecting level 2 situation, or it may just be they don't want to take the
time to educate the user community. Whatever the reason, I need to look for
alternative assistance.

So, if anyone has a snippet or three of code to OPEN, READ and CLOSE the
CA-1 catalog looking for a dataset name, I would appreciate it if you would
be willing to share.

Thanks in advance,
Chuck


Charles (Chuck) Hardee<mailto:chuck.har...@thermofisher.com>
Senior Systems Engineer/Database Administration EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275 Phone +1 (724) 517-2633 | Mobile
+1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com<mailto:chuck.har...@thermofisher.com>  |
www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of
this e-mail or the information herein by anyone other than the intended
recipient, or an employee or agent of a system responsible for delivering
the message to the intended recipient, is prohibited. If you are not the
intended recipient, please inform the sender and delete all copies.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to