Focal Point
Calling Stored Procedures

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

May 13, 2005, 07:27 PM
KarateExplosion
Calling Stored Procedures
After calling an Oracle stored procedure in my fex, developer studio gives an error when trying to create a report. The error given is:
Error Parsing Master File pax_data FOC295 a value is missing for HOLDTYPE.

What does this mean?

Thanks
May 25, 2005, 04:47 AM
TexasStingray
Hopefully is this what you are doing

SQL SQLORA SET SERVER ...
SQL
EXECUTE .....;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS whatever
END

then write the report using that whatever

Hope this helps
May 25, 2005, 01:21 PM
<Prabhu>
Hi,

Plz go thru the below code and apply to your situation. And one more thing, dont use OUT parameter in your oracle procedure. It wont work. Instead use "IN OUT" for ref cursor (return resultset). And place your procedure in webfocus thru package.

SET SQLENGINE=SQLORA
SQL SQLORA

EX datasource_name.package_name.procedure_name 'input parameter;

TABLE FILE SQLOUT
PRINT *
END

Regards,
Prabhu.S
May 26, 2005, 03:43 PM
KarateExplosion
Thanks. How do I pass a parameter to a stored procedure in WebFocus
July 05, 2007, 05:41 PM
<Umar Farook S>
HI PrabhuPlease respond immed

The procedure i wrote in SQL works perfect but when i call the procedure inside webfoucs it gives me this error

(FOC1400) SQLCODE IS 7300 (HEX: 00001C84) XOPEN: 01000
: Microsoft OLE DB Provider for SQL Server: [01000] OLE DB error trace [OL
: E/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x800
: 4d01b]. [42000] The operation could not be performed because the OLE DB
: provider 'MSDAORA' was unable to begin a distributed transaction.
(FOC1405) SQL PREPARE ERROR.


I am attachin gthe code for your reference:

-* File mrx_GLDailySummaryDeriv.fex
-SET &ECHO = ALL;
-DEFAULT &ASOFDATE = '20070604';
-DEFAULT &SERVERNAME= 'EIIS_ST';
-DEFAULT &STOREDPROC='dbo.GLDailySummaryDerivTESTJOIN';
-DEFAULT &OUTPUTNAME='TEST';

-*Do not pass full outputname as variable, there is a 150 character limit for variables
-*FILEDEF DATS_GLFEED_WP DISK d:\mjobs\dats\data\DATSGLSUMMARY.txt
FILEDEF PDF DISK C:\UMAR\&OUTPUTNAME

ENGINE SQLMSS SET SERVER &SERVERNAME
-*ENGINE SQLMSS SET SERVER DERIVATIVES_ST01
SQL SQLMSS EX &STOREDPROC ;
-********************************************************************
-* SAVE SP CURSOR TO A HOLD FILE TO WORK WITH IN FEX
-********************************************************************
TABLE FILE SQLOUT
PRINT *
BY CompanyCode
BY GLEntity
ON TABLE HOLD AS GLDailyEntries_HOLD
END
-RUN

-SET &YEAR = EDIT(&ASOFDATE, '9999$$$$');
-SET &MTH = EDIT(&ASOFDATE, '$$$$99$$');
-SET &DAY = EDIT(&ASOFDATE, '$$$$$$99');
-SET &HEADDATE = &MTH||'/'||&DAY||'/'||&YEAR ;

SET NODATA = ' '

-********************************************************************
-* DEFINE VARIABLES TO WORK WITH IN FEX
-********************************************************************
DEFINE FILE GLDailyEntries_HOLD
BLANK_LINE/A1 = ' ';
F_D_Amount/D14.2CS = D_Amount;
F_C_Amount/D14.2CS = C_Amount;
END


-********************************************************************
-* BEGIN FORMATTING REPort OUTPUTDEFINE VARIABLES TO WORK WITH IN FEX
-********************************************************************
TABLE FILE GLDAILYENTRIES_HOLD
PRINT

BusinessArea
AccountCode
AccountDescription
F_D_Amount AS 'Debit Amount'
F_C_Amount AS 'Credit Amount'
BY
CompanyCode NOPRINT
BY
GLEntity NOPRINT
BY
AccountCode NOPRINT
BY
BusinessArea NOPRINT

ON CompanyCode NOPRINT PAGE-BREAK
ON AccountCode NOPRINT PAGE-BREAK SUBTOTAL
ON GLEntity NOPRINT PAGE-BREAK SUBTOTAL

HEADING
-*PAGE HEADING
"GL Feed - Daily Entries"
"PostingDate: &HEADDATE "
"Company Code: "GL Entity:
-*ON AccountCode NOPRINT SUBFOOT
-*" <84 ------------- <103 -------------"
-*"<50 *TOTAL AccountCode -*" "
-*" "
-*" "
-*" "

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD AS TEST1 FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
FONT='COURIER NEW',
SIZE=10,
COLOR=BLACK,
BACKCOLOR=NONE,
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N1,
SIZE=9,
$
TYPE=DATA,
COLUMN=N2,
SIZE=9,
$
TYPE=DATA,
COLUMN=N3,
SIZE=9,
$
TYPE=DATA,
COLUMN=N4,
SIZE=9,
$
TYPE=DATA,
COLUMN=N5,
SIZE=9,
$
TYPE=DATA,
COLUMN=N6,
SIZE=9,
$
TYPE=TABHEADING,
LINE=1,
JUSTIFY=CENTER,
$
TYPE=TABHEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
SIZE=14,
STYLE=BOLD,
$
TYPE=TABHEADING,
LINE=1,
OBJECT=TEXT,
ITEM=2,
SIZE=14,
STYLE=BOLD,
$
TYPE=TABHEADING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
SIZE=14,
STYLE=BOLD,
$
TYPE=TABHEADING,
LINE=2,
JUSTIFY=CENTER,
$
ENDSTYLE
END
July 05, 2007, 06:59 PM
Francis Mariani
My guess is that this is not a WebFOCUS error, it's most likely a configuration error.

From a doc I found on from Google:

quote:
Linked server fails with enlist in transaction error?
When attempting a transaction over a linked server, namely between databases on
disparate domains, you may receive this:
Server: Msg 7391, Level 16, State 1, Line 1
The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a
distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction
coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned
0x8004d00a].
The DBA should review the DTC trouble shooting section in this book (namely DTCPing).
If you are operating between disparate domains in which a trust or an indirect transitive
trust does not exist you may also experience this error; SQL queries will run fine over db
links.

(hosteddocs.ittoolbox.com/CK121704.pdf

You're using Oracle, but a Microsoft OLE DB Provider error is occurring.


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