SwiftWarrior
SwiftWarrior

Reputation: 1964

How can I determine if a dataset is zFS

What z/OS control block can I query to determine if a dataset is of type zFS? all other file types can be determined by looking at flags in the F1DSECT control block, but I don't see anything about zFS there.

Upvotes: 2

Views: 828

Answers (1)

Valerie R
Valerie R

Reputation: 1817

I don't believe you can answer the question just by looking at the bits in the VTOC. At minimum, I think you'll need to call IGGCSI00 and check for FSDSFLAG to detect a zFS.

There's also a UNIX Services way...

If the filesystem you're looking at is mounted (in the UNIX Services sense), one solution is to use the w_getmntent() or BPX1GMN service. If you happen to know the mount point (from a path on the filesystem, etc), you can go directly to it - otherwise, you can iterate through the mount points until you find the one matching the dataset name you're looking for. From there, the output from BPX1GMN (see the BPXYMNTE macro) has most of the information you'll need to understand the filesystem type.

If you need deeper information, there's also the w_statvfs() and pfsctl() functions. Not sure what you'd do if the filesystem isn't mounted, however.

Upvotes: 1

Related Questions