MVF Statement

Modifies the occurrences of a multiple-value field.
Type: Optional statement
Applies to: access descriptor or view descriptor
Interaction: ASSIGN

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 Statement for more information about the order of statements.
The MVF statement enables you to perform the following tasks:
  • choose the number of occurrences by specifying a range of occurrences
  • select individual occurrences or a range of occurrences
  • drop individual occurrences or a range of occurrences
  • reset individual occurrences or a range of occurrences
  • change the format value for one or more occurrences
  • change the informat value for one or more occurrences
  • change the database content value for one or more occurrences
  • rename the SAS variable name for one or more occurrences.
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 quotation marks. 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:
CONTENT
enables 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 Statement 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.;
DROP
enables 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;
FORMAT
enables 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
enables 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.;
OCCURS
enables 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 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 four occurrences, submit the following statement:
mvf "BRANCH-OFFICE" occurs = 4
RENAME
enables 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;
RESET
enables 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 Statement 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;
SELECT
enables 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;
You can use the LISTOCC statement to review your changes.