I know this is not pretty nor is it logical code wise.. Is it theoretically possible to have multiple hold files union'd together where the COLUMN COUNT does not match.
We have Schools that are broke down by elementary school, middle school, high school and one school may only have grades 6-8 whereas another school as grades 9-12 and we need to build one large hold file to report against so that reportcaster can burst on the school name and then only burst the grades that belong to it.
Wanting to do something sorta like this:
TABLE FILE CAR BY COUNTRY BY MODEL BY CAR ON TABLE HOLD AS TEST END TABLE FILE CAR BY COUNTRY BY MODEL ON TABLE HOLD AS TEST1 END
TABLE FILE CAR BY COUNTRY ON TABLE HOLD AS TEST2 END
TABLE FILE TEST2 PRINT * MORE FILE TEST MORE FILE TEST1 ENDThis message has been edited. Last edited by: <Kathryn Henning>,
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
Test: WebFOCUS 7.6.11
Dev: WebFOCUS 7.6.11
December 11, 2013, 05:27 PM
Waz
Not that I am aware of.
You should create dummy fields to match the missing columns
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 12, 2013, 09:41 AM
Davmayf44
TABLE FILE CAR BY COUNTRY BY MODEL BY CAR ON TABLE HOLD AS TEST END TABLE FILE CAR BY COUNTRY BY MODEL ON TABLE HOLD AS TEST1 END TABLE FILE CAR BY COUNTRY ON TABLE HOLD AS TEST2 END MATCH FILE TEST BY COUNTRY BY MODEL BY CAR RUN FILE TEST1 BY COUNTRY BY MODEL AFTER MATCH HOLD AS TEST3 OLD-OR-NEW RUN FILE TEST2 BY COUNTRY AFTER MATCH HOLD AS TEST4 OLD-OR-NEW END TABLE FILE TEST4 BY COUNTRY BY MODEL BY CAR END
WebFOCUS 7.6 Windows, All Outputs
December 12, 2013, 09:47 AM
susannah
you can't PRINT * with different field names. you can only PRINT fielda fieldb... specifying the field names that the hold files DO have in common. Your other option is to create dummy fields for each file so that your result DOES indeed have the same field names. So,to make TEST2 ... DEFINE FILE CAR CAR/A10=' '; END TABLE FILE CAR BY COUNTRY BY MODEL BY CAR...
its even a better idea to define all the fields you want with MISSING ON , so that you can have MISSING as the value on your redefined fields. Got it?
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 12, 2013, 03:41 PM
Waz
Another option is to use the APPEND option with FILEDEF.
TABLE FILE CAR
BY COUNTRY
BY MODEL
BY CAR
ON TABLE HOLD AS TEST FORMAT ALPHA
END
FILEDEF TEST DISK test.ftm (APPEND
TABLE FILE CAR
BY COUNTRY
BY MODEL
ON TABLE SAVE AS TEST
END
TABLE FILE CAR
BY COUNTRY
ON TABLE SAVE AS TEST
END
FILEDEF TEST DISK test.ftm
TABLE FILE TEST
PRINT *
END
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 14, 2013, 01:56 PM
Danny-SRL
Neuro, When you use MORE, you must have the same fields (name and format) in all files. So your example won't work. What you can do is:
TABLE FILE CAR
BY COUNTRY
BY MODEL
BY CAR
ON TABLE HOLD AS TEST
END
DEFINE FILE CAR
CAR = ' ';
END
TABLE FILE CAR
BY COUNTRY
BY MODEL
BY CAR
ON TABLE HOLD AS TEST1
END
DEFINE FILE CAR
CAR = ' ';
MODEL = ' ';
END
TABLE FILE CAR
BY COUNTRY
BY MODEL
BY CAR
ON TABLE HOLD AS TEST2
END
TABLE FILE TEST2
PRINT *
MORE
FILE TEST
MORE
FILE TEST1
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF