![]() |
||||||||||||
Go ![]() | New ![]() | Search ![]() | Notify ![]() | Tools ![]() | Reply ![]() | ![]() |
Gold member |
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. ![]() -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 | ||
|
Expert |
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
| |||||||||
|
Virtuoso |
FYI (not related to your issue that Tony has already solved ![]()
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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007 | |||
|
Gold member |
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 | |||
|
Expert |
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
| |||||||||
|
Powered by Social Strata |
![]() | Please Wait. Your request is being processed... |
|