Can't figure out compile error. I know its in the subtraction of - 30, but can't figure out how to declare variable correctly for it to work. Thanks, Keith 100 PGM 2100 DCL VAR(<ODAY) TYPE(*CHAR) LEN(4) 2200 DCL VAR(&LJUNK1) TYPE(*CHAR) LEN(8) 2300 DCL VAR(&LJUNK2) TYPE(*CHAR) LEN(23) 2301 DCL VAR(&DAYS) TYPE(*CHAR) LEN(2) VALUE('30') 2304 DCL VAR(&LDTE) TYPE(*CHAR) LEN(4) 2305 DCL VAR(&DDATE) TYPE(*CHAR) LEN(8) 2503 2512 /************************************************** ********************/ 2513 /* What day is it today? */ 2514 /* When this call is complete, <ODAY will contain the number of */ 2515 /* days between today and Oct 14th, 1582. */ 2516 /* Subtract 30 days from today. */ 2517 /* Convert back to YYYYMMDD. */ 2518 /************************************************** ********************/ 2519 CALLPRC PRC(CEELOCT) PARM(<ODAY &LJUNK1 &LJUNK2 *OMIT) 2528 CHGVAR VAR(<ODAY) VALUE(<ODAY - &DAYS) 2530 CALLPRC PRC(CEEDAYS) PARM((<ODAY) ('YYYYMMDD') + 2531 (&DDATE) (*OMIT)) 2532 10300 /************************************************** ********************/ 10400 /* Send message to Qsysopr for result. */ 10500 /************************************************** ********************/ 10700 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('New + 10800 Date: ' *CAT &DDATE) TOMSGQ(*SYSOPR) 11000 11100 ENDPGM * * * * E N D O F S O U R C E * * * *

Reply With Quote