Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Returning data to calling procedure
Go
New
Search
Notify
Tools
Reply
  
Returning data to calling procedure
 Login/Join
 
Platinum Member
posted
I have a proc I use in several places that creates a file called MYOWG (via HOLD). If I want to use this in other, calling procedures, what's the best way to do this? HOLD? SAVE? I have a multiuser environment, so if I use a FILEDEF, won't that file be overwritten when the 2nd user calls the proc? Should I use -INCLUDE or EXEC proc?

Thanks.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
So are you wanting everyone who runs this procedure to have their own copy of MYOWG?

As for -INCLUDE vs. EXEC, they both do basically the same thing, but -INCLUDE is a little easier if you're passing parameters, easier for troubleshooting because you can see the -INCLUDED code. Also, I think that EXEC opens an additional agent, but I may be mistaken on that.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Yes, essentially, I want the called proc (procB) to return a bunch of data that can be used by multiple calling procedures (probA). Problem seems to be that if procB HOLDs or SAVEs the data, it's not accessible by procA. Or is there a way to do this?

My thought at this point is to define a HOLD (MYOWG) in calling procedure procA with the structure I need, then have called proc procB do a TABLE FILE MYOWG MORE FILE ...

Should that work? Is that the best way to do that, or is there another way?

>>>>>
I have since figured this out...mainly due to my ignorance. I think I misunderstood what a FILEDEF does. What I have done now is created a Focus SYNONYM that I can use for holding the data. Now both procs can access that structure.

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


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Why not use a FILEDEF to SAVE to a location with a unique identifier for the filename? Something like a combination of userid and timestamp will normally make it a unique filename. Of course, you then have to worry about cleanup also, otherwise the number of files will get out of hand.


Diptesh
WF 7.1.7 - AIX, MVS
 
Posts: 79 | Location: Warren, NJ, USA | Registered: October 25, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Returning data to calling procedure

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.