When a conversation is opened with LNCOPEN, LNCCMD program allows command to be sent to PC.
This is the main program call that application will repeat until connection is closed with LNCCLOSE.
Syntax
DCL |
VAR(&HANDLE) TYPE(*CHAR) LEN(50) |
DCL |
VAR(&CMD) TYPE(*CHAR) LEN(10) |
DCL |
VAR(&OPT) TYPE(*CHAR) LEN(1) |
DCL |
VAR(&PARM1) TYPE(*CHAR) LEN(512) |
DCL |
VAR(&PARM2) TYPE(*CHAR) LEN(1024) |
DCL |
VAR(&RESULT) TYPE(*CHAR) LEN(512) |
|
|
CHGVAR |
VAR(&CMD) VALUE('Command') |
CHGVAR |
VAR(&OPT) VALUE('Option') |
CHGVAR |
VAR(&PARM1) VALUE('First parameter') |
CHGVAR |
VAR(&PARM2) VALUE('Second parameter') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1+ &PARM2 &RESULT) |
MONMSG |
MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR)) |
Parameters
Parameters |
|
|
HANDLE (E) |
|
Descriptor returned by LNCOPEN function or *ONLY. |
CMD |
E |
Command to run on PC key word. See : Commands list |
OPT |
E |
Option value according to the referenced &CMD command. |
PARM1 PARM2 |
E E |
These parameters are assigned according to specified key word in &CMD parameter. See each key word detail in Commands list |
RESULT |
S |
Returned result, if the requested command returns a value or a message. |
|
|
|