COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Framework Manager => Topic started by: Xenobiologist on 16 Jan 2025 08:15:58 AM

Title: [Update 12.0.4 FP1] Prompt macro error
Post by: Xenobiologist on 16 Jan 2025 08:15:58 AM
HI,

I've just updated to 12.0.4 FP1 and now we are facing this error:

#prompt ('pAuswertungsdatum'; 'date'; '2222-02-22')#
--> Cognos 12.0.4 --> DATE '2025-01-16'
--> before '2025-01-16'
 
DATE '2025-01-16' leads to syntax error:
 
XQE-V5-0011 V5-Syntaxfehler in Ausdruck "IF (cast(DATE '2025-01-16'; date) = cast('2222-02-22'; date))
THEN ( [Technische Sicht SPOT].[JIRA0_D_ISSUE_BEZIEHUNG_HIST_T01].[TSP_GUELTIG_AB] <=  localtimestamp AND [Technische Sicht SPOT].[JIRA0_D_ISSUE_BEZIEHUNG_HIST_T01].[TSP_GUELTIG_BIS]  > localtimestamp)
ELSE (
      (  [Technische Sicht SPOT].[JIRA0_D_ISSUE_BEZIEHUNG_HIST_T01].[TSP_GUELTIG_AB]  <= cast(DATE '2025-01-16'; timestamp)  AND [Technische Sicht SPOT].[JIRA0_D_ISSUE_BEZIEHUNG_HIST_T01].[TSP_GUELTIG_BIS]  > cast(DATE '2025-01-16' ; timestamp)  )
   )" gefunden. Ungültiges Token "DATE" gefunden nach "IF (cast("


Any idea how to fix that?
Title: Re: [Update 12.0.4 FP1] Prompt macro error
Post by: dougp on 16 Jan 2025 11:23:34 AM
So, it works with these?

DATE '2025-01-15'
DATE '2025-01-17'

And I don't understand this code:
--> Cognos 12.0.4 --> DATE '2025-01-16'
--> before '2025-01-16'
Title: Re: [Update 12.0.4 FP1] Prompt macro error
Post by: dougp on 16 Jan 2025 11:34:23 AM
Maybe I'm not understanding something, but if I'm reading the error message correctly, this should not have worked before:

(simplified)
IF val = cast('2222-02-22'; date))
THEN (
      a <= localtimestamp
  AND b > localtimestamp
)
ELSE (
      a <= val
  AND b > val
)

THEN and ELSE should each return a value.  It looks like they are performing comparisons.  Does this actually return TRUE or FALSE as output values?

What RDBMS are you using?
Title: Re: [Update 12.0.4 FP1] Prompt macro error
Post by: Xenobiologist on 17 Jan 2025 04:02:36 AM
Yes, it is all working fine in Cognos 12.0.3.
But now in Cognos 12.0.4 it doesn't work anymore.
We are on DB2LUW DB2 v11.5.9.0 and also the single server installation of Cognos runs on Linux_86.

Yes, the expression returns true/false.
Title: Re: [Update 12.0.4 FP1] Prompt macro error
Post by: Xenobiologist on 10 Feb 2025 01:59:45 AM
Sorry, it took some time.
IBM has confirmed the bug here: https://www.ibm.com/mysupport/s/defect/aCIKe000000XqNw/dt422363?language=en_US