As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
we are using wf5.2.3 I am having the following problem when I try sql pass thru on the database (db2 udb). Any Insights: I have looked at knowledge base and not got any ideas. I am appending a simple code w/o sql pass thru it is fine as a fiddle but sql pass thru' creates a havoc.
SET SQLENGINE=DB2 -*ENGINE DB2 SET DEFAULT_CONNECTION TMUPIT ENGINE DB2 SET CONNECTION_ATTRIBUTES r_tmupi -*SQL DB2 SET CURRENT SQLID = 'tmupi' -*SQL DB2 SET CONNECTION_ATTRIBUTES r_tmupi/tmupi,tmupi -*SQL DB2 select TMUPI.NAME from TMUPI.CORORG for fetch only; TABLE FILE SQLOUT PRINT * ON TABLE SAVE AS BANK_NAME END -RUN (FOC1517) UNRECOGNIZED COMMAND select TMUPI.NAME from TMUPI.CORORG for fetch only; 0 ERROR AT OR NEAR LINE 24 IN PROCEDURE MEMFEX FOCEXEC * (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT BYPASSING TO END OF COMMAND -EXIT Thanks,
VipulThis message has been edited. Last edited by: <Mabel>,
The error points that the PASSTHROUGH is not passed to DB2 - the native DB2 SELECT statement is handled as a FOCUS request. For DB2 I used syntax: -* Setting the engine here if necessary: ... -* SQL SQL SELECT native DB2 statement ... ; TABLE ON TABLE HOLD AS HOLD_FILE END
and I have never had any problems. I noticed some issues (but not remember details) when using syntax SQL DB2.
This works like a charm using SQL Server in 4.3.6 (have not tested in 5.3):
SET SQLENGINE = SQLMSS SQL &SQLDB SET USER VismaBusiness SQL &SQLDB SET SERVER VismaBusiness -RUN -* SQL SELECT AcNo,Nm FROM F9999.DBO.AC ; TABLE FILE SQLOUT SUM Nm BY AcNo ON TABLE HOLD AS ACTEMP FORMAT FOCUS INDEX AcNo END -RUN
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004