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     Matching/Merging Files-Zero Values for Output

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Matching/Merging Files-Zero Values for Output
 Login/Join
 
Silver Member
posted
The code below is my attempt to merge 2 files. The numbers don't line up, but the problem is that the bottom line is the 2nd file and does not dump out - see the 'YTD', bottom line. QTR and YTD files are identical as far as field names.

I've tried the version below from Fine Tuning (using 'AND' between fields) as well as the version in Merging Concatenated Data Sources. I've also rearranged the verbs WRITE/PRINT/SUM until I was truly going around in circles. I'm missing something here and just cannot figure what it is. Can anyone at a glance see what my problem is?

MATCH FILE QTRDATAJOIN
PRINT
NETSALESA AND
COGS AND
GROSSPROFIT AND
GROSSMARGIN AND
SGA
BY GROUPING
BY FINDATADATE_Z
RUN
FILE YTDTOTALS
PRINT
NETSALESA AND
COGS AND
GROSSPROFIT AND
GROSSMARGIN AND
SGA
BY GROUPING
BY FINDATADATE_Z
AFTER MATCH HOLD OLD-OR-NEW
END
-RUN
-*
TABLE FILE HOLD
SUM
NETSALESA
COGS
GROSSPROFIT
GROSSMARGIN
SGA
BY GROUPING
BY FINDATADATE_Z
END
-RUN


OUTPUT:

GROUPING FINDATADATE_Z NETSALESA COGS GROSSPROFIT GROSSMARGIN SGA
QTR 2002/03/31 234.4 168.1 66.3 28.3% 55.9
2002/06/30 233.8 164.5 69.3 29.6% 56.2
2002/09/30 231.3 166.7 64.6 27.9% 57.2
2002/12/31 924.1 659.9 264.2 28.6% 225.6
2003/03/31 210.2 154.5 55.7 26.5% 57.0
2003/06/30 234.0 169.1 64.9 27.7% 58.7
2003/09/30 237.1 168.9 68.2 28.8% 57.2
2003/12/31 923.5 675.4 248.1 26.9% 231.3
2004/03/31 249.2 177.0 72.2 29.0% 62.8
2004/06/30 177.0 127.0 50.0 28.2% 39.4
2004/09/30 222.8 166.0 56.8 25.5% 49.6
2004/12/31 881.7 616.3 265.4 30.1% 204.6
2005/03/31 234.7 163.6 71.1 30.3% 54.0
YTD 2005/03/31 .0 .0 .0 .0% .0


Appreciate any help you can give me, vickie
 
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004Report This Post
Expert
posted Hide Post
The MATCH FILE command combines common *Rows* of data, therefore, in the HOLD file, NETSALESA from file QTRDATAJOIN will be in the same row as NETSALESA from file YTDTOTALS.

Is this what you expected? From the report sample you posted it does not appear that this is what you want.

If you want to concatenate the QTRDATAJOIN and the YTDTOTALS, try using the MORE command:

TABLE FILE QTRDATAJOIN
PRINT
NETSALESA
COGS
GROSSPROFIT
GROSSMARGIN
SGA
BY GROUPING
BY FINDATADATE_Z
MORE
FILE YTDTOTALS
END

The MORE command is documented here:

http://documentation.informationbuilders.com/masterinde.../wf53crlang/mrg6.htm
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
Francis, this worked perfectly. Did not try using 'TABLE', always 'MATCH' with 'more'. Quick switch, all my values came through. Thank you!

BUT, I now have a problem with getting the report to print as I want it. I cannot use 'on table hold as' in order to hold this data for use in my final code to print the report. If I type MORE, FILE YTDTOTALS, before my ACROSS Xfield, Yfield, etc, I get an error. I tried to find limitations for using MORE, but found nothing that would help me. Any thoughts on this?

Thanks, vickie
 
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004Report This Post
Expert
posted Hide Post
When using MORE, it must be last part of the TABLE request:

TABLE FILE 1
SUM
...
BY ..
ACROSS ...
ON TABLE HOLD AS ...
MORE
FILE 2
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
Francis, I tweaked the code here & there and it worked perfectly! Thank you VERY much for your help. Now I need to add an additional reporting period in the same fashion. With the base report to work with, should not be a problem.

vickie
 
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004Report 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     Matching/Merging Files-Zero Values for Output

Copyright © 1996-2020 Information Builders