1 /* ekucei.f -- translated by f2c (version 19980913).
2    You must link the resulting object file with the libraries:
3 	-lf2c -lm   (in that order)
4 */
5 
6 #include "f2c.h"
7 
8 /* $Procedure     EKUCEI ( EK, update integer column entry ) */
ekucei_(integer * handle,integer * segno,integer * recno,char * column,integer * nvals,integer * ivals,logical * isnull,ftnlen column_len)9 /* Subroutine */ int ekucei_(integer *handle, integer *segno, integer *recno,
10 	char *column, integer *nvals, integer *ivals, logical *isnull, ftnlen
11 	column_len)
12 {
13     extern /* Subroutine */ int zzekcdsc_(integer *, integer *, char *,
14 	    integer *, ftnlen), zzekrbck_(char *, integer *, integer *,
15 	    integer *, integer *, ftnlen), zzeksdsc_(integer *, integer *,
16 	    integer *), zzektrdp_(integer *, integer *, integer *, integer *),
17 	     chkin_(char *, ftnlen), errch_(char *, char *, ftnlen, ftnlen);
18     integer class__, dtype;
19     extern logical failed_(void);
20     integer coldsc[11], segdsc[24];
21     logical isshad;
22     extern /* Subroutine */ int errhan_(char *, integer *, ftnlen);
23     integer recptr;
24     extern /* Subroutine */ int setmsg_(char *, ftnlen), errint_(char *,
25 	    integer *, ftnlen), sigerr_(char *, ftnlen), chkout_(char *,
26 	    ftnlen), ekshdw_(integer *, logical *), zzekue01_(integer *,
27 	    integer *, integer *, integer *, integer *, logical *), zzekue04_(
28 	    integer *, integer *, integer *, integer *, integer *, integer *,
29 	    logical *);
30 
31 /* $ Abstract */
32 
33 /*     Update an integer column entry in a specified EK record. */
34 
35 /* $ Disclaimer */
36 
37 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
38 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
39 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
40 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
41 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
42 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
43 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
44 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
45 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
46 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
47 
48 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
49 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
50 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
51 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
52 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
53 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
54 
55 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
56 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
57 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
58 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
59 
60 /* $ Required_Reading */
61 
62 /*     EK */
63 
64 /* $ Keywords */
65 
66 /*     EK */
67 /*     FILES */
68 /*     UTILITY */
69 
70 /* $ Declarations */
71 /* $ Disclaimer */
72 
73 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
74 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
75 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
76 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
77 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
78 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
79 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
80 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
81 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
82 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
83 
84 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
85 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
86 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
87 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
88 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
89 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
90 
91 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
92 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
93 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
94 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
95 
96 
97 /*     Include Section:  EK Column Descriptor Parameters */
98 
99 /*        ekcoldsc.inc Version 6    23-AUG-1995 (NJB) */
100 
101 
102 /*     Note:  The column descriptor size parameter CDSCSZ  is */
103 /*     declared separately in the include section CDSIZE$INC.FOR. */
104 
105 /*     Offset of column descriptors, relative to start of segment */
106 /*     integer address range.  This number, when added to the last */
107 /*     integer address preceding the segment, yields the DAS integer */
108 /*     base address of the first column descriptor.  Currently, this */
109 /*     offset is exactly the size of a segment descriptor.  The */
110 /*     parameter SDSCSZ, which defines the size of a segment descriptor, */
111 /*     is declared in the include file eksegdsc.inc. */
112 
113 
114 /*     Size of column descriptor */
115 
116 
117 /*     Indices of various pieces of column descriptors: */
118 
119 
120 /*     CLSIDX is the index of the column's class code.  (We use the */
121 /*     word `class' to distinguish this item from the column's data */
122 /*     type.) */
123 
124 
125 /*     TYPIDX is the index of the column's data type code (CHR, INT, DP, */
126 /*     or TIME).  The type is actually implied by the class, but it */
127 /*     will frequently be convenient to look up the type directly. */
128 
129 
130 
131 /*     LENIDX is the index of the column's string length value, if the */
132 /*     column has character type.  A value of IFALSE in this element of */
133 /*     the descriptor indicates that the strings have variable length. */
134 
135 
136 /*     SIZIDX is the index of the column's element size value.  This */
137 /*     descriptor element is meaningful for columns with fixed-size */
138 /*     entries.  For variable-sized columns, this value is IFALSE. */
139 
140 
141 /*     NAMIDX is the index of the base address of the column's name. */
142 
143 
144 /*     IXTIDX is the data type of the column's index.  IXTIDX */
145 /*     contains a type value only if the column is indexed. For columns */
146 /*     that are not indexed, the location IXTIDX contains the boolean */
147 /*     value IFALSE. */
148 
149 
150 /*     IXPIDX is a pointer to the column's index.  IXTPDX contains a */
151 /*     meaningful value only if the column is indexed.  The */
152 /*     interpretation of the pointer depends on the data type of the */
153 /*     index. */
154 
155 
156 /*     NFLIDX is the index of a flag indicating whether nulls are */
157 /*     permitted in the column.  The value at location NFLIDX is */
158 /*     ITRUE if nulls are permitted and IFALSE otherwise. */
159 
160 
161 /*     ORDIDX is the index of the column's ordinal position in the */
162 /*     list of columns belonging to the column's parent segment. */
163 
164 
165 /*     METIDX is the index of the column's integer metadata pointer. */
166 /*     This pointer is a DAS integer address. */
167 
168 
169 /*     The last position in the column descriptor is reserved.  No */
170 /*     parameter is defined to point to this location. */
171 
172 
173 /*     End Include Section:  EK Column Descriptor Parameters */
174 
175 /* $ Disclaimer */
176 
177 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
178 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
179 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
180 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
181 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
182 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
183 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
184 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
185 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
186 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
187 
188 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
189 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
190 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
191 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
192 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
193 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
194 
195 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
196 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
197 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
198 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
199 
200 
201 /*     Include Section:  EK Segment Descriptor Parameters */
202 
203 /*        eksegdsc.inc  Version 8  06-NOV-1995 (NJB) */
204 
205 
206 /*     All `base addresses' referred to below are the addresses */
207 /*     *preceding* the item the base applies to.  This convention */
208 /*     enables simplied address calculations in many cases. */
209 
210 /*     Size of segment descriptor.  Note:  the include file ekcoldsc.inc */
211 /*     must be updated if this parameter is changed.  The parameter */
212 /*     CDOFF in that file should be kept equal to SDSCSZ. */
213 
214 
215 /*     Index of the segment type code: */
216 
217 
218 /*     Index of the segment's number.  This number is the segment's */
219 /*     index in the list of segments contained in the EK to which */
220 /*     the segment belongs. */
221 
222 
223 /*     Index of the DAS integer base address of the segment's integer */
224 /*     meta-data: */
225 
226 
227 /*     Index of the DAS character base address of the table name: */
228 
229 
230 /*     Index of the segment's column count: */
231 
232 
233 /*     Index of the segment's record count: */
234 
235 
236 /*     Index of the root page number of the record tree: */
237 
238 
239 /*     Index of the root page number of the character data page tree: */
240 
241 
242 /*     Index of the root page number of the double precision data page */
243 /*     tree: */
244 
245 
246 /*     Index of the root page number of the integer data page tree: */
247 
248 
249 /*     Index of the `modified' flag: */
250 
251 
252 /*     Index of the `initialized' flag: */
253 
254 
255 /*     Index of the shadowing flag: */
256 
257 
258 /*     Index of the companion file handle: */
259 
260 
261 /*     Index of the companion segment number: */
262 
263 
264 /*     The next three items are, respectively, the page numbers of the */
265 /*     last character, d.p., and integer data pages allocated by the */
266 /*     segment: */
267 
268 
269 /*     The next three items are, respectively, the page-relative */
270 /*     indices of the last DAS word in use in the segment's */
271 /*     last character, d.p., and integer data pages: */
272 
273 
274 /*     Index of the DAS character base address of the column name list: */
275 
276 
277 /*     The last descriptor element is reserved for future use.  No */
278 /*     parameter is defined to point to this location. */
279 
280 
281 /*     End Include Section:  EK Segment Descriptor Parameters */
282 
283 /* $ Disclaimer */
284 
285 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
286 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
287 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
288 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
289 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
290 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
291 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
292 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
293 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
294 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
295 
296 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
297 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
298 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
299 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
300 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
301 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
302 
303 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
304 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
305 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
306 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
307 
308 
309 /*     Include Section:  EK Data Types */
310 
311 /*        ektype.inc Version 1  27-DEC-1994 (NJB) */
312 
313 
314 /*     Within the EK system, data types of EK column contents are */
315 /*     represented by integer codes.  The codes and their meanings */
316 /*     are listed below. */
317 
318 /*     Integer codes are also used within the DAS system to indicate */
319 /*     data types; the EK system makes no assumptions about compatibility */
320 /*     between the codes used here and those used in the DAS system. */
321 
322 
323 /*     Character type: */
324 
325 
326 /*     Double precision type: */
327 
328 
329 /*     Integer type: */
330 
331 
332 /*     `Time' type: */
333 
334 /*     Within the EK system, time values are represented as ephemeris */
335 /*     seconds past J2000 (TDB), and double precision numbers are used */
336 /*     to store these values.  However, since time values require special */
337 /*     treatment both on input and output, and since the `TIME' column */
338 /*     has a special role in the EK specification and code, time values */
339 /*     are identified as a type distinct from double precision numbers. */
340 
341 
342 /*     End Include Section:  EK Data Types */
343 
344 /* $ Brief_I/O */
345 
346 /*     Variable  I/O  Description */
347 /*     --------  ---  -------------------------------------------------- */
348 /*     HANDLE     I   Handle attached to EK file. */
349 /*     SEGNO      I   Index of segment containing record. */
350 /*     RECNO      I   Record in which entry is to be updated. */
351 /*     COLUMN     I   Column name. */
352 /*     NVALS      I   Number of values in in new column entry. */
353 /*     IVALS      I   Integer values to add to column. */
354 /*     ISNULL     I   Flag indicating whether column entry is null. */
355 
356 /* $ Detailed_Input */
357 
358 /*     HANDLE         is a file handle attached to an EK open for */
359 /*                    write access. */
360 
361 /*     SEGNO          is the index of the segment containing the column */
362 /*                    entry to be updated. */
363 
364 /*     RECNO          is the index of the record containing the column */
365 /*                    entry to be updated.  This record number is */
366 /*                    relative to the start of the segment indicated by */
367 /*                    SEGNO; the first record in the segment has index 1. */
368 
369 /*     COLUMN         is the name of the column containing the entry to */
370 /*                    be updated. */
371 
372 /*     NVALS, */
373 /*     IVALS          are, respectively, the number of values to add to */
374 /*                    the specified column and the set of values */
375 /*                    themselves.  The data values are written in to the */
376 /*                    specified column and record. */
377 
378 /*                    If the  column has fixed-size entries, then NVALS */
379 /*                    must equal the entry size for the specified column. */
380 
381 /*                    For columns with variable-sized entries, the size */
382 /*                    of the new entry need not match the size of the */
383 /*                    entry it replaces.  In particular, the new entry */
384 /*                    may be larger. */
385 
386 /*     ISNULL         is a logical flag indicating whether the entry is */
387 /*                    null.  If ISNULL is .FALSE., the column entry */
388 /*                    defined by NVALS and IVALS is added to the */
389 /*                    specified kernel file. */
390 
391 /*                    If ISNULL is .TRUE., NVALS and IVALS are ignored. */
392 /*                    The contents of the column entry are undefined. */
393 /*                    If the column has fixed-length, variable-size */
394 /*                    entries, the number of entries is considered to */
395 /*                    be 1. */
396 
397 /*                    The new entry may be null even though it replaces */
398 /*                    a non-null value, and vice versa. */
399 
400 /* $ Detailed_Output */
401 
402 /*     None.  See $Particulars for a description of the effect of this */
403 /*     routine. */
404 
405 /* $ Parameters */
406 
407 /*     None. */
408 
409 /* $ Exceptions */
410 
411 /*     1)  If HANDLE is invalid, the error will be diagnosed by routines */
412 /*         called by this routine. */
413 
414 /*     2)  If SEGNO is out of range, the error will diagnosed by routines */
415 /*         called by this routine. */
416 
417 /*     3)  If COLUMN is not the name of a declared column, the error */
418 /*         will be diagnosed by routines called by this routine. */
419 
420 /*     4)  If COLUMN specifies a column of whose data type is not */
421 /*         integer, the error SPICE(WRONGDATATYPE) will be */
422 /*         signaled. */
423 
424 /*     5)  If RECNO is out of range, the error will diagnosed by routines */
425 /*         called by this routine. */
426 
427 /*     6)  If the specified column has fixed-size entries and NVALS */
428 /*         does not match this size, the error will diagnosed by routines */
429 /*         called by this routine. */
430 
431 /*     7)  If the specified column has variable-size entries and NVALS */
432 /*         is non-positive, the error will diagnosed by routines */
433 /*         called by this routine. */
434 
435 /*     8)  If an attempt is made to add a null value to a column that */
436 /*         doesn't take null values, the error will diagnosed by routines */
437 /*         called by this routine. */
438 
439 /*     9)  If COLUMN specifies a column of whose class is not */
440 /*         an integer class known to this routine, the error */
441 /*         SPICE(NOCLASS) will be signaled. */
442 
443 /*     10) If an I/O error occurs while reading or writing the indicated */
444 /*         file, the error will be diagnosed by routines called by this */
445 /*         routine. */
446 
447 /* $ Files */
448 
449 /*     See the EK Required Reading for a discussion of the EK file */
450 /*     format. */
451 
452 /* $ Particulars */
453 
454 /*     This routine operates by side effects:  it modifies the named */
455 /*     EK file by adding data to the specified record in the specified */
456 /*     column.  Data may be added to a segment in random order; it is not */
457 /*     necessary to fill in columns or rows sequentially. Data may only */
458 /*     be added one logical element at a time.  Partial assignments of */
459 /*     logical elements are not supported. */
460 
461 /* $ Examples */
462 
463 /*     1)  Replace the value in the third record of the column ICOL in */
464 /*         the fifth segment of an EK file designated by HANDLE.  Set */
465 /*         the new value to 999. */
466 
467 /*            CALL EKUCEI ( HANDLE, 5, 3, 'ICOL', 1, 999, .FALSE. ) */
468 
469 
470 /*     2)  Same as (1), but this time add a null value.  The argument */
471 /*         999 is ignored because the null flag is set to .TRUE. */
472 
473 /*            CALL EKUCEI ( HANDLE, 5, 3, 'ICOL', 1, 999, .TRUE. ) */
474 
475 
476 /*     3)  Replace the entry in the third record of the column IARRAY in */
477 /*         the fifth segment of an EK file designated by HANDLE.  Set */
478 /*         the new value using an array IBUFF of 10 values. */
479 
480 /*            CALL EKUCEI ( HANDLE, 5, 3, 'IARRAY', 10, IBUFF, .FALSE. ) */
481 
482 /* $ Restrictions */
483 
484 /*     None. */
485 
486 /* $ Literature_References */
487 
488 /*     None. */
489 
490 /* $ Author_and_Institution */
491 
492 /*     N.J. Bachman   (JPL) */
493 
494 /* $ Version */
495 
496 /* -    SPICELIB Version 1.2.0, 06-FEB-2015 (NJB) */
497 
498 /*        Now uses ERRHAN to insert DAS file name into */
499 /*        long error messages. */
500 
501 /* -    SPICELIB Version 1.1.0, 20-JUN-1999 (WLT) */
502 
503 /*        Removed unbalanced call to CHKOUT. */
504 
505 /* -    Beta Version 1.0.0, 26-SEP-1995 (NJB) */
506 
507 /* -& */
508 /* $ Index_Entries */
509 
510 /*     replace integer entry in an EK column */
511 
512 /* -& */
513 
514 /*     SPICELIB functions */
515 
516 
517 /*     Local variables */
518 
519 
520 /*     Use discovery check-in. */
521 
522 /*     First step:  find the descriptor for the named segment.  Using */
523 /*     this descriptor, get the column descriptor. */
524 
525     zzeksdsc_(handle, segno, segdsc);
526     zzekcdsc_(handle, segdsc, column, coldsc, column_len);
527     if (failed_()) {
528 	return 0;
529     }
530 
531 /*     This column had better be of integer type. */
532 
533     dtype = coldsc[1];
534     if (dtype != 3) {
535 	chkin_("EKUCEI", (ftnlen)6);
536 	setmsg_("Column # is of type #; EKUCEI only works with integer colum"
537 		"ns.  RECNO = #; SEGNO = #; EK = #.", (ftnlen)93);
538 	errch_("#", column, (ftnlen)1, column_len);
539 	errint_("#", &dtype, (ftnlen)1);
540 	errint_("#", recno, (ftnlen)1);
541 	errint_("#", segno, (ftnlen)1);
542 	errhan_("#", handle, (ftnlen)1);
543 	sigerr_("SPICE(WRONGDATATYPE)", (ftnlen)20);
544 	chkout_("EKUCEI", (ftnlen)6);
545 	return 0;
546     }
547 
548 /*     Look up the record pointer for the target record. */
549 
550     zzektrdp_(handle, &segdsc[6], recno, &recptr);
551 
552 /*     Determine whether the EK is shadowed. */
553 
554     ekshdw_(handle, &isshad);
555 
556 /*     If the EK is shadowed, we must back up the current column entry */
557 /*     if the entry has not already been backed up.  ZZEKRBCK will */
558 /*     handle this task. */
559 
560     if (isshad) {
561 	zzekrbck_("UPDATE", handle, segdsc, coldsc, recno, (ftnlen)6);
562     }
563 
564 /*     Now it's time to carry out the replacement. */
565 
566     class__ = coldsc[0];
567     if (class__ == 1) {
568 
569 /*        Class 1 columns contain scalar integer data. */
570 
571 	zzekue01_(handle, segdsc, coldsc, &recptr, ivals, isnull);
572     } else if (class__ == 4) {
573 
574 /*        Class 4 columns contain array-valued integer data. */
575 
576 	zzekue04_(handle, segdsc, coldsc, &recptr, nvals, ivals, isnull);
577     } else {
578 
579 /*        This is an unsupported integer column class. */
580 
581 	*segno = segdsc[1];
582 	chkin_("EKUCEI", (ftnlen)6);
583 	setmsg_("Class # from input column descriptor is not a supported int"
584 		"eger class.  COLUMN = #; RECNO = #; SEGNO = #; EK = #.", (
585 		ftnlen)113);
586 	errint_("#", &class__, (ftnlen)1);
587 	errch_("#", column, (ftnlen)1, column_len);
588 	errint_("#", recno, (ftnlen)1);
589 	errint_("#", segno, (ftnlen)1);
590 	errhan_("#", handle, (ftnlen)1);
591 	sigerr_("SPICE(NOCLASS)", (ftnlen)14);
592 	chkout_("EKUCEI", (ftnlen)6);
593 	return 0;
594     }
595     return 0;
596 } /* ekucei_ */
597 
598