Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Report Caster calling for a parameter when the report runs without?
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Report Caster calling for a parameter when the report runs without?
 Login/Join
 
Member
posted
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 amper-variables 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 current-date.

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 &CYEAR||00 ELSE &TERM;
-SET &TERM = IF &CMODY GT '0401' THEN &CYEAR||30 ELSE &TERM;
-SET &TERM = IF &CMODY GT '0801' THEN &CYEAR||50 ELSE &TERM;
-SET &TERM = IF &CMODY GT '0815' THEN &CYEAR||70 ELSE &TERM;
-SET &TERM = IF &CMODY GT '1001' THEN &CYEAR||90 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
 
Posts: 12 | Registered: June 16, 2016Reply With QuoteReport This Post
Member
posted Hide Post
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:

-*---------------GET-DATE-------------------
-SET &CYEAR = EDIT (&YYMD.EVAL, '9999');
-SET &PYEAR = &CYEAR - 1;
-SET &CMONTH = EDIT (&YYMD.EVAL, '$$$$99$$');
---*----------------------Cal Mo-------Year Term-
-SET &TERM = 201600;
-SET &TERM = IF &CMONTH EQ '01' THEN &PYEAR||60 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '02' THEN &PYEAR||60 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '03' THEN &PYEAR||60 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '04' THEN &PYEAR||60 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '05' THEN &PYEAR||60 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '06' THEN &PYEAR||60 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '07' THEN &CYEAR||20 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '08' THEN &CYEAR||20 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '09' THEN &CYEAR||20 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '10' THEN &CYEAR||20 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '11' THEN &CYEAR||20 ELSE &TERM;
-SET &TERM = IF &CMONTH EQ '12' THEN &CYEAR||20 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
 
Posts: 12 | Registered: June 16, 2016Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 12 | Registered: June 16, 2016Reply With QuoteReport This Post
Guru
posted Hide Post
Try changing the code
-SET &TERM = '0'; to

-SET &TERM = '000000
';


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Report Caster calling for a parameter when the report runs without?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.