Focal Point
[SOLVED]Reportcaster error - sql - UNRECOGNIZED COMMAND ON TABLE SET XRETRIEVAL OFF

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

January 22, 2014, 06:44 AM
pradhan_dp
[SOLVED]Reportcaster error - sql - UNRECOGNIZED COMMAND ON TABLE SET XRETRIEVAL OFF
Hi,

I am facing the error :
"UNRECOGNIZED COMMAND ON TABLE SET XRETRIEVAL OFF" when trying to execute a sql query from reportcaster. The fex has only this query to be executed and sent in pdf format. Maybe there's something wrong with the query because some queries seem to be running while others run into the same error.

-SET &ECHO = 'ALL';
ENGINE DB2 SET DEFAULT_CONNECTION DB_UAT
SQL DB2 PREPARE SQLOUT FOR
SELECT TRANS.OBJECT_ID,
MAX(TRANS.SEQ_NUM )AS SEQ_NUMBER
FROM SCHEMA_UAT.TRANSACTION TRANS
INNER JOIN SCHEMA_UAT.WORK_OBJECT WO ON WO.OBJECT_ID = TRANS.OBJECT_ID
GROUP BY TRANS.OBJECT_ID
;
-RUN
TABLE FILE SQLOUT
PRINT
OBJECT_ID
SEQ_NUMBER
ON TABLE HOLD AS DB_TST
END
-RUN
-TYPE NUMBER OF ROWS : &LINES
TABLE FILE DB_TST
PRINT
OBJECT_ID
SEQ_NUMBER
ON TABLE PCHOLD FORMAT PDF
END
-RUN


PS This fex displays correct output when run with format HTML without reportcaster.

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


WebFOCUS 7.6.1
Windows, HTML,PDF,EXCEL2000
January 22, 2014, 08:09 AM
Wep5622
I don't see anything that would explain why you get the exact error message you're getting, but...

It appears that you forgot to END your SQL PREPARE statement.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 22, 2014, 02:21 PM
pradhan_dp
Thanks for pointing that out.
Error message now changes to "unrecognized command"...

*huge help wf error messaging system* Frowner


WebFOCUS 7.6.1
Windows, HTML,PDF,EXCEL2000
January 22, 2014, 04:45 PM
susannah
turn on your echo
and then run and look at your caster log.
be sure you don't have a pre-processing condition set. that sometimes happens unintentionally when you clone another job.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 22, 2014, 09:32 PM
pradhan_dp
Susannah,

Already did that.
Placed -TYPE Lines: &LINES before and after this code. Returns non-zero values. I assume that means the hold files are being created and have data in them.

Also tried another thing. Placed -EXIT right before this code and caster log doesn't throw back any error. As soon as sql is processed, error pops up and this is not the first sql being executed in the report.
Hence, the confusion if I'm doing something in the sql which is not correct.


WebFOCUS 7.6.1
Windows, HTML,PDF,EXCEL2000
January 23, 2014, 03:50 AM
Wep5622
In my experience, the message "unrecognized command" usually means that you forgot to end a previous command properly. That can be quite a bit back up in the code, for example when forgetting to end a DEFINE computation with a semi-colon.

Often, putting a -EXIT before the supposedly offending bit of code doesn't result in an error, while in fact there is one. Not sure what's the reason for that one, apparently the parser thinks that continued lines of gibberish are just fine...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 23, 2014, 08:05 AM
pradhan_dp
Wep,

Thanks for the tip. Yes, it was actually a missing semi-colon.

I'm astonished that report worked perfectly online.


WebFOCUS 7.6.1
Windows, HTML,PDF,EXCEL2000
March 19, 2014, 02:48 PM
Doug
quote:
SELECT TRANS.OBJECT_ID,
MAX(TRANS.SEQ_NUM )AS SEQ_NUMBER
FROM SCHEMA_UAT.TRANSACTION TRANS
INNER JOIN SCHEMA_UAT.WORK_OBJECT WO ON WO.OBJECT_ID = TRANS.OBJECT_ID
GROUP BY TRANS.OBJECT_ID;
END
The "END" is the END (terminator) of the WebFOCUS "ENGINE DB2 SET DEFAULT_CONNECTION DB_UAT / SQL DB2 PREPARE SQLOUT FOR" command while the semi-colon in the END (terminator) for the SQL pass-thru, right?
April 24, 2014, 11:16 AM
Doug
Just checking, revisited on April 24 2014 for verification of another associated issue.

This message has been edited. Last edited by: Doug,
April 25, 2014, 04:50 AM
pradhan_dp
Yes, Doug. Correct.


WebFOCUS 7.6.1
Windows, HTML,PDF,EXCEL2000