Previous Topic: Variable Symbol RestrictionsNext Topic: Operation


Command Processing Examples

This section provides a variety of command processing examples:

Examples 1-4 Assume That The Following Equate Is In Effect:

EQUATE ONRW OB NEXT &1 IN &2

Example #1

Command Line Entry

ONRW VENDOR &A

Key Pressed

ENTER

Result

Execute

Example #2

Command Line Entry

ONRW VENDOR &A

Key Pressed

PF5

Result

Assign ONRW VENDOR &A to PF5

Execute OBT NEXT VENDOR IN &A

Note: Because the phrase represented by ONRW begins with a verb (OBT), CA IDMS DMLO assigns the text to PF5 regardless of whether PF5 already had text associated with it.

Example #3

Command Line Entry

ONRW

Key Pressed

PF5

Result

Assign ONRW to PF5 (See note above). No execution of CA IDMS DML command (unresolved variables).

Example #4

Command Line Entry

VENDOR ?S

Key Pressed

PF5

Result

Create command ONRW VENDOR ?S (by concatenating PF text ahead of the command line text).

Execute OBT NEXT VENDOR IN ?S (results in SET selection list).

Note: Because the command line entry did not begin with a verb, no assignment of text to PF5 was made, but rather currently assigned text was used.

Examples 5-7 Assume That The Following Equates And Pf Key Assignments Are In Effect:

EQUATE ONWP OBT NEXT LR-WARE-PART
EQUATE OLRW OBT &1 LR-VEND-PART
EQUATE XWHE WHERE @1 = @2 OR @1 = @3
  PF4  ONWP
  PF5  OLRW
  PF6  OLRW XWHE

Example #5

Command Line Entry

WHERE WAREHSE-NBR = '012'

Key Pressed

PF4

Result

Execute OBT NEXT LR-WAREHSE-PART WHERE WAREHSE-NBR = '012'

Example #6

Command Line Entry

FIRST

Key Pressed

PF5

Result

Execute OBT FIRST LR-VEND-PART

Note: The concatenation of PF text is ahead of command line text giving OLRW FIRST. All EQUATE phrases are expanded giving:

OBT &1 LR-VEND-PART FIRST

&1 <----(variable substitution)

After performing the substitution as indicated, the resultant command as shown above is executed.

Example #7

Command Line Entry

FIRST PART-SUFFIX 6 7

Key Pressed

PF6

Result

Execute

OBT FIRST LR-VEND-PART
WHERE PART-SUFFIX = 6 OR
PART-SUFFIX = 7

Note: The concatenation of PF text is ahead of command line text giving OLRW XWHE FIRST PART-SUFFIX 6 7.

ALL EQUATE phrases are expanded, giving:

OBT &1 LR-VEND-PART
WHERE @1 = @2 OR @1 = @3    FIRST   PART-SUFFIX     6       7

(variable substitution)---─► @1 @1 @2 @3

After performing the substitution as indicated, the resultant command as shown above is executed.