Thanks, Andre for such a comprehensive answer! If we're on the subject, I'd like to ask then about array handling in Adabas via Attunity.
Thanks again in advance,
Patricio
Thanks, Andre for such a comprehensive answer! If we're on the subject, I'd like to ask then about array handling in Adabas via Attunity.
Thanks again in advance,
Patricio
Cheers Patricio. No sweat.![]()
Attunity Connect fully supports MU and PE fields (including MU inside of a PE).
These constructs are mapped as arrays and can be used with the standard AIS array handling infrastructure. Some specific points to Adabas arrays are as follows:
■ A counter field is automatically added to the table for every array. For the LANG (AZ) MU field in the EMPLOYEES sample table, Attunity Connect will automatically add a field called C_LANG which will translate to AZC in the
Adabas format buffer.
■ Whenever any data from an MU/PE is included in the query, Attunity
Connectwill automatically add the relevant counter field in the format buffer so that the correct number of rows is returned.
■ For an MU inside a PE, a counter field is created for the MU field. The Adabas format buffer interpretation for this field is a bit more complex as it will generate an explicit format buffer field for every PE instance (e.g., AA1C, AA2C, AA3C…).
■ Adabas arrays support INSERT/UPDATE/DELETE operations when using the virtual array tables. All these operations are implemented using the Adabas A1
command. The following notes apply:
-A DELETE operation sets MU/PE fields to their empty value (zeros or spaces).
So a delete of the 3rd member of the ’AZ’ MU will cause an A1 operation with
format buffer ’AZ3.’ and record buffer with spaces.
– An INSERT operation adds another member to the end of the array. The _
ROWNUM provided is ignored.
■ Adabas arrays can have up to 191 members. It is, however, highly recommended to use a lower dimension which represents the maximum expected number if members. When using Adabas Predict, this ’applicative’ dimension is read from Predict. If Predict specifies no dimension, the defaultOccurrences configuration attribute is used (10 if unspecified). Note that if a record is read with a larger number of array members than the given dimension, the driver will return an error (Bad metadata on array for column….).
■ Attunity Connect arrays are naturally row-wise arrays. When accessing PE
members, Adabas returns the results in a column-wise order. For example, a PE called INCOME (AQ) in the EMPLOYEES sample table has members like CURR_CODE (AS) and SALARY (AS). The format buffer will include AR1-40 and AS1-40 which is a column-wise ordering (all instances of AR followed by all instances of AS). This is different than equivalent definitions in VSAM, for
example, where you would have AR1, AS1, AR2, AS2, etc. The Attunity
ConnectAdabas driver will represent the metadata as an array of CURR_CODE
followed by an array of SALARY to match the physical layout of the buffer, but it will add a groupEntry attribute on the structure in order to expose this logically as a single array. Note that this different ordering is transparent to the user.
I reckon this will point you on your way.
Regards,
Andre
There are currently 1 users browsing this thread. (0 members and 1 guests)