LNCWBM program allows to send, in a Word document, several bookmarks values in a single call.
Syntax
DCL |
VAR(&HANDLE) TYPE(*CHAR) LEN(50) |
DCL |
VAR(&PARM1) TYPE(*CHAR) LEN(512) |
DCL |
VAR(&VAR1) TYPE( . . . |
DCL |
VAR(&VAR2) TYPE( . . . |
DCL |
VAR(&VARN) TYPE( . . . |
|
|
CHGVAR |
VAR(&PARM1) VALUE('bookmark names, and variables formats') |
|
|
CALL |
PGM(LNCWBM) PARM(&HANDLE &PARM1 + &VAR1 &VAR2 . . . &VARN) |
MONMSG |
MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR)) |
Parameters
Parameters |
|
&PARM1 |
Each bookmark value set by the command is displayed in brackets, as to syntax : (Name1:Fnn.dd)(Name2:Fnn.dd) Name
1 and Name 2 are the bookmark names.
If the bookmark values are in a DS variable, then they are showed as follow : DS:((Name 1:Fnn.dd)(Name 2:Fnn.dd)…)
|
&VAR… |
Variables including values to assign to bookmark are over. Variables number and variables order match with what &PARM1 describes.
|
Examples
In the bellow example, program variables :
&ZPOLNV, &INTD, &NAMED, &IDADR1, &ZDVILL, &ACTIVITE
Contain themselves a dedicated bookmark value.
&DS variable is at least a 60 characters variable. The variable contains the values to be assigned to two bookmarks : NAME (position 1 to 20) and ADQUERAB (position 21 to 60).
CHGVAR
VAR(&PARM1) +
VALUE('(ZPOLNV:A10)(ZINTD:A20)(Z NAMED:A20) +
(IDADR1:A20)(ZDVILL:A20)DS:(( NAME:A20)(ADQUERAB:A40)) +
(ACTIVITE:P8.2)')
CALL PGM(LNCWBM) PARM(&HANDLE &PARM1 &ZPOLNV &INTD &NAMED +
&IDADR1 &ZDVILL &DS +
&ACTIVITE)