

Go  New  Search  Notify  Tools  Reply 
Member 
Here's my code. If I run this by hand it calls for no parameters and outputs a report including several recent terms based on the current system date. When I attempt to run it via report caster it instead gives an error: BTP1020 (FOC295) A VALUE IS MISSING FOR: &TERM I'm boggled, because I set a number of ampervariables in this code, but only &TERM is coming back empty. If I supply a parameter it overrides the code below and spits out a report based on that entry instead of the currentdate. Relevant Chunk of Code follows:  *Automatic Term Updates SET &CDATE = &YYMD.EVAL; SET &CYEAR = EDIT (&CDATE, '9999'); SET &CMON = EDIT (&CDATE, '$$$$99'); SET &CMODY = EDIT (&CDATE, '$$$$9999'); *This parses out the current date and uses it to specify a starting term *Terms take a format like this: 201620 201630 201680 etc.... SET &TERM = '0'; SET &TERM = IF &CMODY LE '0401' THEN &CYEAR00 ELSE &TERM; SET &TERM = IF &CMODY GT '0401' THEN &CYEAR30 ELSE &TERM; SET &TERM = IF &CMODY GT '0801' THEN &CYEAR50 ELSE &TERM; SET &TERM = IF &CMODY GT '0815' THEN &CYEAR70 ELSE &TERM; SET &TERM = IF &CMODY GT '1001' THEN &CYEAR90 ELSE &TERM; *End Automatic Term Updates MATCHES AND REPORT OUTPUT FOLLOW  CONFIRMED TO BE WORKING JUST FINE.This message has been edited. Last edited by: CAWarner, WebFOCUS 8202 Windows, All Outputs  

Member 
For a counterexample, this code also demands a &TERM parameter when run in report caster, but when one is supplied the SET commands correctly override it and produce a report based on the current date: *GETDATE SET &CYEAR = EDIT (&YYMD.EVAL, '9999'); SET &PYEAR = &CYEAR  1; SET &CMONTH = EDIT (&YYMD.EVAL, '$$$$99$$'); *Cal MoYear Term SET &TERM = 201600; SET &TERM = IF &CMONTH EQ '01' THEN &PYEAR60 ELSE &TERM; SET &TERM = IF &CMONTH EQ '02' THEN &PYEAR60 ELSE &TERM; SET &TERM = IF &CMONTH EQ '03' THEN &PYEAR60 ELSE &TERM; SET &TERM = IF &CMONTH EQ '04' THEN &PYEAR60 ELSE &TERM; SET &TERM = IF &CMONTH EQ '05' THEN &PYEAR60 ELSE &TERM; SET &TERM = IF &CMONTH EQ '06' THEN &PYEAR60 ELSE &TERM; SET &TERM = IF &CMONTH EQ '07' THEN &CYEAR20 ELSE &TERM; SET &TERM = IF &CMONTH EQ '08' THEN &CYEAR20 ELSE &TERM; SET &TERM = IF &CMONTH EQ '09' THEN &CYEAR20 ELSE &TERM; SET &TERM = IF &CMONTH EQ '10' THEN &CYEAR20 ELSE &TERM; SET &TERM = IF &CMONTH EQ '11' THEN &CYEAR20 ELSE &TERM; SET &TERM = IF &CMONTH EQ '12' THEN &CYEAR20 ELSE &TERM; * I still have no idea why it's only coming asking for &TERM other than that &TERM is used in a WHERE statement further down to sort out data by term. WebFOCUS 8202 Windows, All Outputs  

Member 
Report Caster is somehow running a cached version of the report that is not reflecting my changes! There is no connection between the problem and the code I've posted here. When I've run out of ideas trying to solve that problem I'll come back with a more useful question! WebFOCUS 8202 Windows, All Outputs  

Guru 
Try changing the code SET &TERM = '0'; to SET &TERM = '000000 '; WF 7.6.11 Oracle WebSphere Windows NT5.2 x86 32bit  

Powered by Social Strata 
Please Wait. Your request is being processed... 