Focal Point
Issue with dialogue manager's IF

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3111030822

May 15, 2007, 02:39 AM
Prasanna
Issue with dialogue manager's IF
All,
I am having 6 tables in my fex.I am using dialogue manager to manipulate the date.In this DM i have a IF condition. If i keep the IF condition then the report output is showing as NO HTML OUTPUT. But the IF condition is working.
if i remove the IF condition from DM, then i am getting all the 6 tables output without issue.
Following is the DM script i am using.
-SET &ENDDATE = DATECVT((DATEADD((DATECVT(&MDYY,'I8MDYY','MDYY')), 'M', -3)),'MDYY','I8MDYY');
-SET &ENDMON = DATECVT((DATEMOV((DATECVT(&ENDDATE,'I8MDYY','MDYY')),'EOM')),'MDYY','I8YYMD');
-SET &ENDMONTH = EDIT(&ENDMON,'$$$$99$');
-SET &STRTDTE = DATECVT((DATEMOV((DATECVT(&ENDDATE,'I8MDYY','YYMD')),'BOY')),'YYMD','I8YYMD');
-SET &LAGMON = DECODE &ENDMONTH(01 Jan 02 Feb 03 Mar 04 Apr 05 May 06 Jun 07 Jul 08 Aug 09 Sep 10 Oct 11 Nov 12 Dec ELSE OTHERS);
-SET &PREVYREND = DATECVT((DATEADD((DATECVT(&STRTDTE,'I8YYMD','YYMD')), 'D', -1)),'YYMD','I8YYMD');
-SET &PREVYRBEG = DATECVT((DATEMOV((DATECVT(&PREVYREND,'I8YYMD','YYMD')),'BOY')),'YYMD','I8YYMD');
-IF &LAGMON EQ 'DEC' GOTO CYEAR ELSE
-GOTO PYEAR;
-PYEAR
-SET &REPTYEAR = EDIT(&PREVYRBEG,'9999$$$$');
-SET &REPTYR = EDIT(&PREVYRBEG,'$$99$$$$');
-SET &REPTMN = EDIT(&PREVYRBEG,'$$$$99$$');
-SET &REPTMON = DECODE &REPTMN(01 Jan 02 Feb 03 Mar 04 Apr 05 May 06 Jun 07 Jul 08 Aug 09 Sep 10 Oct 11 Nov 12 Dec ELSE OTHERS);
-TYPE 'HI';
-GOTO EXIT;
-CYEAR
-SET &REPTYEAR = EDIT(&STRTDTE,'9999$$$$');
-SET &REPTYR = EDIT(&STRTDTE,'$$99$$$$');
-SET &REPTMN = EDIT(&STRTDTE,'$$$$99$$');
-SET &REPTMON = DECODE &REPTMN(01 Jan 02 Feb 03 Mar 04 Apr 05 May 06 Jun 07 Jul 08 Aug 09 Sep 10 Oct 11 Nov 12 Dec ELSE OTHERS);
-TYPE 'HAI';
-EXIT

Did anybody face same issue or any forum discussion that already exists, then do let me know.
Regards


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP


May 15, 2007, 02:51 AM
Tony A
Your decode is incorrectly syntaxed and should have single quotes around the alphanumeric content. As the previous EDIT function for &REPTMN will give you alpha then you need the quotes around this component as well -
-SET &REPTMON = DECODE &REPTMN('01' 'Jan' '02' 'Feb' '03' 'Mar' '04' 'Apr' '05' 'May' '06' 'Jun' '07'
-'Jul' '08' 'Aug' '09' 'Sep' '10' 'Oct' '11' 'Nov' '12' 'Dec' ELSE 'OTHERS');


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 
May 15, 2007, 03:06 AM
Alan B
I cannot see a problem here. The DECODE will work without the quotes, a space separation should be fine, would only be an issue if there were spaces in the decode items.

Can you explain a bit more what is happening for you please.


Alan.
WF 7.705/8.007
May 15, 2007, 03:45 AM
Prasanna
Alan,
Now the issue is resolved. There was a problem because of Lables. Once i changed the labels it worked well, i am able to see report outputs with same if conditions. I used -EXIT for completing the DM statements. As per the help menu following is the definition for -EXIT
"-EXIT executes the stacked commands. The output is sent to the WebFOCUS client application and the procedure is terminated."
So after executing the DM statements once if find -EXIT it terminated the entire process.

Regards


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP