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     [SOLVED]How to read a column value in &variable from a stored proc resultset

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to read a column value in &variable from a stored proc resultset
 Login/Join
 
Silver Member
posted
Hi All,

Can I store the value of a column from the result set of the stored procedure in an '&variable' without executing the stored procedure twice. Like I have this stored proc say, SP1 containing one column C1, which has same value(either 'yes' or 'no') for all the rows. Now since I am holding the resultset of Sp1 in a file:-
 SQL EX SP1;
TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD AS SP_RPT
END
TABLE FILE SP_RPT
PRINT
....
.... 

I also want to read the value of C1 in an &variable. But I guess for that I have to execute SP1 again and hold it in ALPHA format and read it to an &variable. But I don't want to execute the stored proc twice. How can I do that. Please suggest. Any help appreciated.

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


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
Silver Member
posted Hide Post
Forgot to mention there are n columns in the resultset of the stored proc.


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
<JG>
posted
you do not have to run the stored procedure twice,
you've already created your hold file, table that.
 
Report This Post
Silver Member
posted Hide Post
Hey JG,
I don't get you Frowner
Can u provide few lines of code.


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
<JG>
posted
TABLE FILE SP_RPT
PRINT C1
ON TABLE SAVE
END
 
Report This Post
Silver Member
posted Hide Post
Thanks JG Smiler
well m doing it like this ryt now.
 
TABLE FILE SP_RPT
PRINT C1
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-READ HOLD &FLAG.A3 


It seems alright. Smiler


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report 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     [SOLVED]How to read a column value in &variable from a stored proc resultset

Copyright © 1996-2020 Information Builders