To access a control-key definition (of a CALC, INDEX, or sorted set) using SQL, the control-key definition must not include a FILLER element. If it does, change the non-SQL record definition, assigning a name other than FILLER to the elements in question.
Additionally, the control-key definition cannot incorporate the subordinate elements of a group level REDEFINES when these elements are smaller in size than the base element being redefined, as in the following example:
02 ELEM1 PIC X(8). 02 ELEM1REDEF REDEFINES ELEM1. 03 ELEM1A PIC S9(8) COMP. 03 ELEM1B PIC S9(8) COMP.
An error occurs if ELEM1A and ELEM1B are used in the control key definition, because they are smaller than the element they redefine (although combined they are equal to ELEM1). When this condition occurs, change the redefining group, which contains the smallest subordinate elements, into the base‑element definition. Use the base-element definition in the control key specification. For example, ELEM1REDEF should be the base-element definition in the sample above, and ELEM1 should be coded so that it redefines ELEM1REDEF.
Note: For more information about accessing non-SQL-defined databases using SQL, see the CA IDMS Database SQL Option Reference Guide.
|
Copyright © 2009 CA.
All rights reserved.
|
|