Previous Topic: EDIT CommandNext Topic: EXEC Command


EQUATE Command

                / old-word \
EQuate new-word < phrase   >
                \ null     /

Where:

new-word-alphanumeric token which begins with a letter, and does not include an "&", "@", or "%".

old-word-any word currently defined to the CA IDMS DMLO session. This includes commands, keywords, literals, area-names, record-names, set-names, field-names, or other EQUATE symbols.

phrase-an arbitrary set of tokens which may include any symbols eligible for old-word as above, as well as macro variable symbols ("&" and "@").

NULL-removes the association of new-word from the list of session EQUATEs. You can re-use new-word during the session.

Use the EQUATE command to establish convenient abbreviations for frequently used entities, commands, or partial commands. Some examples of EQUATE usage are listed below.

See the discussion of Extended Command Processing for a more detailed description of the iteration of PF keys, EQUATEs, variables, and command specification.

EQUATE Command Examples
EQUATE EMP EMPLOYEE

This example establishes a simple abbreviation for the record EMPLOYEE. Anywhere the record-name could be used, the EQUATE symbol EMP may appear.

EQUATE OFR OBTAIN FIRST

This example establishes an EQUATE symbol for a partial command. You could enter OFR IN EMP-DEMO-REGION as an acceptable CA IDMS DML command.

EQUATE ONWR OBTAIN NEXT &1 WITHIN &2

This example establishes an EQUATE symbol for partial command. You could enter ONRW EMP &A to result in an effective CA IDMS DML command of OBTAIN NEXT EMPLOYEE WITHIN EMP-DEMO-REGION.

EQUATE Command Rules
  1. EQUATE symbols you define during a session may be preserved in a PROFILE when you end the session. They will then be re-established at the start of subsequent session if you request that PROFILE.
  2. EQUATEs may be nested three deep; i.e., you may EQUATE a symbol to a phrase which includes EQUATE symbols, and some of those symbols may be phrases which include EQUATE symbols which reference phrases.
  3. EQUATE symbols may be incorporated in PF/PA key text.
  4. CLIST variable symbols (%n) may not be contained within EQUATE phrases or as part of EQUATE symbols.