next up previous contents index
Next: FZINXT - reset Up: User specifications for Previous: FZIN - read

FZIN - read one data-structure by segments

It may be convenient to represent an event by several separate d/ss on the file. This permits in an easy way to selectively read only a particular part of every event. This method has one draw-back: if there are reference links pointing from one part to an other part of the event, where both parts are residing simultaneously in memory, and if the two parts are written out by two separate calls to FZOUT, the cross links will be lost on read-back.

To amend for this, the following scheme has been implemented: when a data-structure is transferred from several divisions to the FZ file, the data are 'segmented', i.e. a table is included into the pilot information, indicating the divisions from which the different data segments originated, together with their sizes. On read-back the user can either skip particular data-segments or he can direct data-segments into particular divisions individually.

To do so, three calls to FZIN are necessary:

  1. call with the S option to read the pilot;
  2. call with the T option to ready the segment table in /FZCSEG/;
  3. call with the D option to read the d/s with distribution.

The second call will present the 'segment table' to the caller in the labelled Common Block

  COMMON /FZCSEG/ NQSEG,IQSEGH(2,20),IQSEGD(22)    where:

           NQSEG  = number of segments contained in the pending d/s
                             if NQSEG = 0:  d/s is not segmented
      IQSEGH(1,J) = char 1-4
      IQSEGH(2,J) =      5-8  of the Hollerith name of the division
                              from which segment J derives
       IQSEGD(J)    index of division selected for segment J

      Note: IQSEGD(21+22) are working elements of the system and,
             like NQSEG, must not be modified by the user.
To direct segment J into a given division one should set IQSEGD(J) to the index of that division (or merely to the division number; the store is selected by the parameter IXDIV to FZIN). To cause this segment to be ignored IQSEGD(J) = -1 should be set. IQSEGD(J) containing zero directs this segment into the 'default' division selected by the parameter IXDIV to FZIN. (The vector IQSEGD is preset to zero by FZIN.)

Since /FZCSEG/ is used for segment handling with all streams, both input and output, there must not occur some other call to FZ for any stream between the second and the third call. Also, having called with the T option does not oblige the user to follow it by a call with the D option; he may call with the A or even the S option, in which cases the segment table is simply ignored.



next up previous contents index
Next: FZINXT - reset Up: User specifications for Previous: FZIN - read


Janne Saarela
Mon May 15 08:34:47 METDST 1995