When your view descriptor uses WHERE clauses that have multiple values for a search
field, and specifies a path that does not originate from the
root segment in the IMS database, it forces the IMS engine to reposition itself to the beginning
of the IMS database for each value.
In this example, the WHERE statement tries to find two checking account records in
the AcctDBD database.
where chckacct = '345620145345'
or chckacct = '345620134663';
Because the CUSTOMER segment is the root segment and the CHCKACCT segment is a child
of CUSTOMER, the IMS engine must issue a GU call for each checking account number
that it wants to find. It
does this in order to reposition itself at the start of the database. If it used GN
calls, it might pass by one of the records because they are not sequential.
Specifying multiple values for a search field in a WHERE statement for HDAM IMS databases
permits the IMS engine to create a WHERE key list. The IMS engine issues calls that
use, at a minimum,
the first
segment level SSA with a WHERE key list value. When no more data is retrieved from the IMS database
for a WHERE key list value, a GU call is used to reposition to the beginning of the
database and the next WHERE key list value is used. Processing stops when all WHERE
key list values have been used.
The following conditions do not enable the IMS engine to generate SSAs. They cause
all data from the IMS database as defined by the view descriptor to be returned to
SAS for further processing:
-
HDAM WHERE statements that use a WHERE key list and an OR operator with another search
field or key list in the first segment level of the view descriptor, for example:
where custcode in ('24589689' '29834248')
| state in ('CA' 'VA');
-
an OR between two segment levels