SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference |
The SYSTEM 2000 statement in the QUEST procedure can be any valid SYSTEM
2000 statement that is available in the Self-Contained Facility, including
- CONTROL statements to save and restore databases, to assign passwords
and authorities, to create and remove indexes, and so on
- DEFINE statements to define, change, and delete database components
in the database definition
- QUEST statements to access a database for retrieval and updates
- REPORT statements to
produce customized reports.
For more information, see the SYSTEM 2000 Quick Reference
Guide.
Note:
When you submit SYSTEM 2000 statements through the QUEST procedure,
the statements are subject to SAS syntax rules. For example, statements must
end with a semicolon (;) instead of a colon (:), '/*' and '*/' delimit comments,
and so on. SYSTEM 2000 statements containing a character literal longer than
200 characters are rejected.
Also, if you want to use the single quote or the double quote as the
delimiter in a SYSTEM 2000 where-clause, you must use one of the techniques
described below. Otherwise, the quotes cause ambiguity between the SAS System
parser and the SYSTEM 2000 parser.
A quoted string is required if the SYSTEM 2000 where-clause condition
contains
- a value that is mixed case
- a where-clause keyword, such as AT, AND, or OR in the value, for
example, PRINT ENTRY WHERE C303 CONTAINS 'INSTRUCTOR AT ACC';
- a single quote or a double quote in the
value.
Also, you might want to use quoted strings simply because you are accustomed
to using them in other systems.
To use the single quote or double quote around a value in a where-clause
condition, you can use either of these methods:
- Create a short SYSTEM 2000 Command File that contains the following
two statements, which make the where-clause delimiter the single quote:
DELIMITER IS ';
COMMAND FILE IS INPUT;
- Invoke this Command File once to change the delimiter; the second
statement returns you to your usual way of entering statements in the QUEST
procedure. Running this short Command File at the beginning of your QUEST
session saves you from having to put every statement that contains a quoted
string into a separate Command File.
Note: Commands must be uppercase in a Command File.
- If you do not want to create the
short Command File, you can submit
the following statements from the PROGRAM EDITOR window.
delimiter is '; ';
'x';
You will receive messages from SYSTEM 2000 software and a syntax error,
but after the 'x'; statement finishes processing, you can safely use the single
quote as the where-clause delimiter.
If a value contains a single quote, change the delimiter
to the double quote with one of the methods shown above.
SYSTEM 2000 messages are displayed on the log window, along with SAS
System messages.
The ECHO ON statement displays echoes of SYSTEM 2000 statements in the
output window along with the statement's output. This is convenient for debugging
or interpreting results.
With ECHO OFF, the SYSTEM 2000 statement echoes do not appear in the
output window.
Note: If you use ECHO ON and the MCS statement, often the echo of a
SYSTEM 2000 command will not appear immediately above the output for the command.
|
SYSTEM 2000 Strings and Functions |
You will probably need to modify any existing SYSTEM 2000 strings and
functions for the QUEST procedure because
- the statement terminator must be the semicolon, not the colon.
Any colons embedded in the strings or functions will not work properly. Therefore,
a string or function with embedded statement terminators can be invoked from
within the QUEST procedure or from outside, but not both.
- statements cannot start with the default SYSTEM 2000 separator,
the asterisk. To the SAS System, an asterisk signifies the start of a comment.
You cannot use the percent sign as a system separator; it denotes a macro
statement to the SAS System.
To avoid problems with the system separator, issue the SEPARATOR IS
statement to change the separator. For example, the following statement changes
the separator to the # sign:
separator is #;
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.