Focal Point
[SOLVED] DEFINE w/HDATE causing agent to crash

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

February 13, 2014, 04:56 PM
Rhonda
[SOLVED] DEFINE w/HDATE causing agent to crash
What should not have worked did! FOCMAGIC?!
It was missing another set of parens around the function. This is code that from 5.2.5
Thanks for all of your help everyone.

MODCCD/YYMD = IF CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P'
THEN (HDATE(CLSD_D,'YYMD')) ELSE '19000101';
ClaimClosedDate/MDYY = IF CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P'
THEN (HDATE(CLSD_D,'MDYY')) ELSE '0' ;
-*****************************************
This is a DEFINE that we have in a Reporting Object. It causes an agent to crash.
Unknown error occurred. Agent on reporting server AIXSERVE may have crashed or request was halted by the operator. Please investigate reporting server log.
The first DEFINE runs w/out error. The second DEFINE crashes an agent ONLY when it is run in the Reporting Object. We are going against Oracle data via PeopleSoft on an AIX box. Outside of Reporting Object flawless.

DEFINE FILE CSICEDEDLOSSDATA
ClaimClosedDate/MDYY = IF CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P' THEN HDATE(CLSD_D,'MDYY') ELSE 0 ;
-*****
MODCCD/YYMD = IF CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P' THEN HDATE(CLSD_D,'YYMD') ELSE '19000101';
END

We have a ticket open with IBI but was wondering if anyone has experienced this odd behavior. Oh by the way, this is a migration of MRE from 7.1.6 to 7.7.03. Feel my pain... LOL

Rhonda

This message has been edited. Last edited by: Rhonda,


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
February 13, 2014, 05:06 PM
Waz
What format is CLSD_D ?
and what is the oracle column format ?


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!

February 13, 2014, 08:22 PM
njsden
The data types of the DEFINE fields and some of the values you're attempting to assign to them don't seem to be compatible.

What would happen if you did this:

DEFINE FILE CSICEDEDLOSSDATA
ClaimClosedDate/MDYY MISSING ON = IF CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P' THEN HDATE(CLSD_D,'MDYY') ELSE MISSING ;
-*****
MODCCD/YYMD = IF CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P' THEN HDATE(CLSD_D,'YYMD') ELSE DATECVT('19000101','A8YYMD','YYMD');
END


That way your fields will always receive a valid DATE value, or MISSING when applicable.



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.
February 14, 2014, 03:38 PM
Rhonda
The format of CLSD_D is date/time
The following worked for us.
NOTE: The extra parens aroung the HDATE function. Crazy!

MODCCD/YYMD = IF (CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P')
THEN (HDATE(CLSD_D,'YYMD')) ELSE '19000101';
ClaimClosedDate/MDYY = IF CLAIMSTATUS EQ '2' OR '4' OR '6' OR '8' OR 'CCNP' OR 'CLSD' OR 'CLSD-P'
-* THEN HDATE(CLSD_D,'MDYY') ELSE '0' ;


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
February 14, 2014, 03:51 PM
susannah
you've got quotes around the ELSE value on the MODCDD alternative.
'19000101'
That means its ALPHA.
that's never gunna work.
Take the quotes off, and it should work;
Better, do what New Jersey says.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 14, 2014, 03:51 PM
njsden
Hmmm, what "date" value do you get when assigning '0' to ClaimClosedDate in you 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.