Eric Lehti
VIP Member
parameters supplied to *QMQRY query management objects from Processing Options in DREAM writer
I finally succeeded in passing Julian Dates as parameters from Processing Options in DREAM writer to *QMQRY query management objects!
1. at menu G81 option 2 create a DREAM writer P55PROFIT even though you will not need or use a P55PROFIT RPG program.
2. at menu G81 option 3 set up your Processing Options for P55PROFIT. I want processing option 1 to convert my entered MM/DD/YY date to JDE julian format. e.g. 06/01/09 -> 109152
I want processing option 2 to convert my entered MM/DD/YY date to JDE julian format. e.g. 06/30/09 -> 109181.
Specify field name TRDJ and Date format 2 to accomplish this conversion.
3. in SVR, clone a new CL J55PROFIT from JDFSRC/JDESRC(J98MODEL4 ).
My CL program J55PROFIT needs these statements:
DCL VAR(&PSOPT1 ) TYPE(*CHAR) LEN(25)
DCL VAR(&PSOPT2 ) TYPE(*CHAR) LEN(25)
CALL PGM(P98CLOPT) PARM(&PSPID &PSVERS &PSOPT1 &PSOPT2
&PSOPT3 & & & & &
& & & & & &
& & & & & &
& & & & & &
& & & & )
STRQMQRY QMQRY(J55PROFIT) OUTPUT(*OUTFILE) +
OUTFILE(AMSDTA/F55PROFIT) SETVAR((BEGIN +
&PSOPT1 ) (END &PSOPT2 ))
The goal is to pass processing options 1 and 2 into the QMQRY object.
SEU edit a source member J55PROFIT type QMQUERY
select yada,yada,yada FROM F42119 WHERE SDADDJ BETWEEN &BEGIN AND &END
CRTQMQRY the source member type QMQUERY to object type *QMQRY
When you run the program it selects from f42119 and writes to data file F55PROFIT.
I finally succeeded in passing Julian Dates as parameters from Processing Options in DREAM writer to *QMQRY query management objects!
1. at menu G81 option 2 create a DREAM writer P55PROFIT even though you will not need or use a P55PROFIT RPG program.
2. at menu G81 option 3 set up your Processing Options for P55PROFIT. I want processing option 1 to convert my entered MM/DD/YY date to JDE julian format. e.g. 06/01/09 -> 109152
I want processing option 2 to convert my entered MM/DD/YY date to JDE julian format. e.g. 06/30/09 -> 109181.
Specify field name TRDJ and Date format 2 to accomplish this conversion.
3. in SVR, clone a new CL J55PROFIT from JDFSRC/JDESRC(J98MODEL4 ).
My CL program J55PROFIT needs these statements:
DCL VAR(&PSOPT1 ) TYPE(*CHAR) LEN(25)
DCL VAR(&PSOPT2 ) TYPE(*CHAR) LEN(25)
CALL PGM(P98CLOPT) PARM(&PSPID &PSVERS &PSOPT1 &PSOPT2
&PSOPT3 & & & & &
& & & & & &
& & & & & &
& & & & & &
& & & & )
STRQMQRY QMQRY(J55PROFIT) OUTPUT(*OUTFILE) +
OUTFILE(AMSDTA/F55PROFIT) SETVAR((BEGIN +
&PSOPT1 ) (END &PSOPT2 ))
The goal is to pass processing options 1 and 2 into the QMQRY object.
SEU edit a source member J55PROFIT type QMQUERY
select yada,yada,yada FROM F42119 WHERE SDADDJ BETWEEN &BEGIN AND &END
CRTQMQRY the source member type QMQUERY to object type *QMQRY
When you run the program it selects from f42119 and writes to data file F55PROFIT.