I need to calculate a date in RPGLE, call a CL from the RPG passing the date. In the CL is a QMQRY that would like to use this date parm as a variable in the select statement to write to an outfile. I won't have a problem with the RPG or creating the file. The piece of the code in the query looks like this "...and a.ddate = &COND group by a.dstr, a.ddptno..." The CL query looks like this where &DATEIN in the passed date from the RPG and is defined as *char length of 10. STRQMQRY QMQRY(QUERY/DLYITMQRY) OUTPUT(*OUTFILE) + OUTFILE(TEST1/JACKTEST) OUTMBR(*FIRST + *ADD) SETVAR((COND &DATEIN)) In trying to just run the CL passing '2000-12-04' as the parm, the query prompts me for a date (don't understand why when I'm already passing it one). When I enter the same date,it hurls giving me message QWM2701. Anyone ever make this work? thanks - Jack

Reply With Quote