next up previous contents index
Next: Routines to allocate Up: The FATMEN Fortran Previous: Routines to select

User exits

See also the description of user exits for the FMQVOL and FMALLO routines.

Print user words and comment

CALL FMUPRT (GENAM,LBANK,KEYS,IUSER,COMM,IRC*)
 

GENAM
Character variable specifying the generic name of the file.
LBANK
Integer variable containing the address of the corresponding bank.
KEYS
Integer array of length 10 containing the keys vector associated with the specified generic name.
IUSER
Integer array of length 10 containing the user words.
COMM
Character variable of length 80 in which the comment is passed.
IRC
Integer variable in which the return code is returned.

This routine is called from FMSHOW to print the user words and comment in the required format. A dummy routine is provided in the standard library. This routine should be provided if the user words should be interpreted in a special way, e.g. as packed 6 bit integers etc.

Example of a user FMUPRT routine

      SUBROUTINE FMUPRT(GENAM,LBANK,KEYS,JUSER,COMM,IRC)
      DIMENSION KEYS(10),JUSER(10),IUSER(10),USER(10)
      EQUIVALENCE (USER(1),IUSER(1))
      CHARACTER*(*) GENAM,COMM
      LCOMM = LENOCC(COMM)
      PRINT *,COMM(1:LCOMM)
      CALL UCOPY(JUSER,IUSER,10)
*     User words are real
      PRINT *,USER
      END

User selection

CALL FMUSEL (GENAM,LBANK,KEYS,IRC*)

GENAM
Character variable specifying the generic name of the file.
LBANK
Integer variable containing the address of the corresponding bank.
KEYS
Integer array of length 10 containing the keys vector associated with the specified generic name.
IRC
Integer variable in which the return code is returned.

This routine allows the user to accept or reject FATMEN entries during the default selection procedure. The FATMEN software builds a list of candidates that match the selection criteria that are in force. For each candidate the FMUSEL routine is called in turn. If a non-zero return code is found, the corresponding entry is removed from the list of candidates.

Example of a user FMUSEL routine

      SUBROUTINE FMUSEL(GENAM,LBANK,KEYS,IRC)
      DIMENSION KEYS(10)
      CHARACTER*(*) GENAM
*
*     Example user selection routine to reject any
*     entries with a copy level indicating Cray data representation
*
      IF(KEYS(MKCLFA).EQ.4) THEN
         IRC = -1
      ELSE
         IRC = 0
      ENDIF
      END


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