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.
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.