5 * Revision 1.2 1996/04/24 17:26:54 mclareni
6 * Extend the include file cleanup to dzebra, rz and tq, and also add
7 * dependencies in some cases.
9 * Revision 1.1.1.1 1996/03/06 10:47:24 mclareni
13 #include "zebra/pilot.h"
14 SUBROUTINE RZIN(IXDIV,LSUP,JBIAS,KEYU,ICYCLE,CHOPT)
16 ************************************************************************
18 * To read one record and create the corresponding data structure
19 * which will be pointed by (LSUP,JBIAS) in division IXDIV
21 * IXDIV Index of the division to receive the data structure
22 * IXDIV = 0 means division 2 of the primary store
24 * JBIAS JBIAS < 1 : LSUP is the supporting bank and JBIAS is the link
25 * bias specifying where the data structure has to be introduced
26 * into this bank, i.e. the data structure will be connected to
28 * JBIAS = 1 : LSUP is the supporting link, i.e. the data
29 * structure is connected to LSUP (top level data structure)
30 * JBIAS = 2 : Stand alone data structure, no connection.
31 * KEYU Keyword vector of the information to be read
32 * ICYCLE Cycle number of the key to be read
33 * ICYCLE > highest cycle number means read the highest cycle
34 * ICYCLE = 0 means read the lowest cycle
35 * CHOPT Character variable specifying the options selected.
39 * 'A' Read continuation of the previously read data structure
40 * with identifier KEYU,ICYCLE
41 * Given that option implies that the record was written with
42 * the same option by a call to RZOUT.
43 * 'C' Provide information about the cycle numbers
44 * associated with KEY.
45 * The total number of cycles and the cycle number
46 * identifiers of the 19 highest cycles are returned in
47 * IQUEST(50) and IQUEST(51..89) respectively
48 * 'D' Read the Data structure with the (key,cycle) pair
50 * 'N' Read the neighbouring. keys (i.e. those preceding and
52 * The key-vectors of the previous and next key are
53 * available respectively as IQUEST(31..35) and
54 * IQUEST(41..45), see below.
55 * 'R' Read data into existing bank at LSUP,JBIAS
56 * 'S' KEYU(1) contains the key serial number
58 * *LSUP* For JBIAS = 1 or 2, LSUP contains the entry address to the
60 * In any case IQUEST(11) returns the entry address
64 * Author : R.Brun DD/US/PD
67 * : 12.07.94 Return bank address when the input address is 0
68 * and the data was written with RZVOUT.
69 * Return IQUEST(11) correctly.
71 ************************************************************************
72 #include "zebra/rzcl.inc"
73 #include "zebra/rzclun.inc"
74 #include "zebra/rzk.inc"
77 DIMENSION LSUP(1),JBIAS(1),IQK(10),IQKS(10)
78 EQUIVALENCE (IOPTA,IQUEST(91)), (IOPTC,IQUEST(92))
79 +, (IOPTD,IQUEST(93)), (IOPTN,IQUEST(94)), (IOPTR,IQUEST(95))
82 *-----------------------------------------------------------------------
84 #include "zebra/q_jbyt.inc"
86 * Make sure input buffer exists
90 CALL MZBOOK(JQPDVS,LRIN,LTOP,-7,'RZIN',0,0,LREC+1,2,-1)
91 IQ(KQSP+LRIN-5)=IQ(KQSP+LTOP-5)
97 CALL RZINK(KEYU,ICYCLE,CHOPT)
98 IF(IQUEST(1).NE.0)GO TO 99
99 IF(IOPTC.NE.0.AND.IOPTD.EQ.0)GO TO 99
102 IF(IOPTS.NE.0)CALL UCOPY(IQUEST(20),IQKS,10)
104 IF(IOPTD.EQ.0)GO TO 99
105 CALL UCOPY(IQUEST(41),IQK,10)
111 IF(JBIAS(1).LE.0)LBANK=LQ(KQS+LSUP(1)+JBIAS(1))
112 IF(JBIAS(1).GT.0)LBANK=LSUP(1)
115 IFORM=JBYT(IQUEST(14),1,3)
118 * Read data structure into LBANK
120 CALL RZINS(IXDIV,LSUP,JBIAS,LBANK)
124 * Case when record has been written with RZVOUT
128 IF(NDATA.LE.IQ(KQS+LBANK-1))THEN
129 CALL RZREAD(IQ(KQS+LBANK+1),NDATA,1,IFORM)
135 CALL MZBOOK(IXDIV,LFROM,LSUP,JBIAS,'RZIN',0,0,NDATA,
137 CALL RZREAD(IQ(KQS+LFROM+1),NDATA,1,IFORM)
143 IF(IOPTN.NE.0)CALL UCOPY(IQK ,IQUEST(41),10)
144 IF(IOPTS.NE.0)CALL UCOPY(IQKS,IQUEST(20),10)