1 /* BEGIN INCLUDE FILE - dm_im_cursor.incl.pl1 */
 2 
 3 /* DESCRIPTION:
 4 
 5           This structure specifies a DM file, an index collection in that DM
 6 file, and a position (key) in that index collection.
 7 
 8 */
 9 
10 /* HISTORY:
11 
12 Written by Lindsey Spratt, 03/29/82
13 Modified:
14 08/09/82 by Matthew Pierret: Changed collection_id from "fixed bin (17)" to
15             "bit (35) aligned".
16 08/26/82 by Lindsey Spratt:  Changed to version 2.  Added the is_valid and
17             is_at_end_of_index flags.  Changed the key_check_value to fixed
18             bin (35).  Added the IM_HASH_BIAS, which is used to increment the
19             value developed by hash_index_, and IM_HASH_NUMBER_OF_BUCKETS,
20             which is a unique number used by hash_index_ to develop the
21             key_check_value.
22 02/23/83 by Lindsey Spratt: Changed to keep the current key value in the
23             cursor.  Also, implemented the ability to have the cursor
24             positioned before or after the index.
25 10/23/84 by Lindsey L. Spratt:  Added a description section.
26 */
27 
28 /* format: style2,ind3 */
29      dcl     1 index_cursor         based (index_cursor_ptr),
30                2 type               fixed bin (17) unaligned,
31                2 version            fixed bin (17) unaligned,
32                2 file_opening_id    bit (36) aligned,
33                2 collection_id      bit (36) aligned,
34                2 key_id_string      bit (36) aligned,       /* Is the location of the current key, */
35                                                             /* if flags.current_key_exists is on. Is the location */
36                                                             /* of the end of the index if flags.is_at_end_of_index */
37                                                             /* is on, which is only available via an operation */
38                                                             /* requiring the "previous" key.  Is the location of */
39                                                             /* the "next" key, otherwise. */
40                2 area_ptr           ptr,                    /* Area in which the cursor and key_string area allocated. */
41                                                             /* Must be a freeing area. */
42                2 current_key_string_ptr
43                                     ptr,                    /* Points to the value of the current key. */
44                2 current_key_string_length
45                                     fixed bin (24) unal,    /* Is the length of the current key in bits. */
46                2 pad                bit (12) unal,
47                2 flags              aligned,
48                  3 is_at_beginning_of_index
49                                     bit (1) unaligned,      /* Only the "next" key is defined. */
50                  3 is_at_end_of_index
51                                     bit (1) unaligned,      /* Only the "previous" key is defined. */
52                  3 current_key_exists
53                                     bit (1) unaligned,      /* If on, indicates that the "current" key is identified */
54                                                             /* by the key_id_string.  If off, the "current" position */
55                                                             /* is undefined, and the key_id_string identifies the */
56                                                             /* previous or next key, depending on whether */
57                                                             /* flags.is_at_end_of_index is off or on, respectively. */
58                  3 is_valid         bit (1) unaligned,      /* If off, the index_manager_ was interrupted while */
59                                                             /* setting the cursor position and the cursor is not */
60                                                             /* to be trusted for relative position operations. */
61                  3 pad              bit (32) unal;
62 
63 
64      dcl     index_cursor_ptr       ptr;
65 
66      dcl     INDEX_CURSOR_VERSION_3 fixed bin (17) init (3) internal static options (constant);
67      dcl     INDEX_CURSOR_TYPE      init (2) fixed bin (17) internal static options (constant);
68 
69 /* END INCLUDE FILE - dm_im_cursor.incl.pl1 */