Program LNCSETKW inserts into variable &PARMx, an expression in the form: 'KeyWord=Value'.
With LNCSETKW make easier the construction of the parameters need for program LNCCMD.
If the keyword already exists in &PARMx, its value is replaced.
Syntax
DCL |
VAR(&HANDLE) TYPE(*CHAR) LEN(50) |
DCL |
VAR(&PARMX) TYPE(*CHAR) LEN(512) |
DCL |
VAR(&KEYW) TYPE(*CHAR) LEN(...) |
DCL |
VAR(&TYPE) TYPE(*CHAR) LEN(10) |
DCL |
VAR(&VALUE) TYPE( . . . |
DCL |
VAR(&FORMAT) TYPE(*CHAR) LEN(10) |
|
|
CALL |
PGM(LNCSETKW) PARM(&HANDLE &PARMX + &KEYW &TYPE &VALUE &FORMAT) |
Parameters
Parameters |
|
&PARMX |
&PARMX
is the variable to change. This variable will be used in a call to LNCCMD. |
&KEYW |
&KEYW
contains the keyword to insert in &PARMX.. Example: CHGVAR VAR(&KEYW) VALUE('Pattern;') If &KEYW is blank, value of parameter &VALUE will be added to &PARMX, with a semicolon before (;) if &PARMX is not empty. |
&TYPE |
&TYPE
is the type of the value given to the keyword. *STR: Character string type; Double quotes ("") will be added to the value given in parameter &VALUE. *DEC: Numeric; *BOO:
Boolean; &VALUE contain value : *CAT: Value of &VALUE will be concatenated to the value already set in &PARMX for the keyword. *CLR: The keyword and its value are deleted from &PARMX. |
&VALUE |
Contains the value to affect to Keyword |
&FORMAT |
Format
of parameter &VALUE, in the form : Tn.d |
|
|
Example
After the execution of the following code :
CHGVAR VAR(&PARPM1)
VALUE(' ')
CHGVAR VAR(&KEYW) VALUE('Title ')
CHGVAR VAR(&TYPE) VALUE('*STR')
CHGVAR VAR(&VALUE) VALUE('Open a document')
CHGVAR VAR(&FORMAT) VALUE('A50')
CALL PGM(LNCSETKW) PARM(&HANDLE &PARM1 +
&KEYW &TYPE &VALUE &FORMAT)
CALL PGM(LNCSETKW) PARM(&HANDLE &PARM1 +
'FileMustExist' '*BOO ' '1')
Variable &PARM1 has value:
'Title="Open
a document";FileMustExist=True'