next up previous contents index
Next: Utility routines Up: The FATMEN Fortran Previous: Add additional media

Routines to tailor FATMEN selection

By default, FATMEN makes no check on location code or copy level when accessing a dataset or listing a catalogue entry. When attempting to access a dataset, FATMEN searches for a copy first on disk, then 3480 cartridge, and so on. The following routines may be used to modify the selection procedure.

If a call to FMSETL or FMSETC is made, only entries with a location code or copy level that match one of those specified will be accessible (unless the key serial number is given explicitly) or visible via a call to FMLS. Routine FMSETM permits not only the range of medium types to be set but also the order. For example, a call to FMSETM with the following values will limit the selection to medium types 3, 5, 1 and 2, in that order.

      NMTP = 4
      MTP(1) = 3
      MTP(2) = 5
      MTP(3) = 1
      MTP(4) = 2

Alternatively, routine FMSETK can be used. This allows the user to declare a keys matrix and character option which will be used in all future file selections. That is, it overrides both the FATMEN default selection and that set by the routines FMSETC, FMSETL and FMSETM.

The difference between these three approaches is explained below. With the default FATMEN selection, no check is made on copy level or location code. FATMEN takes in turn media types 1 to 4 and looks for an accessible dataset. The first one found is taken, with the proviso that robotically mounted tapes are given preference over manually mounted tapes.

The FMSETC, FMSETL and FMSETM routines allow the user to specify allowed values for the copy level and location code, and the order in which the different media types are to be processed. This allows media types that are not in the default selection to be processed, and the order to be changed. However, the user is unable to indicate that, for example, a location code or 31 is preferable to one of 21, within a given media type.

The FMSETK routine provides the user with more control. One might wish to set the order to be native mode copy on disk, native mode copy on 3480 robotically mounted cartridge, exchange mode copy on disk, exchange mode copy on 3480 cartridge.

Declare location codes to FATMEN

CALL FMSETL (LOC,NLOC,IRC*)
 

LOC
Array of length NLOC containing a list of location codes to be used in FATMEN selection of an entry.
NLOC
The number of location codes declared, maximum 99
IRC
Integer variable in which the return code is returned.

Load location code definitions from a file

CALL FMLCOD (LUNLOC,CHFILE,CHOPT,IRC*)
   

LUN
Integer variable or constant specifying the Fortran logical unit which should be used to read the file CHFILE
CHFILE
Character variable specifying the file containing the location code definitions
CHOPT
Character variable specifying the required options
IRC
Integer variable in which the return code is passed
This routine loads the location code definitions from the specified file. By default, FATMEN will load a file FATMEN.LOCCODES from the server directory at initialisation time.

Example of a location code definition file

         1=Cern Vault  :   For CERNVM Shift Cray VXCERN etc                                                                         
         2=Cern Vault  :                                                                                                            
         9=Cern Vault  :   Hidden or Obsolete data                                                                                  
        11=VXOPON      :   OPAL Online Vax cluster                                                                                  
        12=Online      :   OPAL (apollo) online facilities                                                                          
        21=VXOPOF      :   OPAL Offline cluster                                                                                     
        31=SHIFT       :   SHIFT disk and archive storage                                                                           
     16040=U-Vic       :   'obsolete' cartridges                                                                                    
     16041=U-Vic       :   Active data accessible at U-Vic.                                                                         
     49201=Bonn        :   Data accessible at Bonn                                                                                  
     49202=Bonn        :   Data in Transit                                                                                          
     49203=Bonn        :   Data in CERN Vault                                                                                       
     49401=DESY        :   Data accessible at DESY/Hamburg                                                                          
     49402=DESY        :   Data in Transit                                                                                          
     49403=DESY        :   Data in CERN Vault                                                                                       
     49601=Heidelburg  :   Data accessible at Heidelburg                                                                            
     49602=Heidelburg  :   Data in Transit                                                                                          
     49603=Heidelburg  :   Data in CERN Vault                                                                                       
     49701=Freiburg    :   Data accessible at Freiburg                                                                              
     49702=Freiburg    :   Data in Transit                                                                                          
     49703=Freiburg    :   Data in CERN Vault                                                                                       
     16042=U-Vic       :   Data in transit                                                                                          
     16043=U-Vic       :   Data at CERN in PC-VAULT                                                                                 
     16049=U-Vic       :   Hidden or obsolete data                                                                                  
     33101=Saclay      :   Active cartridges                                                                                        
     33901=Saclay      :   'obsolete' cartridges                                                                                    
     44501=UKACRL      :   Active data accessible at RAL                                                                            
     44502=UKACRL      :   Data in transit                                                                                          
     44503=UKACRL      :   Data at CERN in PC-VAULT                                                                                 
     44509=UKACRL      :   Hidden or obsolete data                                                                                  
     44901=UKACRL      :   Inaccessible / archived data                                                                             
     97281=Weizmann    :   Active cartridges                                                                                        
     97282=Weizmann    :   Data in transit                                                                                          
     97283=Weizmann    :   Data at CERN in PC-VAULT                                                                                 
     97289=Weizmann    :   Hidden or obsolete data

