Information about existing dataset.



High Level Assembler(HLASM) for MVS & VM & VSE

Information about existing dataset.

Postby vinodj » Wed Dec 21, 2011 3:21 pm

Hello,

I have read about BPX1STA macro which can give information about whether a flat file is present or not given certain path.
Is it possible to know whether a dataset is existing on mainframe using assembler program(similar to this macro or something else) but without using dynamic allocation function.

Regards,
Vinod
vinodj
 
Posts: 29
Joined: Wed Nov 23, 2011 6:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Information about existing dataset.

 

Re: Information about existing dataset.

Postby steve-myers » Wed Dec 21, 2011 7:11 pm

Yes, but ...

First you must determine where the dataset is located; either by having the location provided to you or by using the catalog LOCATE and CAMLST macros. LOCATE and CAMLST will not retrieve all the volumes where a multiple volume dataset is cataloged, but they will always retrieve the first volume. Many years ago there was an undocumented "super LOCATE" that could retrieve all the volumes. "Super LOCATE" is still not documented, but now you can use IGGCSI00 to retrieve all the volumes for a dataset from the catalog. IGGCSI00 is a program your program calls using the LINK macro or something similar; it is not a macro.

Then you can obtain the format 1 or format 9 DSCB for the dataset. The "classic" way is to use the OBTAIN and CAMLST macros, now you can use newer macros that conceptually query the VTOC index.

LOCATE, OBTAIN, and CAMLST are documented in DFSMSdfp Advanced Services for your release. The IECSDSL1 macro defines the data area of the format 1 DSCB and format 9 DSCBs as well as most of the other DSCBs in a VTOC.

The CAMLST macro constructs a data area used by the LOCATE and OBTAIN macros.

If your real goal is to determine if the dataset exists, you can use the DALRTORG key in dynamic allocation. DALRTORG retrieves the format 1 or format 9 DSCB for the first volume of a dataset, and copies DSxDSORG field to the DALRTORG key.

The only way to determine if a tape dataset exists is to actually attempt to open the dataset after dynamic allocation has mounted the volume. If the dataset does not exist on the volume OPEN will abnormally terminate with an x13 ABEND.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Information about existing dataset.

Postby mikereis » Wed Dec 21, 2011 10:25 pm

Look for information on the Catalog Search Interface (CSI) in z/OS V1R12.0 DFSMS Managing Catalogs.

We used to use SVC 26 to obtain information from the catalog but IBM's strategic direction replacing SVC 26 is CSI. My understanding is that CSI uses SVC 26. :)
mikereis
 
Posts: 14
Joined: Thu Jan 13, 2011 6:23 am
Has thanked: 0 time
Been thanked: 0 time

Re: Information about existing dataset.

Postby steve-myers » Thu Dec 22, 2011 1:30 am

I started using CSI back in 1999. I did a DUMPT of the OS/390 V2R4 IGGCSI00 at that time, and found an SVC 26 instruction in it. I also found, almost by accident, that the OS/390 2.4 IGGCSI00 worked just fine in OS/390 1.3. This did not surprise me since I suspect ISPF 3.4 uses the undocumented SVC 26 interface used by CSI, if it does not use CSI directly.

All I know for sure is the documentation for LOCATE (e.g., SVC 26) hasn't changed except the documentation to read a catalog block by its TTR, something that only applies to OS/360 CVOL catalogs, has long since disappeared.

I don't think I've seen a "strategic direction" that IGGCSI00 replaces LOCATE, but certainly LOCATE has not been enhanced in any way.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post