Reserved words and characters

From m204wiki
Revision as of 15:38, 2 January 2014 by JAL (talk | contribs)
Jump to navigation Jump to search

Rules for reserved words and characters

A number of words and characters have special meaning to Model 204 and either cannot be used as part of field names or values or can only be used as part of a quoted string.

The rules for Model 204 reserved words and characters are as follows:

  • Any word or character, including the space character, can be used as part of a field name, except the following:
  • ??
    ?$
    ?&
    @ (as delete character)
    # (as flush character)
    ;

Note: The delete (@) and flush (#) characters used at an installation are controlled by the ERASE and FLUSH parameters (described in the Rocket Model 204 Parameter and Command Reference Manual). If different symbols are chosen, the restriction on using these characters in field names applies to the new symbols.

  • The following list of reserved words or operators can be part of a string-without-quotes as long as they are not surrounded by spaces (ANDIRON is acceptable while AND IRON is not). They can be part of a quoted string as long as they do not stand alone ('A OR B' is acceptable while 'OR' is not). Although field names and values can contain reserved words, requests which reference those fields might not compile, or might produce unexpected results.
  • Reserved words and operators
    AFTER COUNT LIKE ORIF VALUES LT
    ALL EACH NOR RECORD WHERE NE
    AND EDIT NOT RECORDS WITH  
    ANDIF END OCC TAB EQ  
    AT FROM OCCURRENCE THEN GE  
    BEFORE IN ON TO GT  
    BY IS OR VALUE LE  
  • If any of the following reserved characters is embedded in a field name, the character must be part of a quoted string. When creating field names, Rocket Software recommends avoiding the following characters:
  • /* undecipherable, missing/incorrect for years */
    Reserved characters
    $ > +
    ( < - (minus sign/hyphen)
    ) *
    = / ,
    ... : %

How to refer to a field name containing reserved words or characters

As in #Rules for reserved words and characters and #Rules for reserved words and characters, if a field name does contain a reserved word or character, you must enclose it in single quotes when referencing it in a request. For example, the following FIND statement references a field named NOR SLS:

FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0

The following DISPLAY command references a procedure called %SAVINGS:

DISPLAY PROCEDURE '%SAVINGS'