Chapter Contents |
Previous |
Next |
SAS/ACCESS Interface to ADABAS Software |
Data Field Types |
The SAS/ACCESS interface to ADABAS
supports the ADABAS data fields as described below.
A group field can also consist
of other groups. In conjunction with grouping, you can assign level numbers 01 to 07 to define a group.
You use subfields for read operations only; they cannot be used for updating directly.
You use superfields for read operations only; they cannot be used for updating directly.
Mapping Data between the SAS System and ADABAS |
For example, suppose an ADABAS file has the data fields and values shown in ADABAS Data. LASTNAME is an elementary field, JOBTITLE is a multiple-value field, and EDUCATION is a periodic group consisting of the data fields COLLEGE, DEGREE, and YEAR.
______________________________________________________________| | LASTNAME | JOBTITLE | EDUCATION | |___________|___________________|_____________________________| | Reid | Systems Analyst | Purdue | BA | 1973 | |___________|-------------------|-----------------------------| | DBA | Harvard | MBA | 1975 | |___________________|_____________________________| |
The interface view engine would map the ADABAS data into two SAS observations, as shown in ADABAS Data Mapped into SAS Observations.
ADABAS Data Mapped into SAS Observations
LASTNAME JOBTITL1 JOBTITL2 COLLEGE DEGREE YEAR Reid Systems Analyst DBA Purdue BA 1973 Reid Systems Analyst DBA Harvard MBA 1975 |
If you were browsing the ADABAS data, such as with the FSVIEW procedure, the results would be similar to ADABAS Data Mapped into SAS Observations, with LASTNAME, JOBTITL1, and JOBTITL2 repeated for each set of COLLEGE, DEGREE, and YEAR values. Actually though, the value Reid is stored in the ADABAS file only once. For retrievals, the results are straightforward. When updating, however, you need to keep in mind how the interface view engine maps multiple-value fields and periodic groups.
Using the FSVIEW procedure, suppose you want to change the spelling of a last name, for example, from Reid to Reed. All you need to do is type REED over one of the REID values, and, with a single update operation, the last names are all changed. On the other hand, using the FSEDIT procedure, suppose you want to delete an observation for Reid. Each observation for his job titles and education data would display his last name. If you deleted an observation, for example, the one for Purdue, the deletion would not affect his last name or his job title data, but the Purdue observation would be gone. For more information and an example of deleting an observation from ADABAS data, see Browsing and Updating ADABAS Data.
Data Field Formats and Lengths |
Data definition statements allow you to define data field formats and lengths for both ADABAS files and NATURAL DDMs. The standard format of a data field is specified with a one-character code shown next in ADABAS Standard Data Field Formats and Lengths. The standard length of a data field is specified in bytes; the maximum length is also given.
Data Type | Standard Format | Standard Length | Description |
---|---|---|---|
Alphanumeric | A (ADABAS) A (DDM) | 253 byte maximum | Left-justified, with trailing blanks removed |
Binary | B (ADABAS) B (DDM) | 126 byte maximum | Right-justified, unsigned, with leading zeros removed |
Fixed Point | F (ADABAS) B (DDM) |
Must be 4 bytes | Right-justified, signed, with twos complement notation |
Floating Point | G (ADABAS) F (DDM) | Must be 4 or 8 bytes | In normalized form and signed |
Packed Decimal | P (ADABAS) P (DDM) | 15 byte maximum | Right-justified and signed |
Unpacked Decimal (Zoned) | U (ADABAS) N (DDM) | 29 byte maximum | Right-justified and signed |
If the standard length of a data field is specified as zero, the data field is a variable length field, which has no maximum or required length.
Note that when creating SAS/ACCESS descriptor files, you can specify SAS formats for ADABAS data to change the way the data appears, for example, to add decimal points. Also, you can specify a SAS date format in your SAS/ACCESS descriptor files to designate a date representation.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.