The package is organised as part of a library, from which at load time unsatisfied externals are searched and loaded. In this way only those subroutines actually used will be loaded, therefore minimising the space occupied in memory by the code. Unfortunately, given the way Fortran works and although the package is structured as much as possible in the sense of selective loading, some unused subroutines will usually be present.
HBOOK uses the ZEBRA [bib-ZEBRA] data structure management package to manage its memory (see chapter [more info]). The working space of HBOOK is an array, allocated to the labelled common /PAWC/. In ZEBRA terms this is a ZEBRA store. It is thus necessary to reserve as many locations as required with a declarative statement in the main program. The actual length of the common is defined most safely via a PARAMETER statement, as shown below:
##-------------------------------+ ## PARAMETER (NWPAWC = 50000) | ##-COMMON-/PAWC/-HMEMOR(NWPAWC)--+
Furthermore HBOOK must be informed of the storage limit via a call to HLIMIT. This is discussed in detail in section [more info]. In the case above this would correspond to
+--------------------+ |CALL HLIMIT(NWPAWC) | +--------------------+At execution time, when histograms are booked, they are accomodated in common /PAWC/ in booking order, up to the maximum size available. Note that a call to HLIMIT will automatically initialise the ZEBRA system via a call to the routine MZEBRA. If ZEBRA has already been initialised, ( HLIMIT should be called with a negative number indicating the number of words required, e.g.
+----------------------+ | CALL HLIMIT(-NWPAWC) | +----------------------+