Commands and Processing

In this section:

The following table summarizes the available Dialogue Manager commands. Notice that every command begins with a hyphen (-).

The following sections describe the syntax and use of the commands. For an alphabetical list, see Dialogue Manager Quick Reference.

Command

Function

-*

Signals a comment.

-?

Displays the value of local variables.

-AS/400

Executes an IBM i operating system command, ignored on other operating systems.

-CLOSE

Closes an external file opened for reading or writing (an external file is a sequential file in the platform's file system).

-CMS

Executes a CMS operating system command, ignored on other operating systems.

-DEFAULT
-DEFAULTS

Sets a variable to an initial value.

-DOS

Executes a DOS operating system command, ignored on other operating systems.

-EXIT

Executes stacked commands and terminates the procedure. See Dialogue Manager Processing for a definition of stacked commands.

-GOTO

Forces an unconditional branch to a label.

-IF

Determines the execution flow based on the evaluation of an expression (a conditional branch).

-INCLUDE

Calls another Dialogue Manager procedure.

-label

Identifies a section of code that is the target of a -GOTO or -IF.

-PASS

Directly issues and controls passwords.

-PROMPT

Types a message to the terminal (if edastart -t is in use) or creates an input window with the message in a browser if the connection type is HTTP and reads the reply from the user. This reply assigns a value to the variable named.

-QUIT

Terminates the procedure without executing stacked commands.

-READ

Reads data from an external file.

-REMOTE BEGIN

Signals the start of commands on an originating server that are to be sent to a target server. Only available with Hub Services.

-REMOTE END

Signals the end of commands from an originating server.

-REPEAT

Executes a loop.

-RUN

Executes stacked commands and closes any external files opened with -READ or -WRITE.

-SET

Sets a variable to a literal value or to a value computed in an expression.

-SYSTEM

Executes an operating system command regardless of actual operating system type.

-TSO RUN

Executes an MVS operating system command, ignored on other operating systems.

-TYPE

Sends a message to a client application.

-UNIX

Executes a UNIX operating system command, ignored on other operating systems.

-VMS

Executes a VMS operating system command, ignored on other operating systems.

-WINNT

Executes a Windows NT operating system command, ignored on other operating systems.

-WRITE

Writes data to an external file.

-

Line continuation of prior Dialogue Manager command.



x
Dialogue Manager Processing

A procedure processes as follows:



Example: Issuing an API Function Call (EDARPC)

The following is an example of a procedure, with an explanation of the way it processes.

To execute this procedure, a client application issued the API function call EDARPC, specifying the procedure name SLRPT, and the parameters "COUNTRY=ENGLAND,CAR=JAGUAR".

 
1. -IF &COUNTRY EQ 'DONE' THEN GOTO GETOUT;
  
2.  SQL
    SELECT COUNTRY,CAR,MODEL,BODY
    FROM CAR
    WHERE COUNTRY='&COUNTRY' AND CAR='&CAR'
    ORDER BY CAR;
  
3.  TABLE
    ON TABLE PCHOLD
    END
  
4.  -RUN
  
5.  -EXIT
 
    -GETOUT
    -TYPE NO PROCESSING DONE: EXITING SP

The procedure processes as follows:

  1. Values for the variables &COUNTRY and &CAR are passed to the procedure by the function call EDARPC before the first line executes. Dialogue Manager substitutes the value ENGLAND for the variable &COUNTRY in the first line and tests for the value DONE. The test fails, so Dialogue Manager proceeds to the next line.

    If the value were DONE instead of ENGLAND, control would pass to the label -GETOUT, and the message NO PROCESSING DONE: EXITING SP would be sent to the client application. (Dialogue Manager would skip the intervening lines of code.)

  2. The next five lines are SQL. Dialogue Manager scans each for the presence of variables, substituting the value ENGLAND for &COUNTRY and the value JAGUAR for &CAR (remember, those values were passed by EDARPC). As each line is processed, it is placed on a stack to be executed later by the server.
  3. The command ON TABLE PCHOLD sends the answer set to the client application.

    The command END delimits ON TABLE PCHOLD.

    After Dialogue Manager processes the command END, the stacked commands look like this:

    SQL
    SELECT COUNTRY,CAR,MODEL,BODY
    FROM CAR
    WHERE COUNTRY='ENGLAND' AND CAR='JAGUAR'
    ORDER BY CAR;
    TABLE
    ON TABLE PCHOLD
    END

    The next line is then processed by Dialogue Manager.

  4. The Dialogue Manager command -RUN sends the stacked commands to the server for execution.
  5. The Dialogue Manager command -EXIT terminates the procedure.

iWay Software