SYSTEM 2000 statements in PROC QUEST might be any valid SYSTEM 2000 statement that
is available in the
Self-Contained Facility, which includes the following:
-
CONTROL statements to save and restore databases, to assign passwords and authorities, to
create and remove indexes, and so on,
-
-
QUEST statements to access a database for retrieval and updates
-
REPORT statements to produce customized reports
For more information,
see the Quick Reference Guide.
Note: When you submit SYSTEM 2000
statements in PROC QUEST, the statements are subject to SAS syntax
rules. For example, you must end statements with a semicolon (;) instead
of a colon (:), use '/*' and '*/' to delimit comments,
and so on. SYSTEM 2000 statements that contain a character literal
that is more than 200 characters in length are rejected. If you want
to use a single quotation mark (') or double (closing) quotation
marks (”) as the delimiter in a SYSTEM 2000 where-clause, you
must use one of the techniques described below. Otherwise, quotation
marks cause ambiguity between the SAS parser and the SYSTEM 2000 parser.
A quoted
string is required if the SYSTEM 2000
where-clause condition contains any of the following:
-
a value that is specified in mixed
case
-
a where-clause keyword, such as OR, AT, or AND, in the value. For example, PRINT ENTRY
WHERE C303 CONTAINS 'INSTRUCTOR AT ACC';
-
a single quotation mark (')
or double (closing) quotation marks (”) in the value
You might want to use
quoted strings because you are accustomed to using them in other systems.
To use a single quotation mark (') or double (closing) quotation marks (”) around
a value in a where-clause condition, you can use either of the following methods:
-
Create a short SYSTEM 2000 Command File that contains the following two statements,
which make the where-clause
delimiter a single quotation mark ('):
DELIMITER IS ';
COMMAND FILE IS INPUT;
Invoke this short Command File one time to change the delimiter; the second statement
returns you to your usual way of entering statements in PROC
QUEST. By running this short Command File at the beginning of a PROC QUEST
session, you do not have to put every statement that contains a quoted string into a separate
Command File.
Note: SYSTEM 2000 commands in a
Command File must be specified in uppercase or a syntax error occurs.
-
If you do not want to create the short Command File, you can submit the following
statements from the Program Editor:
delimiter is '; ';
'x';
You will receive messages from SYSTEM 2000 and a
syntax error warning, but, after the 'X' statement finishes processing, you can safely use
single quotation marks (' ') as the where-clause delimiter.
If a value contains a single quotation mark, change the delimiter to double quotation
marks (” ”) by using one of the preceding methods.