The FATMEN shell may be tailored by
KUIP macros consist of files containing FATMEN or KUIP system commands. A trivial example might contain commands such as
Example macro CDOPAL KUMAC
MESS 'Initialise FATMEN for OPAL' INIT OPAL MESS 'Change directory to PROD/PASS3/FILT/P1R1039L044' CD PROD/PASS3/FILT/P1R1039L044 MESS 'Count the number of files in this directory' FC
The output of the above macro is given below:
Result of executing CDOPAL KUMAC
FAT3@cernvm;
fm
Type INIT to initialise FATMEN>
exec cdopal
FMINIT. Initialisation of FATMEN package
FATMEN 1.05 900312 13.00 CERN PROGRAM LIBRARY FATMEN=Q123
This version created on 900312 at 1600
Linked to FMOPAL mode Z
FAOPEN : for FARZ on Unit 1 opened File CERN FATRZ
Current Working Directory = //CERN/OPAL
Current Working Directory = //CERN/OPAL/PROD/PASS3/FILT/P1R1039L044
Files: 5
FM>
Further details can be found in the KUIP Long writeup<BIBREF REFID=KUIP>.
Extra commands maybe added to the FATMEN shell by
For example, we could add the command XLS which would
CDF file for XLS command
>COMMAND XLS
>GUIDENCE
Use the XLS command to perform an extended LS command.
Syntax: XLS path options
Options:
A - list all attributes, except DZSHOW (option Z).
C - display comment field associated with file
F - list file attributes, such as start/end record and block
G - list the full generic name of each file
K - list keys associated with this file (copy level, media type, location)
L - list logical attributes, such as FATMEN file format
(ZEBRA exchange etc.)
M - list media attributes, such as VSN, VID, file sequence number for tape
files, host type and operating system for disk files.
N - lists dataset name on disk/tape of this file
O - list owner, node and job of creator etc.
P - list physical attributes, such as record format etc.
S - lists security details of this file (protection)
T - list date and time of creation, last access etc.
U - list user words.
Z - dump ZEBRA bank with DZSHOW.
>ACTION FMXLSC
>PARAMETERS
+
FILE 'File or pathname' C D='CURRENT_DIRECTORY'
OPTN 'Options' C D=' '
Our action routine, FMXLSC, might look like the following:
Example action routine, FMXLSC
SUBROUTINE FMXLSC
PARAMETER (MAXFIL=10000)
PARAMETER (LKEYFA=10)
DIMENSION KEYS(LKEYFA,MAXFIL)
CHARACTER*255 FILES(MAXFIL)
CHARACTER*255 PATH
CHARACTER*25 CHOPT
*
CALL KUGETC(PATH,LPATH)
CALL KUGETC(CHOPT,LCHOPT)
*
CALL FMLIST(PATH(1:LPATH),FILES,KEYS,NFOUND,MAXFIL,IRC)
*
DO 10 I=1,NFOUND
10 CALL FMSHOW(FILES(I),LBANK,CHOPT(1:LCHOPT),IRC)
*
END