Allows to change some properties for the current LAUNCHER Office connexion.
So, you can change the LNCCMD command parameters size of LNCCMD.
Syntax
CHGVAR |
VAR(&CMD) VALUE('PROPERTY') |
CHGVAR |
VAR(&PARM1) VALUE(' PARMSIZE(Parm1_Size,Parm2_Size,Result_Size) ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
Property
to change for the current LAUNCHER connexion. PARMSIZE(Parm1_Size,Param_Size,Result_Size) changes the size of the parameters Parm1, Parm2 and Result, used when calling the program LNCCMD. By default, the parameters size are : • 512 for Parm1, • 1024 for Parm2, • 512 for Result. If
the given size for a parameter is null, the property is not changed for that
parameter.
|
Note
PROPERTY has no effect when using LNCCMD commands. It is necessary to use : CALL PGM(LNCCMD).
The LNCCMD command is defined with 512 characters for PARM1. The interpreter of the OS thus prevents the execution if superior.
In summary :
Add the following definitions at the beginning of your CL.
DCL VAR(&HANDLE) TYPE(*CHAR) LEN(50) VALUE('*ONLY')
DCL VAR(&CMD) TYPE(*CHAR) LEN(10)
DCL VAR(&OPT) TYPE(*CHAR) LEN(1)
DCL VAR(&PARM1) TYPE(*CHAR) LEN(2000)
DCL VAR(&PARM2) TYPE(*CHAR) LEN(2000)
DCL VAR(&RESULT) TYPE(*CHAR) LEN(512)
When you need to send more than 512 characters, use :
CALL PGM(LNCCMD)and not the LNCCMD command
For instance, into your program, replace :
LNCCMD CMD(FILEWRITE) PARM1(&FILEWRITE)
By :
CALL PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &FILEWRITE &PARM2 &RESULT)
Example
DCL |
VAR(&PARM1) TYPE(*CHAR) LEN(256) |
DCL |
VAR(&PARM2) TYPE(*CHAR) LEN(256) |
DCL |
VAR(&RESULT) TYPE(*CHAR) LEN(512) |
|
|
CHGVAR |
VAR(&CMD) VALUE('PROPERTY') |
CHGVAR |
VAR(&PARM1) VALUE('PARMSIZE(256,256,512)') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 &PARM2 &RESULT) |