ACCESS Procedure Reference |
Modifies record, group, and item definitions in an existing access
descriptor.
Optional statement |
|
Applies to: |
access descriptor
|
Interacts with: |
UPDATE statement
|
REPLACE | REPL index-number
|
|
<GROUP= new-group-name
ITEM=new-item-name
LEVEL=level-number
DBFORMAT=database-format
FORMAT=SAS-format SEARCH=search-name
KEY=Y|N|U DBCONTENT=database-content>;
|
|
|
<RECORD=new-record-name
SEGMENT= segment-name
SEGLNG= segment-length>;
|
|
REPLACE | REPL item-name
|
<LEVEL=level-number DBFORMAT=database-format
FORMAT=SAS-format SEARCH=search-name
KEY=Y|N|U DBCONTENT=database-content>;
|
|
|
<SEGMENT=segment-name
SEGLNG=segment-length>;
|
|
The REPLACE statement replaces or modifies
existing records, groups, and items in existing access descriptors. Any item
that can be entered on RECORD, GROUP=, and ITEM= statements can be modified,
except the OCCURS option.
Unlike the INSERT and DELETE statements, each data item
to be modified needs a separate REPLACE statement, although any number of
REPLACE statements can occur in any order with INSERT and DELETE statements
within an UPDATE statement
The only required item on the REPLACE
statement is the index number, name, or quoted string used to identify it.
However, the optional arguments are recommended for data definition. Except
for the following optional arguments, the arguments follow the same editing
rules as they would in create mode or in an update insert situation.
-
KEY=N will remove an item as a designated key
field.
-
Specifying blanks on a SEARCH or DBCONTENT parameter
removes their value, effectively dropping the parameters.
-
The FORMAT parameter currently cannot be reset
to its default value.
The following are examples of replacement
statements:
replace shipped dbc=mmddyy6.; /* modifies dbcontent */
replace 5 se=' ' /* drops search field parameter */
replace 'old-record-name' record='new-record-name';
sg='new-ims-segname'; /* replaces record */
replace 2 item='cust-item'; /* renames item */
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.