| Title: | FOCUS, from INFORMATION BUILDERS |
| Moderator: | ZAYIUS::BROUILLETTE |
| Created: | Thu Feb 19 1987 |
| Last Modified: | Mon May 05 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 615 |
| Total number of notes: | 1779 |
Hi,
I'm trying to do something a little different and it's getting to
the stage where my brains are falling out in an effort to do what
seems likea simple task!
I have two data files, one containing line items and one containing
totaled values related to the line items by way of a key. I'm
trying to produce a report which shows the various line items and
provides a sub-total by this key, however this sub-total must also
include the associated value from the first file.
File A File B
key Value key Value
-------------- ------------
A12345 100.00 A12345 99.00
A12345 67.00
A12345 100.01
The report should be something like....
A12345 99.00
67.00
100.01
100.00 <----------- From file A
-------
366.01
Any suggestions would be appreciated.
Thanks, Gary.
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 556.1 | a suggestion | DEMAND::MADDEN | Mon Jul 19 1993 10:41 | 4 | |
this looks like a job for the MATCH FILE command, unless the files
have the same layout, then you could simply append them.
Richard
| |||||
| 556.2 | DECODE Values ? | PEKING::MCSHANEG | Deceptively Co-operative | Tue Jul 27 1993 05:20 | 23 |
Richard,
Thanks for your quick reply....it's a case of if it was a dog it
would have bitten me!....however...there always a however....I've used
MATCH ok to create a hold file with both OLD_AND_NEW and have managed
to produce a report of sorts...
The report is a ledger based thing where the element I'm trying to display
from FILE A (basenote) is a carried forward figure and as such must, as
well as being included in a total, be displayed seperatly...I've managed
to do this by using RECAP but it's still not 100% and a little confusing.
I recon I could probably work around this if there were a way of using
DECODE to convert the key into it's associated value, but DECODE doesn't
seem to like the idea of this and I keep getting a 272 FORMAT ERROR IN
DECODE ELEMENT error....I even tried converting the values with EDIT and
creating a hold file to use with DECODE but the decimal points and the
signs on the values are lost...
Any ideas would be appreciated....
Thanks, Gary.
| |||||
| 556.3 | try this | DEMAND::MADDEN | Tue Jul 27 1993 15:24 | 7 | |
It sounds like what you would like to do is distinquish the A12345
value from file A from the A12345 values from file B so you could
define a display field based on the difference. What I would need is
an additional field with an A or B value. try creating it with a
define in the match file process.......
richard
| |||||
| 556.4 | Ta. | PEKING::MCSHANEG | Deceptively Co-operative | Sun Aug 01 1993 19:31 | 8 |
Richard,
Yup, that works, I generated a new field based on the value of the
'odd' element in the first file and used this as before with the RECAP
statement. Thanks v much for your help...
Gary..
| |||||