IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    How do I combine data from two WebFOCUS procedures
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
I have two procedures with this in common:
Both have two fields that when combined are unique (key). The created key in both procedures are identical.

I want one report with data from both procedures. Actually, I want all the data from one procudure and only data from the other procedure where the combined 'key' fields are the same.

How do I do this in WebFOCUS. By the way, I don't know how to write code. I'm a GUI person.
 
Posts: 7 | Registered: March 30, 2007Reply With QuoteEdit or Delete MessageReport This Post
dwf
Platinum Member
Posted Hide Post
Patty,

Other way around for me. I'm a coder. But I'll try to help anyway.

Let's establish a vocabulary. Let's say procedure A creates hold file A1, and procedure B creates hold file B1. If you want the combine to take place immediately after A1 and B1 are created, then you probably want another procedure - call it C - that includes or executes A and B. You can do that with the GUI.

After A1 and B1 are created, you want the combine them with MATCH FILE. Click on the diamond after B and look for MATCH. Click that. The GUI will attempt to guide you through the process. I hope the help you get there is good enough, because it would be pretty complicated to explain here. If you have a creating reports manual, look for MATCH FILE. Even if you don't write code, then explanation should help.


dwf
 
Posts: 134 | Location: Portland, OR | Registered: March 23, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Thank you so much! That's exactly what I needed.
 
Posts: 7 | Registered: March 30, 2007Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
There's also a thing called JOIN that you can do with the Report Painter GUI. Except I'm not sure if you can join 2 held files. dwf?


Prod: WF 7.1.3 WinXP
Dev: WF 7.6.4 WinXP
 
Posts: 156 | Location: Orlando, FL | Registered: October 17, 2006Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
The procedures are not in the list of tables when I choose MATCH from the diamond. Our DBA do not know how to give me access to this. Any help will be appreciated.
 
Posts: 7 | Registered: March 30, 2007Reply With QuoteEdit or Delete MessageReport This Post
dwf
Platinum Member
Posted Hide Post
You have to run your routines at least once to create the hold files. Master files will be created at that time, and it is the two masters you want to look for when you choose the match diamond. It is very possible that your hold files and masters are being written to temp space, which means they aren't being saved. You want to reasearch the command APP HOLDMETA to overcome that. SET TEMPDIR will do the same thing, I think. The point of all that is to persuade WebFOCUS to actually save the master file descriptions created with the HOLD statement, so you can use them in the MATCH.

And, as Anatess suggested, you should also be able to use join. It might even be a little easier. If you hold your file with FORMAT FOCUS, the join will almost certainly work better than the MATCH, anyway.

Lot of stuff to have to manage, huh?


dwf
 
Posts: 134 | Location: Portland, OR | Registered: March 23, 2005Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
You can join hold files as long as they have something to use as a key, which is ususally a 'by' statement field

Table file a1
print b c d
by e
on table hold as hold1
end
table file b1
print f g h
by i
on table hold as hold2
end
join e in hold1 to g in hold2

...

GUI lets you do this as well.


Leah
 
Posts: 1307 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
Leah, don't you mean

join e in hold1 to i in hold2

I don't ever do it this way. I will always make the second hold file (hold2) a format FOCUS and INDEX i.


Prod WF 7.1.3 (z90/Suse Linux) DB (Oracle 10g), Self Serv, Report Caster, WebServer Win2003
 
Posts: 300 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
Thanks I can't type the join should be
joine e in hol1 to i in hold2


Leah
 
Posts: 1307 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    How do I combine data from two WebFOCUS procedures

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