Obtain location code corresponding to a node

CALL FMNTOL (CHNODE,LOCCOD*,CHOPT,IRC*)

CHNODE
Character variable specifying the name of the node for which the corresponding location code should be return
LOCCOD
Integer variable in which the location code corresponding to CHNODE is returned.
CHOPT
Character variable specifying the options required.
(default) - perform case insensitive match
C
respect case
IRC
Integer variable in which the return code is returned.
0
Success
1
File containing location codes and node names not found
2
File containing location codes could not be opened
3
No location code found for CHNODE

Obtain list of node names corresponding to a location

CALL FMLTON (LOCCOD,MAXNOD,CHNODE*,NNODES*,CHOPT,IRC*)

LOCCOD
Integer variable containing the location code for which the corresponding node names should be returned.
MAXNOD
Integer constant specifying the maximum number of node names that the calling procedure can accept
CHNODE
Character array in which the node names corresponding to LOCCOD are returned.
NNODES
Integer variable in which the number of nodes corresponding to LOCCOD are returned.
NNODES
Integer variable in which the number of nodes corresponding to LOCCOD is returned. Only MIN(MAXNOD,NNODES) elements of CHNODE contain useful data.
IRC
Integer return code

Declare media types to FATMEN

CALL FMSETM (MTP,NMTP,IRC*)
 

MTP
Array of length NMTP containing a list of media types to be used in FATMEN selection of an entry.
NMTP
The number of media types declared, maximum 99
IRC
Integer variable in which the return code is returned.

Declare copy levels to FATMEN

CALL FMSETC (CPL,NCPL,IRC*)
 

CPL
Array of length NCPL containing a list of copy levels to be used in FATMEN selection of an entry.
NCPL
The number of copy levels declared, maximum 99
IRC
Integer variable in which the return code is returned.

Declare selection matrix and options to FATMEN

CALL FMSETK (KEYM,NK,CHOPT,IRC*)
   

KEYM
Matrix of size (LKEYFA,NK) containing an ordered list of key vectors to be used in FATMEN selection of an entry.
NK
The number of copy levels declared, maximum 99
CHOPT
The options to be used when selecting a dataset, as defined by the routine FMSELM.
IRC
Integer variable in which the return code is returned.

See the description of the FMSELM routine for more information on how the key matrix is used in dataset selection.

Declare media types to FATMEN

CALL FMMEDT (IRC*)

IRC
Integer variable in which the return code is returned.

FMMEDT is automatically called by the routine FMINIT upon initialisation. It looks for a file fatmen.medtypes in the server directory and reads this file to define media types.

N.B.

The file fatmen.medtypes consists of 7 blank separated fields, which are listed below.

media-type
Integer code for the medium. Zero is not a valid media-type. Negative values may be specified, in which the corresponding positive media-type is defined according to the attributes following, but candidates with this media-type will not be selected.
device-type
Character field corresponding to the physical device type (TMS model).
generic-type
Character field corresponding to the generic device type (TMS sort).
density
Character field specifying the default density.
capacity
Integer field specifying the maximum capacity of the medium in MB.
mount-type
Character (M or R) specifying the default mount type (Manual or Robotic).
label-type
Character field specfiying the default label type.

An example of a fatmen.medtypes file is given below.

Example of fatmen.medtypes file

*
* Define and select following media types
*
2 3480 CT1 38K 200 M SL
3 3420 TAPE 6250 150 M SL
4 8200 8MM 43200 2300 M SL
5 8500 8MM 86400 5000 M SL
*
* Define but DO NOT select
*
-6 DAT60 DAT DDSC 2000 M SL



next up previous contents index
Next: Utility routines Up: The FATMEN Fortran Previous: Add additional media


Janne Saarela
Mon May 15 09:59:59 METDST 1995