z/OS UNIX Tools and Solutions
This chapter describes several z/OS UNIX utilities and provides examples for achieving a specific goal. The tools that are described in this chapter are available at the following ITSO website:
This chapter includes the following topics:
6.1 Utility RXISHMT
The utility RXISHMT filters the mount table display, which is not supported in ISHELL. The tool is based on the V2R1 version of ISHELL with some extra functions to support the mount table only.
6.1.1 Starting RXISHMT in TSO/ISPF
You can run the utility by using the following command from any ISPF panel command line:
tso rxishmt
All of your file systems are listed as in the original ISHELL when the mount table display is started.
6.1.2 Use of FILTER command
The use of a new FILTER command you can reduce the list according to filter specifications regarding the owning system, mount point, and file system name. The syntax of the command is shown in Figure 6-1.
filter [ reset | [o=[*]string[*]] [m=[*]string[*] [f=[*]string[*] ]
Figure 6-1 Syntax of the FILTER command
Consider the following points regarding this command:
The reset option clears all filter settings and shows the complete list of file systems.
The o= option filters entries that are shown according to the owning system.
The m= option filters entries that are shown according to the file systems mount point directory.
The option f= filters entries that are shown according to the file system name. Filter testing is done against the file system name that is changed to uppercase letters.
In the syntax of the FILTER command, string remains for a continuous string that is part of an option value.
Specifying an asterisk * at the beginning of a filter value means that the corresponding option value can start with an arbitrary number of characters before the string as specified.
Specifying a trailing asterisk * means that the corresponding option value can have an arbitrary number of characters following the string as specified.
If “filter” without options is used, you see a panel that shows the current filter options. You can modify the current settings as wanted.
 
Note: The panel that is displayed and used for this function is the original ISHELL that was used for filtering file entries in a directory list display. Therefore, do not use HELP on that panel.
In all cases, only the specified filter is changed. The other filter settings are not changed.
Only the first three filter specifications are used. If one of the specifications is invalid, you see that at least one filter parameter was invalid and ignored.
6.1.3 Use of the FILTER command
For more information about the sample tools see the corresponding files on the ITSO disk:
ftp://www.redbooks.ibm.com/redbooks/SG247035/
The following files are available on the disc:
rxishmt.pdf : This file describes the tool rxishmt.
rxishmt.zip : This file contains the REXX procedure that must be included in a REXX library within the SYSPROC or SYSEXEC library chain.
If the ISHELL is supported, you also can use this tool. It also shares all the ISPF variables and panels with the ISHELL.
If you want to change the mount table display, call the ISHELL and then, call RXISHMT again.
6.2 zFS zfsfsutl utility
In z/OS V2R1, the zFS utilities IOEAGFMT and IOEAGSLV were rewritten in Metal C and for the new super tool that is named IOEFSUTL. Consider the following points:
The utilities no longer can be used in UNIX via external links.
The utilities run as batch utilities only.
Use SYSPRINT as the output ddname.
IOEAGFMT and IOEAGSLV switch to another ASID.
IOEFSUTL is the strategic tool and must be used.
A sample of step JCL is shown in Example 6-1.
Example 6-1 Running utility IOEFSUTL in a batch program
//VERIFY EXEC PGM=IOEFSUTL,REGION=0M,
// PARM=('salvage -aggregate HERING.TEST.ZFS -verifyonly')
//SYSPRINT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
6.2.1 The zfsfsutl tool
The utility can work by incorporating the following modifications:
The zfsfsutl tool allows the use of IOEFSUTL from UNIX:
 – IOEFSUTL stays in its initial ASID when working.
 – IOEFSUTL must be set as an authorized program by adding it to “AUTHPGM NAMES” in the IKJTSOxx parmlib member for TSO.
The zfsfsutl tool performs the following tasks:
 – Uses a temporarily named pipe in the /tmp directory that is allocated with ddname SYSPRINT to be used via Address TSO.
 – A simple cp command is started via spawnp to read the data from the pipe and write it to STDOUT (/dev/fd1).
 – IOEFSUTL command is addressed to TSO via the following TSO call command:
call *(ioefsutl)
6.2.2 Use of the zfsfsutl utility
Example 6-2 shows to two samples of how to use the zfsfsut1 utility to display help information.
Example 6-2 Displaying help information by using zfsfsutl
$> zfsfsutl -help
IOEZ00559I zFS IOEFSUTL: Initializing z/OS zFS
Version 02.01.00 Service Level OA45948 - HZFS410.
Created on Fri Jan 30 15:41:22 EST 2015.
Address space asid x6C
IOEZ00760I No IOEZPRM DD specified. Parmlib search being used.
IOEZ00229I IOEFSUTL: Commands are:
apropos search by help text
converttov4 Convert aggregate to version 4
converttov5 Convert aggregate to version 5
format format an aggregate
help get help on commands
level display service level
salvage Salvage an aggregate
$> zfsfsutl salvage -help
IOEZ00559I zFS IOEFSUTL: Initializing z/OS zFS
Version 02.01.00 Service Level OA45948 - HZFS410.
Created on Fri Jan 30 15:41:22 EST 2015.
Address space asid x6C
IOEZ00760I No IOEZPRM DD specified. Parmlib search being used.
Usage: IOEFSUTL salvage -aggregate <name> [-verifyonly] [-level] [-help]
$>
Example 6-3 shows a sample of verifying a zFS aggregate.
Example 6-3 Verifying a zFS aggregate
$> zfsfsutl salvage HERING.TEST.ZFS -verifyonly
IOEZ00559I zFS IOEFSUTL: Initializing z/OS zFS
IOEZ00707I Log file size 13 8K blocks, verified correct
IOEZ00729I Verification of aggregate HERING.TEST.ZFS started
IOEZ00705I Formatted v4 aggregate size 2250 8K blocks, dataset size 2250 8K blocks
IOEZ00707I Log file size 13 8K blocks, verified correct
IOEZ00709I Bitmap size 1 8K blocks, verified correct
IOEZ00782I Salvage has verified 1 of 13 pages in the anode table.
IOEZ00782I Salvage has verified 2 of 13 pages in the anode table.
IOEZ00782I Salvage has verified 13 of 13 pages in the anode table.
IOEZ00782I Salvage has verified 8 of 8 directories in the directory tree.
IOEZ00782I Salvage has verified 2 of 2 pages in the partially-free page list.
IOEZ00782I Salvage has verified 1 of 1 pages in the totally free page stack.
IOEZ00722I Primary file system size 21 8K blocks, verified correct
IOEZ00739I Salvage processed 10 directory pages, 333 anodes, 18 indirect blocks
and 13 anode table pages.
IOEZ00730I Verification of aggregate HERING.TEST.ZFS completed, no errors found.
$>
Example 6-4 shows how to create and format a non-sms zFS aggregate and perform an initial format of 6000 cylinders.
Example 6-4 Formatting a non-SMS managed zFS initially to 6000 cylinders
$> zfsadm define hering.nonsms.zfs -volumes BH5ST3 BH5ST4 BH5ST5 BH5ST6
> -cylinders 500 500
IOEZ00248I VSAM linear dataset hering.nonsms.zfs successfully created.
$> tsocmd "alter 'hering.nonsms.zfs' extaddr"
alter 'hering.nonsms.zfs' extaddr
ENTRY HERING.NONSMS.ZFS ALTERED
$> zfsfsutl format hering.nonsms.zfs -size 540000 -grow 4500
> -version5
IOEZ00559I zFS IOEFSUTL: Initializing z/OS zFS
Version 02.02.00 Service Level OA47915 - HZFS420.
Created on Fri May 29 13:31:44 EDT 2015.
Address space asid x54
IOEZ00760I No IOEZPRM DD specified. Parmlib search being used.
IOEZ00004I Formatting to 8K block number 45000 for primary extent of HERING.NONSMS.ZFS.
IOEZ00005I Primary extent loaded successfully for HERING.NONSMS.ZFS.
IOEZ00323I Attempting to extend HERING.NONSMS.ZFS to 49500 8K blocks.
IOEZ00324I Formatting to 8K block number 49500 for secondary extents of HERING.NONSM ...
IOEZ00323I Attempting to extend HERING.NONSMS.ZFS to 54000 8K blocks.
IOEZ00324I Formatting to 8K block number 54000 for secondary extents of HERING.NONSM ...
IOEZ00323I Attempting to extend HERING.NONSMS.ZFS to 535500 8K blocks.
IOEZ00324I Formatting to 8K block number 535500 for secondary extents of HERING.NONS ...
IOEZ00323I Attempting to extend HERING.NONSMS.ZFS to 540000 8K blocks.
IOEZ00324I Formatting to 8K block number 540000 for secondary extents of HERING.NONS ...
IOEZ00077I HFS-compatibility aggregate HERING.NONSMS.ZFS has been successfully created
$>
Consider the following points regarding the formatting:
The IOEFSUTL format command always creates zFS aggregates with unique FIDs.
One cylinder of a zFS aggregate contains 90 8 K blocks.
4500 8 K blocks are 500 cylinders; 540000 8 K blocks are 6000 cylinders.
6000 cylinders of a zFS aggregate contain more than 4 GB of data.
6.3 ISPFSFTP utility
ISPFSFTP is a TSO utility that is used to run SFTP sessions in an interactive mode from the ISPF foreground.
It picks up the terminal emulation code page from ISPF and the user can enter the commands as though the session is set up with code page 01047.
It also supports reaching a target node via private and public key (preferred) or a password. Password support is available via OpenSSH SSH_ASKPASS environment variable if no keys are available.
It also contains UNIX shell scripts for copying files between MVS and UNIX with or without conversion to or from ASCII.
For more information, see the corresponding files on the ITSO disk.
The following files are available on the disc:
ispfsftp.pdf: This file describes the ispfsftptool.
ispfsftp.zip: This file contains all the files of the tool.
6.3.1 Use of the ISPFSFTP utility
This section describes some examples of the use of the ISPFSFTP utility.
Example 6-5 shows a sample of using ispfsftp when keys are used for authentication.
Example 6-5 Use of ispfsftp from ISPF by using keys
ispfsftp hering@wtsc70oe
Connected to wtsc70oe.
sftp>
cd /tmp
sftp> cd /tmp
sftp>
pwd
sftp> pwd
Remote working directory: /SC70/tmp
sftp>
quit
sftp> quit
ISFTP005I The sftp session ended normally.
***
Password support can be used, as shown in Example 6-6.
Example 6-6 Use of ispfsftp from ISPF by using its password support
ispfsftp hering@wtsc74oe
Connected to wtsc74oe.
sftp>
cd /tmp
sftp> cd /tmp
sftp>
pwd
sftp> pwd
Remote working directory: /SC74/tmp
sftp>
quit
sftp> quit
ISFTP005I The sftp session ended normally.
***
 
Example 6-7 shows a sample jobstep to start IBATSFTP in batch.
Example 6-7 Sample IBATSFTP JCL step for use of SFTP in batch mode
//IBATSFTP EXEC PGM=IKJEFT01,PARM=IBATSFTP
//SYSEXEC DD DSNAME=HERING.UNIX.REXX.EXEC,DISP=SHR
//SFTPDATA DD DATA,DLM=##
ispfsftp hering@wtsc70oe
cd /tmp
! pwd
!mvs2uss "'hering.test.file'" hering.test.file y y
put hering.test.file hering.test.file
! rm hering.test.file
quit
##
//SFTPENV DD DATA,DLM=##
PATH=/u/hering/bin:/usr/local/bin:/bin
_EDC_ADD_ERRNO2=1
##
//CODEPAGE DD DATA,DLM=##
ISPFSFTP_CP=01141 < Terminal Emulation CP for the job and job log
##
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*,LRECL=136,RECFM=VB
 
6.4 rxdowner utility
The rxdowner tool is provided with the zfstools package. It can be used to display owner-related information about z/OS UNIX file systems and zFS aggregates.
The syntax to run the tool is shown in Figure 6-2.
rxdowner -l|-d uss_direntry | -f file_system | -a zfs_aggrname
Figure 6-2 Syntax of command rxdowner
The following parameters are available:
uss_direntry
This parameter is a UNIX System Services file system directory entry.
file_system
This parameter is the name of a mounted z/OS UNIX file system.
zfs_aggrname
This parameter is the name of an active zFS aggregate.
As a result, the owner and owner-related information is displayed. Example 6-8 shows sample commands.
Example 6-8 Sample rxdowner commands
$> sudo /usr/sbin/mount -t zFS -o rwshare -f HERING.TEST.ZFS test
$> rxdowner -d test
 
MP Directory : /u/hering/test
File System : HERING.TEST.ZFS
PFS Type : ZFS
Local Sysname: SC70 - File System local-client=N
USS Owner : SC70 - File System read-only=N
zFS Owner : SC70 - Aggregate read-only=N, sysplex-aware=Y
 
$> sudo /usr/sbin/chmount -d SC65 test
$> zfsowner HERING.TEST.ZFS
zFS Owner : SC70 - Aggregate read-only=N, sysplex-aware=Y
$> rxdowner -d test
 
MP Directory : /u/hering/test
File System : HERING.TEST.ZFS
PFS Type : ZFS
Local Sysname: SC70 - File System local-client=N
USS Owner : SC65 - File System read-only=N
zFS Owner : SC70 - Aggregate read-only=N, sysplex-aware=Y
 
$>
For more information, see the corresponding files starting with string “zfstools” that are on the ITSO disk.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset