Focal Point
AYM Function in 7.7.1[SOLVED]

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

September 22, 2010, 11:15 AM
Krishna.edara
AYM Function in 7.7.1[SOLVED]
Hi all,
iam using AYM Function in 7.6.2, which is returning fine, the same function returning error in the 7.7.1, can anyone help me, how to modify the bellow function for 7.7.1.

-SET &BEGDATE = IF &MNS GT 0 THEN (AYM(INT(&ENDDATE/100), -&MNTS, 'I6YYM'))*100+1
- ELSE IF &YRS GT 0 AND &YRS LT 15
- THEN &BEGYR | '0101'
- ELSE &BEGDATE;

Thanks,
Krishna.

This message has been edited. Last edited by: Krishna.edara,


WebFocus-8/Windows/HTML, PDF, EXCEL
September 22, 2010, 11:21 AM
njsden
It would really help to know which values you're using for each of the & variables involved so a test case can be created easily.

Also, please use the "code" tags (look at the </> button in the toolbar) when posting code.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
September 22, 2010, 11:23 AM
njsden
In addition, would you please post the exact error code and/or message you're getting?

The less guesswork the better Wink



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
September 22, 2010, 11:25 AM
GamP
What error do you get?
What is the value of the & variables you're using (like &MNS, &ENDDATE, &MNTS, &YRS, &BEGYR and &BEGDATE?
What is the result when you run it in 76?

Please be as complete as you can when asking this kind of questions. Provide the entire code or make a short but complete reproduction of what it is that you're trying to do.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 22, 2010, 12:04 PM
Francis Mariani
You probably need to isolate use of the INT function:

-SET &ENDDATEI = INT(&ENDDATE/100);
-SET &BEGDATE = IF &MNS GT 0 THEN (AYM(&ENDDATEI, -&MNTS, 'I6YYM'))*100+1
- ELSE IF &YRS GT 0 AND &YRS LT 15
- THEN &BEGYR | '0101'
- ELSE &BEGDATE;

You still have a problem with the code - the IF statement is not valid:
- ELSE &BEGDATE;
is not valid.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 22, 2010, 12:36 PM
njsden
You were supposed to substitute &ENDDATEI for INT(&ENDDATE/100) as the 1st argument to AYM (see Francis' code in more detail).

You may also want to add -SET &ECHO=ALL; at the beginning of the code to see what Dialog Manager is doing and what your expression is being resolved as.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
September 22, 2010, 05:50 PM
Waz
I would strongly suggest putting in a case with IBI.

Any differences from one version to another shoudl be highlighted. This way, they can be explained or fixed.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!