Chapter Contents

Previous

Next
REPLACE

REPLACE



Modifies record, group, and item definitions in an existing access descriptor

Optional statement
Applies to: access descriptor
Interacts with: UPDATE statement


Syntax
Details
Arguments
Examples

Syntax

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>;


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.


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        */


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.