Chapter Contents

Previous

Next
MVF

MVF



Modifies the occurrences of a multiple-value field.

Optional statement
Applies to: access descriptor or view descriptor
Interacts with: ASSIGN


Syntax
Details

Syntax

MVF column-identifier
CONTENT occurrence-1 <=> E| SAS-date-format | length
<...occurrence-n <=> E| SAS-date-format| length>;
|
DROP occurrence-1 <<TO> ... occurrence-n>;
|
FORMAT occurrence-1 <=> SAS-format-name
<... occurrence-n <=> SAS-format-name>;
|
INFORMAT occurrence-1 <=> SAS-format-name
<... occurrence-n <=> SAS-format-name>;
|
OCCURS<=> number-of-occurrences;
|
RENAME occurrence-1 <=> SAS-variable-name
< ... occurrence-n <=> SAS-variable-name>;
|
RESET occurrence-1 <<TO> ... occurrence-n>;
|
SELECT occurrence-1 <<TO> ... occurrence-n>;


Details

You use the MVF statement to modify values for occurrences of a multiple-value field. The MVF statement can be used when creating an access descriptor or a view descriptor.

If you use an editing statement, such as MVF, it must follow the CREATE statement and the database-description statements when you create a descriptor. See CREATE for more information on the order of statements.

The MVF statement allows you to

The column-identifier must be a multiple-value field, and can be the column name or the positional equivalent from the LIST statement. The occurrence argument can be the occurrence name or the occurrence number. If the column name or the occurrence name contains special characters, like '-', enclose the name in quotes. The '='is optional for all subcommands.

You can use the LISTOCC statement to review your changes.

You do not have to issue a SELECT statement in a view descriptor for occurrences included in the CONTENT, FORMAT, INFORMAT, and RENAME subcommands. The subcommands select the columns.

The MVF statement can take one of the following subcommands:

OCCURS
allows you to specify a number of occurrences or an occurrence range. The default occurrence range is displayed as 1 191, which is the maximum number of occurrences allowed for multiple-value fields. If the value for the ASSIGN statement in an access descriptor is YES, the number of occurrences or the occurrence range cannot be changed in any view descriptor that is based on this access descriptor.

For example, if you want the BRANCH-OFFICE column in the CUSTOMER DDM to have 4 occurrences, submit the following statement:

   mvf "BRANCH-OFFICE" occurs = 4

SELECT
allows you to select individual occurrences to be included in your descriptor. This subcommand is used only when defining view descriptors.

You can select one or more individual occurrences or a range of occurrences. For example, if you want to select occurrences one, two, and three of the BRANCH-OFFICE column in the CUSTOMER DDM, submit the following statement:

   mvf "BRANCH-OFFICE" select 1 2 3;

                   or

   mvf "BRANCH-OFFICE" select 1 to 3;

DROP
allows you to drop individual occurrences from your descriptor. If you drop all occurrences of a column, the column is automatically dropped. This subcommand is used only when defining access descriptors.

You can drop one or more individual occurrences or a range of occurrences. For example, if you want to drop occurrences one, two, and three of the BRANCH-OFFICE column in the CUSTOMER DDM, submit the following statement:

   mvf "BRANCH-OFFICE" drop 1 2 3;

                   or

   mvf "BRANCH-OFFICE" drop 1 to 3;

RESET
allows you to reset the attributes of individual occurrences. This subcommand can be used when creating an access or view descriptor. Specifying the RESET subcommand for an occurrence has the same effect on occurrence attributes as specifying the RESET statement for a column. See RESET for more information.

You can reset one or more individual occurrences or a range of occurrences. For example, if you want to reset occurrences one, two, and three of the BRANCH-OFFICE column in the CUSTOMER DDM, submit the following statement:

   mvf "BRANCH-OFFICE" reset 1 2 3;

                   or

   mvf "BRANCH-OFFICE" reset 1 to 3;

FORMAT
allows you to change the format attribute of individual occurrences. This subcommand can be used when creating access or view descriptors. However, the format attribute cannot be changed in a view descriptor when you set ASSIGN=YES.

You can change the format attribute of one or more occurrences in one FORMAT subcommand. For example, if you want to change the format attribute for occurrences nine and ten of the BRANCH-OFFICE column in the CUSTOMER DDM, submit the following statement:

   mvf "BRANCH-OFFICE" format 9 $21. 
       branch10 = $8.;

INFORMAT
allows you to change the informat attribute of an individual occurrence. This subcommand can be used when creating access or view descriptors. However, the informat attribute cannot be changed in a view descriptor when you set ASSIGN=YES.

You can change the informat attribute of one or more occurrences in one INFORMAT subcommand. For example, if the BRANCH-OFFICE column in the CUSTOMER DDM is a multiple-value field, and you want to change the informat attribute for occurrences nine and ten, submit the following statement:

   mvf "BRANCH-OFFICE" informat 9 $21. 
       branch10 = $8.;

CONTENT
allows you to change the DB content attribute of an individual occurrence. This subcommand can be used when creating access or view descriptors. Changing the DB content attribute of an occurrence has the same effect on the SAS formats and informats for ADABAS files and NATURAL DDMs as changing the DB content attribute of a column. See CONTENT for more information. For example, if the FIRSTORDERDATE column in the CUSTOMER DDM is a multiple-value field, and you want to change the DB content attribute for occurrences nine and ten, submit the following statement:
   mvf firstorderdate content 9 yymmdd6. 
       branch10 = yymmdd6.;

RENAME
allows you to rename a SAS variable name for an individual occurrence. This subcommand can be used when creating an access or view descriptor. However, this subcommand has different effects on access and view descriptors based on the value specified in the ASSIGN statement.

If you set ASSIGN=NO in the access descriptor, the SAS variable name can be renamed. If you set ASSIGN=YES, the SAS variable name can be renamed in the access descriptor but not in the view descriptor.

You can rename the SAS variable name for one or more occurrences in one RENAME subcommand. For example, if you want to rename occurrences nine and ten of the BRANCH-OFFICE column in the CUSTOMER DDM, submit the following statement:

   mvf "BRANCH-OFFICE" rename 9 london 
       branch10 = tokyo;

You can use the LISTOCC statement to review your changes.


Chapter Contents

Previous

Next

Top of Page

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