Previous Page | Next Page

The DATASETS Procedure

Syntax: DATASETS Procedure


Tip: Supports RUN-group processing.
Tip:
Tip:
See: DATASETS Procedure under Windows UNIX z/OS OpenVMS
Table of Contents: The DATASETS Procedure

PROC DATASETS <<option-1 <...option-n>>>;
AGE current-name related-SAS-file-1 <...current-name related-SAS-file-n>
</ <ALTER=alter-password>
<MEMTYPE=mtype>>;
APPEND BASE=<libref.>SAS-data-set
<APPENDVER=V6>
<DATA=<libref.>SAS-data-set>
<FORCE>
<GETSORT>
<NOWARN>;
AUDIT SAS-file <(SAS-password)>;
INITIATE
<AUDIT_ALL=NO|YES>;
<LOG <ADMIN_IMAGE=YES|NO>
<BEFORE_IMAGE=YES|NO>
<DATA_IMAGE=YES|NO>
<ERROR_IMAGE=YES|NO>>;
<USER_VAR variable-1 <... variable-n>>;
AUDIT SAS-file <(<SAS-password> <GENNUM= integer>)>;
SUSPEND|RESUME|TERMINATE;
CHANGE old-name-1=new-name-1
<...old-name-n=new-name-n >
</ <ALTER=alter-password>
<GENNUM=ALL|integer>
<MEMTYPE=mtype>>;
CONTENTS <option-1 <...option-n>>;
COPY OUT=libref-1
<CLONE|NOCLONE>
<CONSTRAINT=YES|NO>
<DATECOPY>
<FORCE>
<IN=libref-2>
<INDEX=YES|NO>
<MEMTYPE=(mtype-1 <...mtype-n>)>
<MOVE <ALTER=alter-password>>;
EXCLUDE SAS-file-1 <...SAS-file-n> < / MEMTYPE=mtype>;
SELECT SAS-file-1 <...SAS-file-n>
</ <ALTER=alter-password>
<MEMTYPE= mtype>>;
DELETE SAS-file-1 <...SAS-file-n>
</ <ALTER=alter-password>
<GENNUM=ALL|HIST|REVERT|integer>
<MEMTYPE=mtype>>;
EXCHANGE name-1=other-name-1
<...name-n=other-name-n>
</ <ALTER=alter-password>
<MEMTYPE=mtype> >;
MODIFY SAS-file <(option-1 <...option-n>)>
</ <CORRECTENCODING=encoding-value>
<DTC=SAS-date-time>
<GENNUM=integer>
<MEMTYPE=mtype>>;
ATTRIB variable list(s) attribute list(s);
FORMAT variable-1 <format-1>
<...variable-n <format-n>>;
IC CREATE <constraint-name=> constraint
<MESSAGE='message-string' <MSGTYPE=USER>>;
IC DELETE constraint-name-1 <...constraint-name-n>| _ALL_;
IC REACTIVATE foreign-key-name REFERENCES libref;
INDEX CENTILES index-1 <...index-n>
</ <REFRESH>
<UPDATECENTILES= ALWAYS|NEVER|integer>>;
INDEX CREATE index-specification-1 <...index-specification-n>
</ <NOMISS>
<UNIQUE>
<UPDATECENTILES=ALWAYS|NEVER|integer>>;
INDEX DELETE index-1 <...index-n> | _ALL_;
INFORMAT variable-1 <informat-1>
<...variable-n <informat-n>>;
LABEL variable-1=<'label-1'|' '>
<...variable-n=<'label-n'|' ' >>;
RENAME old-name-1=new-name-1
<...old-name-n=new-name-n>;
REBUILD SAS-file </ ALTER=password GENNUM=n MEMTYPE=mtype NOINDEX>;
REPAIR SAS-file-1 <...SAS-file-n>
</ <ALTER=alter-password>
<GENNUM=integer>
<MEMTYPE=mtype>>;
SAVE SAS-file-1 <...SAS-file-n> </ MEMTYPE=mtype>;

Task Statement
Manage SAS files PROC DATASETS
Rename a group of related SAS files AGE
Add observations from one SAS data set to the end of another SAS data set APPEND
associates a format, informat, or label with variables in the SAS data set specified in the MODIFY statement ATTRIB
Initiate, control, suspend, resume, or terminate event logging to an audit file AUDIT
Rename one or more SAS files CHANGE
Describe the contents of one or more SAS data sets and prints a directory of the SAS library CONTENTS
Copy all or some of the SAS files COPY
Delete SAS files DELETE
Exchange the names of two SAS files EXCHANGE
Exclude SAS files from copying EXCLUDE
Permanently assign, change, and remove variable formats FORMAT
Create an integrity constraint IC CREATE
Delete an integrity constraint IC DELETE
Reactivate a foreign key integrity constraint IC REACTIVATE
Update centiles statistics for indexed variables INDEX CENTILES
Create simple or composite indexes INDEX CREATE
Delete one or more indexes INDEX DELETE
Permanently assign, change, and remove variable informats INFORMAT
Assign, change, and remove variable labels LABEL
Change the attributes of a SAS file and the attributes of variables MODIFY
Specifies whether to restore or delete the disabled indexes and integrity constraints REBUILD
Rename variables in the SAS data set RENAME
Attempt to restore damaged SAS data sets or catalogs REPAIR
Delete all the SAS files except the ones listed in the SAVE statement SAVE
Select SAS files for copying SELECT

The following table lists the statements and the options for the DATASETS procedure. Several of the statements can be used only in a MODIFY run group.


Statement Options

PROC DATASETS


AGE
ALTAR

MEMTYPE


APPEND
APPENDVER

DATA

FORCE

GETSORT

NOWARN


ATTRIB (must be used in a MODIFY RUN group) FORMAT

INFORMAT

LABEL


AUDIT
GENNUM

AUDIT_ALL

LOG

USER_VAR

SUSPEND

RESUME

TERMINATE


CHANGE
ALTER

GENNUM

MEMTYPE


CONTENTS
CENTILES

DATA

DETAILS

DIRECTORY

FMTLEN

MEMTYPE

NODS

ORDER

OUT

OUT2

SHORT

VARNUM


COPY
ALTER

CLONE

CONSTRAINT

DATECOPY

FORCE

INDEX

MEMTYPE

MOVE

NOWARN


DELETE
ALTER

GENNUM

MEMTYPE


EXCHANGE
ALTER

MEMTYPE


EXCLUDE
MEMTYPE

FORMAT (must be used in a MODIFY RUN group)

IC CREATE (must be used in a MODIFY RUN group) MESSAGE

IC DELETE (must be used in a MODIFY RUN group) _ALL_

IC REACTIVATE (must be used in a MODIFY RUN group)

INDEX CENTILES (must be used in a MODIFY RUN group) REFRESH

UPDATECENTILES


INDEX CREATE (must be used in a MODIFY RUN group) NOMISS

UNIQUE

UPDATECENTILES


INDEX DELETE (must be used in a MODIFY RUN group) _ALL_

INFORMAT (must be used in a MODIFY RUN group )

LABEL (must be used in a MODIFY RUN group )

MODIFY
ALTER

CORRECTENCODING

DTC

GENMAX

GENNUM

LABEL

MEMTYPE

PW

READ

SORTEDBY

TYPE

WRITE


REBUILD
ALTER

GENNUM

MEMTYPE

NOINDEX


RENAME (must be used in a MODIFY RUN group )

REPAIR
ALTER

GENNUM

MEMTYPE


SAVE
MEMTYPE

SELECT
ALTER

MEMTYPE

Previous Page | Next Page | Top of Page