These routines require no knowledge of Zebra to use FATMEN. They may be used in conjunction with the other FATMEN routines, provided that the same Zebra store is used.
+--------------------------------------+
| CALL FMSTRT (LUNRZ,LUNFZ,CHFAT,IRC*) |
+--------------------------------------+
This routine initialises ZEBRA, unless it has already been initialised, and then the FATMEN system. The store /FAT/ in sequence FAT is used for this purpose. LUNRZ and LUNFZ are the logical units that will be used to access the database for reading and writing. If read-only access is required, LUNFZ should be set to 0. The database name CHFAT is a character string indicating the name of the database that is to be accessed. This field must be of the form '//CERN/experiment' for CERN experiments, '//DESY/experiment' for DESY experiments and so on.
On VM systems, the virtual card punch is used to communicate updates with the service machine that handles the database. As the punch may be in use for other purposes, both positive and negative values of LUNFZ are foreseen. If LUNFZ > 0, the punch will be used directly, which implies that it cannot be used by the calling programme for any other purpose. If LUNFZ < 0, a temporary file will be created and sent via SENDFILE to the server. The disk with most free space that is accessed in WRITE mode will be used for this purpose. If LUNFZ > 0, FATMEN will assume that it can write directly to the PUN device.
Example of using the FMSTRT routine
* Initialise FATMEN for group CPLEAR
CALL FMSTRT(1,2,'//CERN/CPLEAR',IRC)
IF(IRC.NE.0) PRINT *,'Return code ',IRC,' from FMSTRT'
+------------------------------------+
| CALL FMFILE (LUN,GENAM,CHOPT,IRC*) |
+------------------------------------+
This routine accesses the dataset referenced by GENAM on FORTRAN unit LUN.
Example of using the FMFILE routine
CALL FMFILE(11,
+'//CERN/CPLEAR/REAMS/M2T3/RAWD/NONE/NONE/R08288',' ',IRC)
IF(IRC.NE.0) PRINT *,'Return code ',IRC,' from FMFILE'
+------------------------------------+
| CALL FMFEND (LUN,GENAM,CHOPT,IRC*) |
+------------------------------------+
This routine deaccesses the dataset referenced by GENAM on FORTRAN unit LUN.
Example of using the FMFEND routine
CALL FMFEND(11,
+'//CERN/CPLEAR/REAMS/M2T3/RAWD/NONE/NONE/R08288',' ',IRC)
IF(IRC.NE.0) PRINT *,'Return code ',IRC,' from FMFEND'
+------------------------------------------------------------------------------------------------------------+
|CALL FMADDT (GENAM,VSN,VID,FSEQ,DSN,FFORM,CPLEV,HOST,RECFM,LRECL,LBLOCK, FSIZE,MEDIA,COMM,IVECT,CHOPT,IRC*) |
+------------------------------------------------------------------------------------------------------------+
This routine adds an entry to the FATMEN catalogue.
Example of using the FMADDT routine
CALL FMADDT('//CERN/CNDIV/JAMIE/TEST','I29021','I29021',1
+'FATMEN.CARDS','AS',0,'CERNVM','FB',20,800,1,2,
+'Backup of source to FATMEN',IVECT,' ',IRC)
IF(IRC.NE.0) PRINT *,'Return code ',IRC,' from FMADDT'
+-----------------------------------------------------------------------------------------+
|CALL FMADDD (GENAM,DSN,FFORM,CPLEV,HOST,RECFM,LRECL,LBLOCK, FSIZE,COMM,IVECT,CHOPT,IRC*) |
+-----------------------------------------------------------------------------------------+
This routine adds an entry to the FATMEN catalogue.
Example of using the FMADDD routine
CALL FMADDD('//CERN/CNDIV/JAMIE/VAX2',
+'DISK$CERN:[JAMIE.ZFTP]FXFILE.DAT',
+'FX',0,'VXCERN','F',8100,8100,10,
+'Test Zebra exchange format file for ZFTP',IVECT,' ',IRC)
IF(IRC.NE.0) PRINT *,'Return code ',IRC,' from FMADDD'
+--------------------------------------+
| CALL FMPEEK (GENAM,IVECT,CHOPT,IRC*) |
+--------------------------------------+
This routine returns in the vector IVECT the contents of the FATMEN bank associated with the specified generic name.
Example of using the FMPEEK routine
CALL FMPEEK('//CERN/CNDIV/JAMIE/VAX2',IVECT,'N',IRC)
IF(IRC.NE.0) PRINT *,'Return code ',IRC,' from FMPEEK'
+--------------------------------------+
| CALL FMPOKE (GENAM,IVECT,CHOPT,IRC*) |
+--------------------------------------+
This routine copies the vector IVECT into the FATMEN bank reserved for manipulation with FMADDD/ FMADDT, FMPEEK/ FMPOKE.
Example of using the FMPOKE routine
CALL FMPOKE('//CERN/CNDIV/JAMIE/VAX2',IVECT,'M',IRC)
IF(IRC.NE.0) PRINT *,'Return code ',IRC,' from FMPOKE'