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] Cleaned up some code and now have a FOC 266 error...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Cleaned up some code and now have a FOC 266 error...
 Login/Join
 
Gold member
posted
So I have this piece of code:

-SET &REPORT_ID=&FOCFOCEXEC ;
-MRNOEDIT -INCLUDE report_usage_collect
-RUN
-SET &ECHO = ALL;
SET BYDISPLAY = ON
SET ASNAMES = ON
SET HOLDLIST = PRINTONLY
-*-INCLUDE RESET_FACULTY.FEX
-DEFAULT &TERM_EVENT = 201701- 3 weeks prior to 1st Day of Class
-DEFAULT &STUDENT_TYPE = FOC_NONE

-SET &TERM1 = EDIT(&TERM_EVENT,'999999$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');
-SET &TERM2 = &TERM1-100;
-SET &TERM3 = &TERM1-200;
-SET &EVENT = IF &TERM_EVENT CONTAINS '3 weeks prior to 1st Day of Class' THEN '3 weeks prior to 1st Day of Class' ELSE IF &TERM_EVENT CONTAINS '6 weeks prior to 1st Day of Class' THEN '6 weeks prior to 1st Day of Class' ELSE IF &TERM_EVENT CONTAINS '1st Day of Class' THEN '1st Day of Class';
-TYPE '&TERM1' '&TERM2' '&TERM3' '&EVENT'
-SET &STU_TYPE = IF &STUDENT_TYPE EQ '_FOC_NULL' THEN 'ALL' ELSE &STUDENT_TYPE;

I'm testing out a new &TERM_EVENT date and am having a heck of a time. Frowner

-SET &ECHO = ALL;
SET BYDISPLAY = ON
SET ASNAMES = ON
SET HOLDLIST = PRINTONLY
-DEFAULT &TERM_EVENT = 201809- StableDate
-DEFAULT &STUDENT_TYPE = FOC_NONE
-SET &TERM1 = EDIT(&TERM_EVENT,'999999$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');
-SET &TERM2 = &TERM1-100;
-SET &TERM3 = &TERM1-200;
-SET &EVENT = IF &TERM_EVENT CONTAINS '3 weeks prior to 1st Day of Class' THEN '3 weeks prior to 1st Day of Class' ELSE
IF &TERM_EVENT CONTAINS '6 weeks prior to 1st Day of Class' THEN '6 weeks prior to 1st Day of Class' ELSE
IF &TERM_EVENT CONTAINS '1st Day of Late Registration' THEN '1st Day of Late Registration' ELSE
IF &TERM_EVENT CONTAINS 'StableDate' THEN 'Stable Date' ELSE
IF &TERM_EVENT CONTAINS '1st Day of Class' THEN '1st Day of Class' ELSE 'ERROR' ;
-TYPE '&TERM1' '&TERM2' '&TERM3' '&EVENT'
-SET &STU_TYPE = IF &STUDENT_TYPE EQ '_FOC_NULL' THEN 'ALL' ELSE &STUDENT_TYPE;

I get the error code

SET BYDISPLAY = ON
SET ASNAMES = ON
SET HOLDLIST = PRINTONLY
-DEFAULT &TERM_EVENT = 201809- StableDate
-DEFAULT &STUDENT_TYPE = FOC_NONE
-SET &TERM1 = EDIT(201809- StableDate,'999999$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');
-SET &TERM2 = 201809-100;
-SET &TERM3 = 201809-200;
-SET &EVENT = IF 201809- StableDate CONTAINS '3 weeks prior to 1st Day of Class' THEN '3 weeks prior to 1st Day of Class' ELSE
0 ERROR AT OR NEAR LINE 4 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC266) IF .. THEN .. ELSE .. SYNTAX ERROR


Any thoughts?

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 82 | Location: Abbotsford BC | Registered: March 15, 2010Report This Post
Expert
posted Hide Post
quote:
-SET &EVENT = IF &TERM_EVENT CONTAINS '3 weeks prior to 1st Day of Class' THEN '3 weeks prior to 1st Day of Class' ELSE IF &TERM_EVENT CONTAINS '6 weeks prior to 1st Day of Class' THEN '6 weeks prior to 1st Day of Class' ELSE IF &TERM_EVENT CONTAINS '1st Day of Late Registration' THEN '1st Day of Late Registration' ELSEIF &TERM_EVENT CONTAINS 'StableDate' THEN 'Stable Date' ELSEIF &TERM_EVENT CONTAINS '1st Day of Class' THEN '1st Day of Class' ELSE 'ERROR' ;


Basic error, you forgot to put hypens at the beginning of every DM line, even continuations.

-SET &EVENT = IF &TERM_EVENT CONTAINS '3 weeks prior to 1st Day of Class' THEN '3 weeks prior to 1st Day of Class' ELSE 
-IF &TERM_EVENT CONTAINS '6 weeks prior to 1st Day of Class' THEN '6 weeks prior to 1st Day of Class' ELSE 
-IF &TERM_EVENT CONTAINS '1st Day of Late Registration' THEN '1st Day of Late Registration' ELSE
-IF &TERM_EVENT CONTAINS 'StableDate' THEN 'Stable Date' ELSE
-IF &TERM_EVENT CONTAINS '1st Day of Class' THEN '1st Day of Class' ELSE 'ERROR' ;


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
FYI (not related to your issue that Tony has already solved Smiler )
quote:
-SET &TERM1 = EDIT(&TERM_EVENT,'999999$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');

Can be replaced by
-SET &TERM1 = EDIT(&TERM_EVENT,'999999');

Since you need to exclude everything after the 6th digit, no need to tell the function that you are skipping them.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
Tony thanks for the fix, I hadn't realized the hyphen in a SET command had to be applied to every line!

Martin, I'll use your code, it looks cleaner.

Thanks guys!


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 82 | Location: Abbotsford BC | Registered: March 15, 2010Report This Post
Expert
posted Hide Post
You're welcome Max.

I'll hazard a guess that most FP members have forgotten to do that a few times in their WebFOCUS days!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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] Cleaned up some code and now have a FOC 266 error...

Copyright © 1996-2020 Information Builders