ProvideX V8.20 > Language Reference > 9. Special Command Tags
800
The following example illustrates the use of an EXECUTE "[WDX]statement" in an
application on the host/server to define a MNEMONIC directive locally on the
WindX client:
IF WDX%<>$00$ THEN EXECUTE "[WDX]MNEMONIC(LFO)'5X'=$1B+hex$" ELSE GOTO MY_LABEL
The following example sets the 'B0' System Parameter, p.654, on a WindX PC using
a [WDX] command from a UNIX host:
EXECUTE "[wdx]SET_PARAM 'B0'"
Note: If you run your application with `B0' set, make sure that it is set on both the host
and the WindX PC. Otherwise, the wrong windows will be addressed. (You can set 'B0'
either by executing it from the host, as in the example, or by using -B0 as an
argument on the WindX PC's startup command line.
Format 3: Call Subprogram
CALL "[WDX]subprog",params
This format enables the server to CALL a subprogram that exists and runs remotely on
the client. It is true distributed processing. The server's files and global variables are
not accessible to your subprogram. Your remote call passes parameters back and forth,
not data files. You can pass a maximum of 20 parameters/arguments, in a
comma-separated list.
For example, you can call applications like special printer device drivers you have
built on the client to handle print mnemonics:
CALL "[WDX]*dev/your_driver_name"
You can use a similar format to call the ProvideX *WindX.utl (utility) functions.
For further information, see Format 10: [WDX] and *WindX.utl, p.802,
[WDX]*WINDEV* Escape Sequences, p.754.
Format 4 & 5: Open Files, Serial Ports on Client
OPEN (chan[,fileopt])"[WDX]filename"
OPEN (chan,OPT=settings$)"[WDX]port_id"
Use this format in programs running on your server when you're opening remote
files or ports. That is, using [WDX] as a prefix to the pathname of your file (or port,
etc.) tells WindX to open it remotely on the client. WindX automatically forwards
requests (i.e., file I/O directives) for processing.
Reminder: When you need a statement that is not supported on a WindX PC,
encapsulate your commands in an EXECUTE "[WDX]..." directive or design your
applications to run remotely on the client.
Examples:
The following example opens a remote file,
OPEN (1)"[WDX]CLIENT_PATH\CLIENT_FILE"