August 31, 2015, 05:19 PM
Darryl Maraj[SOLVED] Running PL/SQL Procedure from WebFOCUS
I searched through the forum but couldn't find a satisfactory answer on the following.
I have a PL/SQL procedure I want to execute before my report is ran. Basically:
begin
-- Call the procedure
dia.gat_rep_margin;
end;
I tried doing it but I get an SQLOUT problem. Any guidance?
This message has been edited. Last edited by: <Kathryn Henning>, September 01, 2015, 07:52 AM
MattCTry this
SQL
CALL Procedure;
-RUN
September 01, 2015, 10:10 AM
David Briarsquote:
...Any guidance?
Our standard is to create metadata (.mas/.acx) for the stored proc.
Then do a TABLE FILE against the resultant metadata (e.g., TABLE FILE packname_spname).
September 01, 2015, 06:00 PM
Darryl MarajThank you very much for all the suggestions.
@MattC I couldn't get the procedure to run using this method. I kept getting FOC errors.
@David Briars
Your suggestion was genius! First I didn't realize the Data Management Console would do metadata on procedures so that was a neat find!
Process for future reference:
- Create a PL/SQL procedure, note the procedure must have an output message otherwise you get a verb error for this method
- Open the DMC Tool and Create/Update synonym
- On the second screen where it says "restrict object to" change that to Procedure
- Put in your schema and object name, done
- Create a new procedure in WebFOCUS choosing the master table created above and drag the output into the report area, done!
Now I can schedule it with report caster and also include it into other WebFOCUS procedures.
Many Thanks!