Focal Point Banner


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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     merging output from stored procedures

Read-Only Read-Only Topic
Go
Search
Notify
Tools
merging output from stored procedures
 Login/Join
 
Silver Member
posted
Hi,
Iam calling two stored procedures. I want to merge the output of these 2 stored procedures. I found many solutions to merge two hold files. but the problem here is it is not allowing to call the second stored proc. here is the sample code:
EX tempsp1 'a','b';
table file SQLOUT1
PRINT *
ON TABLE HOLD AS TEMP1

EX tempsp2 'c',23;
table file SQLOUT2
PRINT *
ON TABLE HOLD AS TEMP2

then joining these two using 'match'. but the thing is it is not allowing to call second stored proc itself. It's giving error in the line where the execution for the 2nd stored proc (tempsp2). the error is "(FOC293) MISSING OR MISPLACED QUOTE IN THE FOCEXEC ARGUMENT LINE:".
please let me know how can i merge the output from two stored procedures.
 
Posts: 41 | Location: Boston | Registered: August 17, 2005Report This Post
<Steve Cowell>
posted
Dharma. Can I confirm that there is an END statement between the first ON TABLE HOLD? and the 'EX tempsp2'
 
Report This Post
Silver Member
posted Hide Post
Yes, there is an END before second stored procedure call begins and also at the end of 2nd stored procedure call. iam sorry i forgot to include this before.

EX tempsp1 'a','b';
table file SQLOUT1
PRINT *
ON TABLE HOLD AS TEMP1
END

EX tempsp2 'c',23;
table file SQLOUT2
PRINT *
ON TABLE HOLD AS TEMP2
END
 
Posts: 41 | Location: Boston | Registered: August 17, 2005Report This Post
Expert
posted Hide Post
Plus, of course, the obvious questions on what the second fex is expecting as parameters in terms of data types, and, have you tried putting quotes around the 23 on the second call?
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<Steve Cowell>
posted
Dharma. are you issung this request remotely, as a client procedure calling two seperate remote procedures, or are all three procedures sitting in the same location? Also, you might want to place a -RUN statemend after you 'EX' anything.

Regards, Steve C
 
Report This Post
Silver Member
posted Hide Post
I have a fex file which is calling two stored procedures present in the same location (sybase server) different from the fex file location. i tried using -RUN after the 'EX' statement. it gives the same error. i also tried putting -RUN after the END statement. still it gives the same error.

Tony, i used quotes for alphanumeric and dates and no quotes for numeric data. both the stored procedures are different, i mean both are returning different set of columns (one or two common columns are there) and the input parameters passed are also different for these two stored procs.
 
Posts: 41 | Location: Boston | Registered: August 17, 2005Report This Post
<Steve Cowell>
posted
Dharma Ok. The reason I ask is because I see that you want to merge the two resulting files, I wanted to ensure that you have issued distinct FILEDEFs for the HOLD files because each 'EX' will establish a different connection and work area on the server so the resulting HOLD files won't be in a common area to merge at a later stage. Moving on, if the variable types are the same then 1) do they have a -DEFAULT value in the program being called? 2) Does the process work when the example values are in the called routines not in the EX statement? 3) Does the call work when specify the variable name = variable value in the 'EX' statement i.e 'EX stdin200 VAR = value' ?
 
Report This Post
Virtuoso
posted Hide Post
Remove the semicolons from the EX statements.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Silver Member
posted Hide Post
Thanks steve, its working. actually the problem is i havent established a different connection for both the stored procedure calls. i just established the connection once before the call of two stored procs.
 
Posts: 41 | Location: Boston | Registered: August 17, 2005Report This Post
Virtuoso
posted Hide Post
EX calls either a fex, or a remote procedure, depending on context; and the syntax varies accordingly:

The first EX, if preceeded by ENGINE ..., is parsed as a remote procedure call, and the semicolon is treated as delimiting the EX statement.

The second EX, outside the scope of ENGINE, was parsed as a fex call, and the ";" was interpreted as part of the arg list. Hence the Foc293, when Focus tried to parse the value for &2, and choked on "'b';".
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     merging output from stored procedures

Copyright © 1996-2020 Information Builders