A superdescriptor field is
treated as if it has an alphanumeric (character)
ADABAS standard format unless all of the parent
fields from which it is derived have a binary (numeric) format.
When you enter a value
for a numeric superdescriptor or an alphanumeric superdescriptor where
one or more of its parent fields have a numeric format, the value
must be in character hexadecimal format because many data types and
from-to specifications can be contained in one superdescriptor value.
When you enter a value for a character superdescriptor, the value
must be entered as character data.
Note: By assigning a SAS format
of HEX
w. to superdescriptors
that are derived from one or more numeric fields in a view descriptor,
you can see the internal hexadecimal values. You can then use these
values as a guide for entering like values in the WHERE clause.
For example, the NATURAL
DDM named CUSTOMERS has the character superdescriptor field STATE-ZIPLAST2,
which is defined:
'SP=ST(1,2),ZI(1,2)'
The two data fields that make up STATE-ZIPLAST2 are defined as
DDM Name ADABAS ID ADABAS TYPE LENGTH
-------- --------- ----------- ------
STATE ST A 2
ZIPCODE ZI U 5
If you want
to select the value
TX
from the data field
STATE and the value 78701 from the data field ZIPCODE, the view WHERE
clause would be as follows:
subset where state_zi = E3E7F0F1
The comparable SAS WHERE clause would be
where state_zi = 'E3E7F0F1'x
F0F1 is the hexadecimal
internal representation of a positive zoned decimal value of 01.
If ZIPCODE were defined as packed and the from-to specification were
the same, the hexadecimal representation 001F would represent the
value 01. Similarly, 0001 would be the correct representation for
either binary or fixed. A sign (+ or -) must also be entered according
to type and
ADABAS requirements.
Suppose you want to
access a character superdescriptor field named DEPT-PERSON, which
is defined:
'S2=DP(1,6),LN(1,18)'
The
two data fields that make up DEPT-PERSON are defined:
DDM Name ADABAS ID ADABAS TYPE LENGTH
-------- --------- ----------- ------
DEPT DP A 6
LASTNAME LN A 18
If you
want to select the value
TECH01
from the
data field DEPT and the value
BOYER
from
the data field LASTNAME, the view WHERE clause would be as follows.
(Note that unquoted values in the view WHERE clause are uppercased.)
subset where dept-person = tech01boyer
A comparable SAS WHERE clause would be
where dept-person = 'TECH01BOYER'