Chapter Contents

Previous

Next
The DATASETS Procedure

MODIFY Statement


Changes the attributes of SAS files and, through the use of subordinate statements, the attributes of variables in those SAS files.

Featured in: Modifying SAS Data Sets


MODIFY SAS-file <(file-option(s))>
</ <GENNUM=integer>
<MEMTYPE=mtype>>;

To do this Use this option
Restrict processing to a certain type of SAS file MEMTYPE=
Specify attributes

Assign or change a data set label LABEL=

Assign or change a special data set type TYPE=

Specify how the data are currently sorted SORTEDBY=
Modify passwords

Modify an alter password ALTER=

Modify a read, write, or alter password PW=

Modify a read password READ=

Modify a write password WRITE=
Modify generation groups

Modify the maximum number of generations for a generation group GENMAX=

Modify a historical version GENNUM=


Required Arguments

SAS-file
specifies a SAS file in the procedure input library.


Options

ALTER=password-modification
assigns, changes, or removes an alter password for the SAS file named in the MODIFY statement. password-modification is one of the following:

See also: Manipulating Passwords

GENMAX=integer
sets the maximum number of files in a generation group.
Range: 0 to 999
Default: 0

GENNUM=integer
restricts processing to the specified generation file. Valid values for GENNUM= are

postive integer
refers to an explicit generation file.

negative integer
refers to a relative generation file.

LABEL='data-set-label' | ' '
assigns, changes, or removes a data set label for the SAS data set named in the MODIFY statement. If a single quote appears in the label, write it as two single quotes. LABEL= or LABEL=' ' removes the current label.
Range: 1-40 characters
Featured in: Modifying SAS Data Sets

MEMTYPE=mtype
restricts processing to one member type (mtype).
Aliases: MTYPE= and MT=
Default: If you do not specify the MEMTYPE= option in the PROC DATASETS statement or in the MODIFY statement, the default is MEMTYPE=DATAVIEW.
See also: Restricting Member Types Available for Processing

PW=password-modification
assigns, changes, or removes a read, write, or alter password for the SAS file named in the MODIFY statement. password-modification is one of the following:

See also: Manipulating Passwords

READ=password-modification
assigns, changes, or removes a read password for the SAS file named in the MODIFY statement. password-modification is one of the following:

See also: Manipulating Passwords
Featured in: Modifying SAS Data Sets

SORTEDBY=sort-information
specifies how the data are currently sorted. SAS stores the sort information with the file but does not verify that the data are sorted the way you indicate.

sort-information can be one of the following:

by-clause </ collate-name>
indicates how the data are currently sorted. Values for by-clause are the variables and options you can use in a BY statement in a PROC SORT step. collate-name names the collating sequence used for the sort. By default, the collating sequence is that of your host operating environment.

_NULL_
removes any existing sort information.

Featured in: Modifying SAS Data Sets

TYPE=special-type
assigns or changes the special data set type of a SAS data set.

SAS does not verify

Note:   Do not confuse the TYPE= option with the MEMTYPE= option. The TYPE= option specifies a type of special SAS data set. The MEMTYPE= option specifies one or more types of SAS files in a SAS data library.  [cautionend]
Tip: Most SAS data sets have no special type. However, certain SAS procedures, like the CORR procedure, can create a number of special SAS data sets. In addition, SAS/STAT software and SAS/EIS software support special data set types.

WRITE=password-modification
assigns, changes, or removes a write password for the SAS file named in the MODIFY statement. password-modification is one of the following:

See also: Manipulating Passwords


Manipulating Passwords
In order to assign, change, or remove a password, you must specify the password for the highest level of protection that currently exists on that file.

Assigning Passwords

/* assign a password to an unprotected
   file */
modify colors (pw=green);
/* assigns an alter password to an already
   read-protected SAS data set */
 modify colors (read=green alter=red);

Changing Passwords

/* changes the write password from
   YELLOW to BROWN */
modify cars (write=yellow/brown);
/* use alter access to change the unknown
   read password to BLUE */
modify colors (read=/blue alter=red);

Removing Passwords

/* removes the alter password RED from
   STATES */
modify states (alter=red/);
/* Use alter access to remove the read
   password */
modify zoology (read=green/ alter=red);
/* Use PW= as an alias for either WRITE=
   or ALTER= to remove the unknown read
   password */
modify biology (read=/ pw=red);


Working with Generation Groups

Changing the Number of Generations

/* change the number of generations on A to 99 */
modify A(genmax=99);

Removing Passwords

/* removes the alter password RED from
   STATES(GENNUM=2) */
modify states (alter=red/) / gennum=2;


Chapter Contents

Previous

Next

Top of Page

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