WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
February 25, 2008, 10:19 AM
L_G
quote:
TABLE FILE LGDATA PRINT COL1 OVER COL2 OVER COL3 OVER COL4 END
Thanks Tony A but your example just modify the report output. I want to save the result into the hold table as separate column
WebFOCUS 7.6 Windows 2000 Output: HTML, PDF
February 25, 2008, 11:00 AM
Tony A
L_G,
That's what I meant by you not giving too many details. You didn't say that you wanted to hold the data! Try and be more specific in your question.
Try this -
FILEDEF LGMAS DISK LGDATA.MAS
FILEDEF LGDATA DISK LGDATA.FTM
-RUN
-WRITE LGMAS FILE=LGDATA,SUFFIX=COM
-WRITE LGMAS SEGNAME=SEG1
-WRITE LGMAS FIELD=COL1, ,I9 ,I9 , $
-WRITE LGMAS FIELD=COL2, ,I9 ,I9 , $
-WRITE LGMAS FIELD=COL3, ,I9 ,I9 , $
-WRITE LGMAS FIELD=COL4, ,I9 ,I9 , $
-WRITE LGDATA 1,2,3,4,$
-WRITE LGDATA 5,6,7,8,$
-RUN
SQL
SELECT COL1
FROM LGDATA
UNION
SELECT COL2
FROM LGDATA
UNION
SELECT COL3
FROM LGDATA
UNION
SELECT COL4
FROM LGDATA
;
HOLD AS Rxxx_H1
Yes, it is SQL against a comma delimited file (but it works), but not knowing what source data yours is it is hard to help you.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
February 25, 2008, 11:23 AM
Anatess
You can also use the famous McGyver Technique... should be easy to search for McGyver in the forum or even the entire ibi site. Basically, it allows you to output multiple rows with one input row.
WF 8.1.05 Windows
February 25, 2008, 03:33 PM
Leah
So in your original 'hold creation' are you using across to get the data or just a simple print statement? And additionally, is it really just 8 data items or are there many more that you want to become a column of data in a hold file?
Leah
February 26, 2008, 03:10 AM
L_G
Hi,
I am not using the across...
And the data is not only 8 data items, it is just an example.
Currently I am using the McGyver technique and it works fine but i am asking because I think that there is another easy method...
WebFOCUS 7.6 Windows 2000 Output: HTML, PDF
February 26, 2008, 07:08 AM
FrankDutch
L_G
if you show us the master of this table, that might be helpful.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
February 26, 2008, 09:29 AM
PBrightwell
You could also do this in Dialog Manager using a -REPEAT, -READ NOCLOSE, -WRITE NOCLOSE.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
May 20, 2009, 12:55 PM
Joel
This is my first time to use the Mcgyver technique. In this technique,
JOIN BLANK WITH RPH IN CAR TO BLANK IN FSEQ AS AJ DEFINE FILE CAR BLANK/A1 WITH RPH = ' ' ; VERBOBJ/D7 = IF COUNTER EQ 1 THEN RCOST ELSE IF COUNTER EQ 2 THEN DCOST ELSE IF COUNTER EQ 3 THEN SALES ELSE IF COUNTER EQ 4 THEN MPG ELSE IF COUNTER EQ 5 THEN RPH ELSE 0; TITLE_VO/A13 = DECODE COUNTER (1 'RETAIL_COST' 2 'DEALER_COST' 3 'SALES' 4 'MILES_PER_GAL' 5 'REV_PER_HOUR' ELSE ' '); END TABLE FILE CAR SUM VERBOBJ AS ' ' ACROSS SEATS ACROSS BODYTYPE BY COUNTRY BY COUNTER NOPRINT BY TITLE_VO AS ' ' IF COUNTER LE 5 END
What does the FSEQ contains? I've seen how to create the FSEQ file but what does this file contains to make this technique work?
7.6.6 Windows 2003 Server, Sybase IQ, DB2, SQL Server and Oracle Databases Excel, HTML and PDF
May 20, 2009, 02:16 PM
RSquared
Another way of doing this type of report is
TABLE FILE WHATEVER
PRINT
COL1 AS COLUMNA
ON TABLE HOLD AS TABLE1
END
TABLE FILE WHATEVER
PRINT
COL2 AS COLUMNA
ON TABLE HOLD AS TABLE2
END
TABLE FILE WHATEVER
PRINT
COL3 AS COLUMNA
ON TABLE HOLD AS TABLE3
END
TABLE FILE WHATEVER
PRINT
COL4 AS COLUMNA
ON TABLE HOLD AS TABLE4
END
TABLE FILE HOLD1
PRINT
COLUMNA
ON TABLE HOLD AS TABLEALL
MORE
FILE TABLE2
MORE
FILE TABLE3
MORE
FILE TABLE4
END
TABLE FILE TABLEALL
PRINT
COLUMNA
END
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
May 20, 2009, 03:27 PM
Danny-SRL
L_G,
Taking a leaf from Tony's book, and using an alternate master: