The RXSMS sub-routine is invoked in REXX exec to retrieve information from the SMS sub-system or from a volume's VTOC.
RXSMS is written in assembler. It is a free program, available in source-code and load-module format in the freeware section of this Web site.
RXSMS can only be called from a REXX exec. It is invoked by the SHOWDASD exec available on this Web site.
CALL RXSMS function, stemname <search argument> or rc=RXSMS(function,stemname<,search argument>)
function This argument is a 3-character function code which indicates the type of information that is to be retrieved from SMS. The following values are supported: AVL All volumes in current configuration SGL List of all Storage Groups SGV Volser list for a given Storage Group VSG Storage Group for a given volser VOL Volume definition for a given volser DCL List of all Data Classes SCL List of all Storage Classes MCL List of all Management Classes LSP LSPACE stemname the stem of the family of variables which are set to the returned data. search arg is the volser or SG name for which data is to be retrieved from SMS. This argument is mandatory for the SGV, VSG and VOL functions and must be omitted for all other functions.
Retrieve a list of all of the Data Classes currently defined in the SMS configuration into the "dc." variable.
CALL RXSMS 'DCL','dc.' IF rc=0 THEN DO i=1 TO dc.0 SAY i 'DC =' dc.i END
Retrieve the Storage Group to which the VOL123 volume belongs into the sg.1 variable:
IF RXSMS('VSG','sg.','VOL123') THEN SAY 'volume VOL123 belongs to SG =' sg.1
Retrieve all the volumes that belong to the "SGPROD2" Storage Group into the "vol." variables:
IF RXSMS('SGV','vol.','SGPROD2') = 0 THEN DO i=1 TO vol.0 SAY i 'VOL:' vol.i END
Another example is the SHOWDASD exec which is available on this Web site and contains multiple CALL RXSMS instructions in various formats.
RXSMS returns three types of data: 1. a return-code in the RC variable; see "return-codes" below. 2. the number of objects returned in the stem.0 variable. For example, if CALL RXSMS 'SGL','sg.' is issued, the number of Storage Groups is returned in the sg.0 variable. 3. the objects requested are returned in var.1 through var.n, where n=var.0 The format of the data returned depends on the type of object it represents. The following table shows the format of the data for each of the supported function codes: AVL Volume record (12 words) SGL Storage Group record (10 words) SGV Volume record (12 words) VSG Storage Group record (10 words) VOL Volume record (12 words) DCL Data Class name (1 to 30 characters) SCL Storage Class name (1 to 30 characters) MCL Management Class name (1 to 30 characters) LSPACE Data returned by the LSPACE macro The Volume record is made up of 12 words (see example below). 1 volume serial number 2 name of storage group 3 user-ID of last updater 4 date of last update 5 time of last update 6 track capacity (bytes) 7 ucb address (or zero if the device is off-line) 8 total space (MB) 9 free space (MB) 10 largest free extent (MB) 11 flags (VLDFLAGS) 12 status in storage group (VLDSGST) Example of a volume record, as returned from RXSMS: PRIM10 SG2 JIM 1997/03/27 16:03 56664 F49F00 2042 179 67 00 01 The Storage Group record is made up of 10 words. 1 name of storage group 2 user-ID of last updater 3 date of last update 4 time of last update 5 flags (SDGFLAGS) 6 SG type (0=pool, 1=VIO) 7 VIO max size (MB) 8 VIO unit type 9 high threshold (0-99%) 10 low threshold (0-99%) 11 description (max 30 characters) Example of a storage group record, as returned from RXSMS: SG2 JIM 1996/06/03 20:57 10 0 0 ? 99 0 DEFAULT STORAGE GROUP The LSPACE record is made up of 19 words. 1 volume serial 2 LSPACE return area status byte 3 LSPACE volume status byte 4 Number of free extents 5 total free cylinders 6 total additional free tracks 7 number of cylinders in largest free extent 8 number of additional tracks in largest free extent 9 format-0 count 10 free VIR count 11 fragmentation index 12 VTOC index (DS4VTOCI) 13 Volume's SMS attributes (DS4SMSFG) 14 available DSCBs (DS4DSREC) 15 Number of Cylinders (DS4DEVSZ) 16 Tracks per Cylinders (DS4DEVSZ) 17 Track Size (DS4DEVTK) 18 DSCBs per track (DS4DEVDT) 19 Directory Blocks per track (DS4DEVDB) Example of a LSPACE record received from RXSMS: SYSCAT E0 C0 2 0 4 0 2 235 14 1000 81 00 262 100 15 47968 53 46
The RXSMS function returns a return-code that indicates whether information was successfully retrieved. The return-code is stored into the RC special variable.
The following RXSMS return-code values are possible: 0 Data was retrieved into the specified stem variable. var.0 is set to the number of objects retrieved. 4 No data was retrieved; var.0 is set to 0. nnnn Error retrieving the data, nnnn is the SSSA reason code (see IEFSSSA macro). 1nn UCBSCAN macro failed with R15=nn (LSPACE only) 2nn LSPACE macro failed with R15=nn (LSPACE only) Error in Argument List 12 Invalid Service requested.
Search key-words: mvs os/390 os390 z/os zOS TSO ISPF CBT software application dialog DASD disk VTOC display volser list vol ser volume online on-line unit addr address private public storage free space REXX calling ucbscan UCB ISMF DVTOC SMS info smsinfo