ACCESS Procedure Reference |
Optional statement | |
Applies to: | access descriptor |
Interacts with: | UPDATE statement |
Syntax | |
Details | |
Arguments | |
Examples |
Syntax |
REPLACE | REPL index-number |
|
|
REPLACE | REPL item-name
|
|
Details |
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
Arguments |
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.
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.
Examples |
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.