PUNIT Utility

SYSTEM/PUNIT is a program that searches for hardware units with a set of specified characteristics. You can specify the reported attributes, however, if you do not make a specification, PUNIT reports

  • KINDNAME

  • WRITEENABLED

  • UNITNO

  • SERIAL

  • REELNO

  • SCRATCH

  • NAME

PUNIT Request

The PUNIT request syntax is explained as follows:

Syntax

          ┌◄───────────────────────────┐
── PUNIT ─┴─┬────────────────────────┬─┴────────────────────────────────►
            ├─<SHOW specification>───┤
            ├─<SELECT specification>─┤
            └─<SORT specification>───┘
►─┬─────────────────────────────┬──────────────────────────────────────┤
  └─ : ──<output specification>─┘

By default, the utility selects all units. Specify SELECT ACQUIRED = TRUE to select only those units that are acquired in the partition.

Examples

Example 1

The following is the default output.

U $SYSTEM/PUNIT
#RUNNING 8471
#?
PUNIT Version 55.170.0003 Tuesday, April 3, 2012 18:30:35
 
KindName WriteEnabled UnitNo Serial ReelNo Scratch Name
SC       FALSE        1                    TRUE
SC       FALSE        2                    TRUE
MT       TRUE         22     E11382        TRUE
MT       TRUE         23     E11384        TRUE
MT       TRUE         200    KK0008  1     FALSE   TAPEA
MT       TRUE         201    KK0007  1     FALSE   TAPEA
PK       TRUE         500    017001  1     FALSE   OLDSYSTEM
PK       TRUE         501    367083  1     FALSE   AVAIL501
PK       TRUE         502    017003  1     FALSE   ICE
PK       TRUE         503    017004  1     FALSE   OLDAPT
PK       TRUE         646    000510  1     FALSE   DISK
PK       TRUE         647    000860  2     FALSE   DISK 
MT       FALSE        666                  FALSE
DK       TRUE         3000   003000  1     FALSE   MEMDISK
MT       TRUE         9021                 FALSE
MT       TRUE         9026                 FALSE
MT       TRUE         9027   T00015  1     FALSE   ECCSGINHOUSE 

Example 2

The following example selects tape units and shows some selected attributes.

U $SYSTEM/PUNIT 
SELECT KINDNAME=MT SHOW KINDNAME, WRITEENABLED,             
UNITNO, DENSITYNAME, READY, NAME, SCRATCH                                    
#RUNNING 8519                                                                
#?                                                                          
PUNIT Version 55.170.0003 Tuesday, April 3, 2012 18:39:37  
Kindname  WriteEnabled  UnitNo  DensityName  Ready  Name          Scratch
MT        TRUE          22      ST9840       TRUE                 TRUE
MT        TRUE          23      ST9840       TRUE                 TRUE
MT        TRUE          200     DLT160       TRUE   TAPEA         FALSE
MT        TRUE          201     DLT160       TRUE   TAPEA         FALSE
MT        FALSE         666                  FALSE                FALSE
MT        TRUE          9021    LTO3         FALSE                FALSE
MT        TRUE          9026    LTO3         FALSE                FALSE
MT        TRUE          9027    LTO3         FALSE  ECCSGINHOUSE  FALSE

Example 3

The following example selects pack units and shows the family structure, user count, and available sectors, sorting the output by a descending number of available sectors.

U $SYSTEM/PUNIT 
SELECT KINDNAME=PK SHOW UNITNO, NAME, FAMILYINDEX  
BASEUNIT, USERCOUNT, AVAILSECTS SORT DESCENDING AVAILSECTS         
#RUNNING 8537    
#?     
PUNIT Version 55.170.0003 Tuesday, April 3, 2012 18:56:25   
UnitNo  Name          Familyindex  Baseunit  UserCount  AvailSects
501     AVAIL501      1            501       0          59648201    
500     OLDSYSTEM     1            500       0          57666411
503     OLDAPT        1            503       0          54848537
647     DISK          2            646       268        15409386
646     DISK          1            646       406        14678616
502     ICE           1            502       0          1998081  
#ET=0.4 PT=0.4 IO=0.0

Example 4

The following example selects disk and pack units with unit numbers 24 through 501 or greater than or equal to 3,000, and reports selected attributes to the TASKSTRING.

BEGIN JOB JOB/PUNIT;
STRING PARAM;
TASK PUNIT;
STRING SELECTION, OUTPUT;
SELECTION := "KIND=1 OR KIND=17 AND " &
"UNITNO >= 24 AND UNITNO <= 501 OR UNITNO>=3000 ";
PARAM :="SELECT " & SELECTION & ":TASKSTRING(" & OUTPUT & ")";            
RUN SYSTEM/PUNIT (PARAM) [PUNIT];
IF NOT PUNIT(SW1) THEN
DISPLAY (PUNIT (TASKSTRING));
END JOB.
         
st
#RUNNING 6462
#JOB 6463 IN QUEUE 0
#6463\6464 EOT (SITEADMIN) *SYSTEM/PUNIT
#6463 DISPLAY:PK,TRUE,500,TRUE,59652229,OLDSYSTEM;PK,TRUE,
501,TRUE,59652229,AVAIL501;DK,TRUE,3000,TRUE,2097152,MEMDISK.            
#6463\6463 EOJ (SITEADMIN) JOB JOB/PUNIT