z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


getmntent

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-getmntent--stem--+---------------------+--------------------><
                    '-devno--+----------+-'   
                             '-pathflag-'     

Function

getmntent invokes the w_getmntent callable service to get information about the mounted file systems, or a specific mounted file system, and return the formatted information in a stem variable.

Parameters

stem
The name of a stem variable used to return the mount table information. The stem has two dimensions: the field name, followed by a period and the number of the mount table entry. For example, you can access the file system name for the first entry in the mount table as stem.mnte_fsname.1.
For the field name, you can specify a numeric value (see REXX predefined variables) or the predefined variable beginning with MNTE_ used to derive the appropriate numeric value. For example, you could use stem.mnte_fsname.1 or stem.6.1 to access the file system name for the first entry:
Variable Description
MNTE_AGGNAME The name of the zFS aggregate data set.
MNTE_BYTESREADHW The number of bytes read (high-word value).
MNTE_BYTESREADLW The number of bytes read (low-word value).
MNTE_BYTESWRITTENHW The number of bytes written (high-word value).
MNTE_BYTESWRITTENLW The number of bytes written (low-word value).
MNTE_DD The ddname specified on the mount.
MNTE_DEV The device ID of the file system.
MNTE_DIRIBC The number of directory I/O blocks.
MNTE_FILETAG The file tag.
MNTE_FROMSYS The file systems are to be moved from here.
MNTE_FSNAME The file system name that was specified on the mount. This statement applies only to HFS and zFS. The file system name is the name of the MVS™ data set that contains the HFS or zFS file system.
MNTE_FSTYPE The file system type.
MNTE_MODE

The file system type mount method. MNTE_MODE contains a decimal number that corresponds to the value as defined in the field mntentfsmode in the BPXYMNTE mapping macro. The REXX predefined variables for this field, as well as other fields on this interface, are a subset of what might be returned by the getmntent service.

You can specify a numeric value (see REXX predefined variables) or one of the following predefined variables used to derive the appropriate numeric value. For example, there is no predefined rexx variable corresponding to the bit position defined by mntentfssynchonly in the mntentfsmode.

MNT_MODE_RDWR
File system mounted read-write.
MNT_MODE_RDONLY
File system mounted read-only.
MNT_MODE_AUNMOUNT
The file system can be unmounted if the system's owner crashes.
MNT_MODE_CLIENT
The file system is a client.
MNT_MODE_EXPORT
The file system exported by DFS.
MNT_MODE_NOAUTOMOVE
Automove is not allowed.
MNT_MODE_NOSEC
No security checks are enforced.
MNT_MODE_NOSETID
SetUID is not permitted for files in this filesystem.
MNT_MODE_SECACL
ACLs are supported by the security product
MNTE_PARDEV The ST_DEV of the parent file system.
MNTE_PARM The parameter specified with mount().
MNTE_PATH The mountpoint pathname.
MNTE_PFSSTATUSNORMAL Normal status string returned by the physical file system.
MNTE_PFSSTATUSEXCP Exception status string returned by the physical file system.
MNTE_ROSECLABEL Default security label for objects in a read-only file system.
MNTE_QJOBNAME The job name of the quiesce requestor.
MNTE_QPID The PID of the quiesce requestor.
MNTE_QSYSNAME The name of the quiesce system name.
MNTE_READCT The number of reads from filesys.
MNTE_READIBC The number of read I/O blocks.
MNTE_RFLAGS The request flags.
MNTE_ROOTINO The inode of the mountpoint.
MNTE_ROSECLABEL The read-only SECLABEL.
MNTE_STATUS The status of the file system. To specify the information, you can specify a numeric value (see REXX predefined variables) or one of the following predefined variables used to derive the appropriate numeric value:
MNT_ASYNCHMOUNT
Asynchronous mount in progress for this file system.
MNT_FILEACTIVE
File system is active.
MNT_FILEDEAD
File system is dead.
MNT_FILEDRAIN
File system is being unmounted with the drain option.
MNT_FILEFORCE
File system is being unmounted with the force option.
MNT_FILEIMMED
File system is being unmounted with the immediate option.
MNT_FILENORM
File system is being unmounted with the normal option.
MNT_FILERESET
File system is being reset.
MNT_IMMEDTRIED
File system unmount with the immediate option failed.
MNT_MOUNTINPROGRESS
Mount in progress for this file system
MNT_QUIESCED
File system is quiesced.
MNTE_STATUS2 The status of the file system.
MNTE_SUCCESS Successful moves.
MNTE_SYSLIST A list of system names.
MNTE_SYSNAME The name of the owning system.
MNTE_TYPE The file system type.
MNTE_UID The effective UID of the nonprivileged user who mounted this file system. MNTE_UID is always 0 for the file system mounted by the privileged user.
MNTE_WRITECT The number of writes done.
MNTE_WRITEIBC The number of write I/O blocks.
devno
An optional parameter, this is the device number for a specific file system for which you want the mount information. Specifying 0 is the equivalent of not specifying a device number.
pathflag
An optional parameter, this specifies the returned path names.
0
Returns the current path name.
1
Returns up to 64 bytes of the path name at the time of the mount.

Example

Show all mounted file systems:
address syscall 'getmntent mounts.'  
do i=1 to mounts.0                   
   say mounts.mnte_fsname.i          
end

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014