You can select a resource from a list of resources by clicking on the arrow icon beside this field.
The EC Gateway has the capability to run multiple processes simultaneously. The Resource command inquires, locks, and releases resources for allocation to specific processes. A named window can be created. The Inquire action will return a status, and the Release action will remove it. The following parameters can be defined from this window
Field |
Description |
---|---|
Label |
Specifies the unique label of this process command. This label allows other commands to branch to this command. The label that you type here appears in the Label column on the EC Gateway Process Window. |
Disable command |
Disabling the command will allow temporary modification of the process statements. This allows for testing of the statements for error-free robustness. The command that has been disabled will not show in the script file (.pfs file). |
Resource |
The named window in question. You can select a Resource from a list of resources by clicking on the arrow icon beside this field. |
Action |
Action to be performed. You can select an action by clicking on the arrow icon beside the field. The choices include Create, Inquire, and Release. |
To use the Resource command, follow these steps:
Choose a variable from Resource-1 to Resource-10.
Use the Resource Inquire command to determine if another process is locking the resource. If another process is locking the resource, the Inquire command will return a failure message in the LastStatus field. If there is not another process locking the resource, the Inquire command will return a success message in the LastStatus field.
Use the Resource Lock command to place a mutex lock using the alphanumeric string assigned to the Resource-N variable. This command waits indefinitely until the resource is free and can be locked.
Use the Resource Release command to release a lock previously set by the Resource Lock command.
Processes should not perform an Inquire after a successful
lock. The Resource commands do not display any windows, so in order
to test resource commands you must develop a process script using
the resource commands, run the script from two different DOS windows,
and observe the interaction of the two scripts