Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Defines and If Then Syntax Errors

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Defines and If Then Syntax Errors
 Login/Join
 
Silver Member
posted
I'm trying to make a 'temporal' (spatial) chart which uses day of week as the X Axis, and Time of day as the Y Axis.

Obviously, I don't want a row in that grid for every minute that's possible, but would like to group times in one hour increments.

My idea is to create a field, every time value that meets the selection criterion that would tally a temporary variable for the hour increment it's in.

IE the time (24hour format) reports as 2330 it would add one to the field 'HOUR23'. Time 0330 would tally 'HOUR03', etc..

I've tried a couple of different things :

DEFINE FILE CRIME_INCIDENT_REPORT_HOURLY_TALLIES ADD
HOUR00/A4V=
IF CRIME_INCIDENT_REPORT_HOURLY_TALLIES.ANSWERSET1.FROM_TIME FROM 0 TO 99 THEN 
HOUR00 + 1;
END
 


Or :

DEFINE FILE CRIME_INCIDENT_REPORT_HOURLY_TALLIES ADD
HOUR00/A4V=
IF CRIME_INCIDENT_REPORT_HOURLY_TALLIES.ANSWERSET1.FROM_TIME GE 0000 AND CRIME_INCIDENT_REPORT_HOURLY_TALLIES.ANSWERSET1.FROM_TIME LT 0100
HOUR00 + 1;
END
 


All of the ways that I've tried to do this I end up w/ a (FOC266) IF .. THEN .. ELSE .. SYNTAX ERROR

Without getting into the issues of logic, what am I doing wrong in a syntax sense? I presume I'm actually going to have to incorporate day of week into this situation (Hour00Mon type of situation) also, but I can work on that if I can get over the first syntax hurdle.

Finally, what is the most accessible resource to look at for syntax issues like this? I've looked through many different documentation sources but haven't found anything that's working for me yet.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
 
Posts: 40 | Location: Kansas City, MO | Registered: June 10, 2013Report This Post
Virtuoso
posted Hide Post
quote:
HOUR00/A4V=
IF CRIME_INCIDENT_REPORT_HOURLY_TALLIES.ANSWERSET1.FROM_TIME FROM 0 TO 99 THEN
HOUR00 + 1;


You get an error because of the format of HOUR00. It should be I4 and not A4V.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Silver Member
posted Hide Post
In my original attempt at this I had it as an I4 value and got the 'Comparison between computational and alpha values....' blah blah.

Short answer : I thought I would get something more descriptive than 'Syntax Error' if it were the format. Changing it over to I4 actually attempted to evaluate the expression so i'm past the syntax issues there.

Thanks Danny!


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
 
Posts: 40 | Location: Kansas City, MO | Registered: June 10, 2013Report This Post
Silver Member
posted Hide Post
quote:
DEFINE FILE CRIME_INCIDENT_REPORT_HOURLY_TALLIES ADD
HOUR00/A4V=
IF CRIME_INCIDENT_REPORT_HOURLY_TALLIES.ANSWERSET1.FROM_TIME GE 0000 AND CRIME_INCIDENT_REPORT_HOURLY_TALLIES.ANSWERSET1.FROM_TIME LT 0100
HOUR00 + 1;
END

There is no "THEN" in this expression. Try adding THEN before the HOUR00 + 1 and see what happens.


8009
Windows, HTML, AHTML, Excel
In FOCUS since 1983
 
Posts: 41 | Location: Charlotte, NC | Registered: January 06, 2012Report This Post
Silver Member
posted Hide Post
I ended up using the From / To example, but I think your observation of the missing 'Then' explains part of why I couldn't get the 2nd one to work.

I'll try it that way (with the then added) also. Thanks for the observations, both of you.


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
 
Posts: 40 | Location: Kansas City, MO | Registered: June 10, 2013Report This Post
Virtuoso
posted Hide Post
In a computational IF ... clause (in a -SET statement), you should always specify the values for both possible conditions (THEN ... ELSE ...).
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Defines and If Then Syntax Errors

Copyright © 1996-2020 Information Builders