Chapter Contents |
Previous |
Next |
MVF |
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 |
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:
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
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 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;
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;
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.;
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.;
mvf firstorderdate content 9 yymmdd6. branch10 = yymmdd6.;
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.