Focal Point
[SOLVED] SAVE FILE OMIT LIST
August 16, 2010, 02:13 PM
GaryB[SOLVED] SAVE FILE OMIT LIST
Is there a way to prevent WebFocus from adding the I5 list field with "SAVE FORMAT ALPHA".
I am reading an Oracle db and I am saving a single field:
TABLE FILE QRY_STYLE_BOOK
PRINT
STYLE_NUMBER
ON TABLE SAVE FILENAME TMPSTYLE FORMAT ALPHA
END
The output file has an extra I5 data field in front of the data:
00001002J1008G04
00001002J1230001
00001002J1230002
The 00001 is not wanted.
G
This message has been edited. Last edited by: GaryB, August 16, 2010, 02:25 PM
Francis MarianiIs STYLE_NUMBER a variable length alpha field?
Something like this might work:
TABLE FILE QRY_STYLE_BOOK
PRINT
STYLE_NUMBER/A10
ON TABLE SET HOLDFORMAT PRINTONLY
ON TABLE SAVE FILENAME TMPSTYLE FORMAT ALPHA
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 16, 2010, 02:28 PM
GaryBWebFocus is adding the 00001 to the front of the data. It is not part of the field.
August 16, 2010, 02:47 PM
GaryB ALPHANUMERIC RECORD NAMED SAV*****
0 FIELDNAME ALIAS FORMAT LENGTH
STYLE_NUMBER STYLE_NUMBER A18V 24
TOTAL 24
Francis, The field is an A18V. Adding /A18 seems to force it to only output 18 charaters instead of 24.
Also, FORMAT TAB also worked, since it was only one field.
August 16, 2010, 02:52 PM
GaryBSET HOLDLIST = PRINTONLY
This has to be used of the output includes multiple fields.
August 16, 2010, 05:43 PM
WazAs the field is a variable length field, it has the fields length before the field, that is why it is 18 chars + 6 chars for the length of the field.
Using Francis' suggestion will work, just change it to /A18
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! |
August 16, 2010, 06:19 PM
Francis MarianiTABLE FILE QRY_STYLE_BOOK
PRINT STYLE_NUMBER/A18
ON TABLE SET HOLDFORMAT PRINTONLY
ON TABLE SAVE FILENAME TMPSTYLE
END
should work. This code also has the HOLDLIST=PRINTONLY statement built in. Thanks Waz.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server