The previous challenge explained how newly allocated data set names
As a result, only the data set name is required for z/OS to locate the requested data set name among the thousands of disk volumes storing data set names.
Unix file names are excluded from the Master Catalog and User Catalogs.
However, the z/OS Catalog structure can locate the Unix file system directory containing Unix file names.
How are Unix file names located?
The simpliest answer is that Unix file names are located the exact same way that Unix file names are located in any Unix.
- Think tree trunk with many branches
- Unix has one and only one root directory ( / )
* the tree trunk
- A Unix file system consists of a directory structure
* the branches
- A directory structure means that a directory (branch) can be contained inside another directory
* more branches
- A directory within another directory is called a subdirectory
- The possible number of subdirectories is in the thousands
* lots of branches
- Unix file systems contain Unix file names
* leaves on the individual branches
- Directories are file systems that contain Unix file names
IBM AIX is a Unix derivative.
Review the link below from an AIX manual that provides explanation with visuals describing Unix directory structure
Unix Directory Structure
How are z/OS Unix file systems, such as ( /z ) directory, stored on a z/OS controlled disk volume?
- Multiple VSAM Linear Data Sets (LDS) type are "defined", each corresponding to particular directory structure.
- VSAM LDS Cluster name is "cataloged" - the data set name / volume label pairing
- VSAM LDS is "formatted" using a system supplied utility
- A z/OS "mount" command associates the VSAM data set name to a Unix directory
MOUNT FILESYSTEM('OMVS.STUDENT.ZFS') MOUNTPOINT('/z')
where OMVS.STUDENT.ZFS is the VSAM LDS and /z is the Unix directory
Every z/OS system has a ROOT filesystem mounted at / . The ROOT filesystem contains directories
called "mount points" where other filesystems are mounted
The following are available to view and edit Unix file names. Feel free to optionally try these various methods to view and edit Unix file names.From ISPF session
- TSO OMVS
* cat zfile
* oedit zfile
- cat zfile
- vi zfile
What is available to list all z/OS mounted Unix file systems on the contest system?From z/OS Unix shell command prompt - either TSO OMVS or SSH session
- df -P
* man df | more - enter to proceed to next page
q to quit listing help
* z/OS Unix df command description and options
- zfsadm query -iobydasd
- zfsadm query -iobyaggr
* zfsadm query command and explanation of available operands
The above links are external references / help commands, rather that commands to be executed as part of the challengeFrom ISPF =UF
- File_systems drop down
* recommended selections to review:
1. Mount table
5. zFS aggregates
- Unix default to read input is stdin
- Unix default to write output is stdout
- Unix default to write errors is stderr
Successful completion is to code Unix command to write requested report about /z filesystem to hlq.P2.OUTPUT(#11)
While Unix commands can be entered from a Unix shell prompt (stdin) with output written to the display (stdout), it is possible to execute Unix commands using JCL where STDIN, STDOUT, and STDERR are DDNAMEs directing output to to either a Unix file name or a data set name.
Learning System ID special instructions for this challenge.
Change all lowercase z##### to lowercase your_id in the JCL, then submit
JOB11 JCL executes a system utility, BPXBATCH, which initiates a Unix process. COND CODE 0001 is harmless, if observed in the output.Description of JOB11 JCL
- The REMOVE JCL step removes file name /z/z#####/mounts
* rm /z/z#####/mounts
- UNIX JCL step
* STDOUT is writing to file name mounts
* STDERR is writing to the JES output spool (visible using SDSF)
* STDIN is DUMMY
* STDPARM reads a stack of Unix shell ( SH ) commands to be processed
The stack of Unix shell echo commands followed by the ls command writes text lines to the STDOUT DD physical resource
which is currently /z/z#####/mounts file name
The df command has an operand that will create a report with the following format:
Note: When using the interactive Unix shell prompt, df | more command syntax will pause df command output until enter key which will proceed allowing you to see column labels and first entries in the df outputChange JCL JOB11 as follows:
- process df command with appropriate operand to write requested report for /z file system ONLY
Recommendation - Use the Unix command prompt to determine exact df command syntax needed
- write report to hlq.P2.OUTPUT(#11)
- Delete the echo commands and ls command - leave the SH command
- Insert a line after the SH command for the df command syntax to output requested report for /z filesystem
- Modify STDOUT DD to reference DSN=&SYSUID..P2.OUTPUT(#11),DISP=SHR
NOTE: Do not forget to delete the continuation lines from the previous STDOUT
Successful completion writes the requested report to hlq.P2.OUTPUT(#11)
Now you have even more z/OS experience with techniques using a combination of JCL and Unix file systems.