Observation
|
Segments returned
|
---|---|
1
|
1 2 3 4
|
2
|
1 2 3 5
|
3
|
1 2 3 6
|
4
|
1 2 3 7
|
5
|
1 8 9 .
|
6
|
1 8 10 .
|
01 Automatic Teller Record 02 ATM Information 03 ATM Location (occurs 20 times) 04 Location 04 ATM Transaction Information (occurs 7 times) 05 Account Type 05 Transaction Time 05 Transaction (occurs 2 times) 06 Transaction Type 06 Transaction Amount
$11.
in one access descriptor and 11.
in another access descriptor based on the same database. When you create view descriptors
for the database, use a WHERE statement to retrieve only the appropriate values for
the field. This can often be done by specifying a particular record type or other code in the WHERE statement.
WHERE sas-dummy-name EQ value
proc access dbms=ims; create work.account.access; dbd=acctdbd dbtype=hdam; record='customer_record' sg=customer sl=225; item=soc_sec_number lv=2 dbf=$11. key=u se=ssnumber; item=customer_name lv=2 dbf=$40. se=custname; item=addr_line_1 lv=2 dbf=$30. se=custadd1; item=addr_line_2 lv=2 dbf=$30. se=custadd2; item=city lv=2 dbf=$28. se=custcity; item=state lv=2 dbf=$2. se=custstat; item=country lv=2 dbf=$20. se=custland; item=zip_code lv=2 dbf=$10. se=custzip; group=home_phone lv=2 se=custhphn; item='area code' lv=3 dbf=$3. item=filler1 lv=3 dbf=$1. item=phone_number lv=3 dbf=$8. item=office_phone lv=2 dbf=$12. se=custophn; item='group stuff' lv=2 dbf=$12. se=custhphn; list all; create work.phone.view psbname=acctsam pcbindex=2; select soc_sec_number customer_name 'area code' 'phone number' 'group stuff'; list view; run; proc print data=work.phone; var soc_sec_number customer_name 'area code' 'phone number'; where 'group stuff' = '803-657-1346' or 'group stuff' = '803-657-1687'; run;
The SAS System OBS soc_sec_number customer_name 'area code' 'phone number' 1 436-42-6394 BOOKER, APRIL M. 803 657-1346 2 178-42-6534 PATTILLO, RODRIGUES 803 657-1346 3 434-62-1234 SUMMERS, MARY T. 803 657-1687
record='customer_record' segment=customer seglng=225; item=soc_sec_number lv=2 dbf=$11. search=ssnumber key=y; item=customer_name lv=2 dbf=$40. search=custname; item='address info' lv=2; item=addr_line_1 lv=3 dbf=$30.; item=addr_line_2 lv=3 dbf=$30.; item=city lv=3 dbf=$28.; item=state lv=3 dbf=$2. ; item=country lv=3 dbf=$20.; item=zip_code lv=3 dbf=$10.; item=home_phone lv=2 dbf=$12.; item=office_phone lv=2 dbf=$12.;
record='customer_record' segment=customer seglng=225; item=soc_sec_number lv=2 dbf=$11. search=ssnumber key=y; item=customer_name lv=2 dbf=$40. search=custname; item='address info' lv=2; item=addr_line_1 lv=3 dbf=$30.; item=addr_line_2 lv=3 dbf=$30.; item=city lv=3 dbf=$28.; item=state lv=3 dbf=$2. ; item=country lv=3 dbf=$20.; item=zip_code lv=3 dbf=$10.;
record='customer_record' segment=customer seglng=225; item=soc_sec_number lv=2 dbf=$11 . search=ssnumber key=y; item=customer_name lv=2 dbf=$40. search=custname; item='filler' lv=2 dbf=$char60.; item=city lv=3 dbf=$28.; item=state lv=3 dbf=$2. ; item=country lv=3 dbf=$20.; item=zip_code lv=3 dbf=$10.; item=home_phone lv=2 dbf=$12.; item=office_phone lv=2 dbf=$12.;