[CLOSED] How to reference columns that have blanks in the name?
SET ASNAMES=ON
SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA
TABLE FILE CAR
SUM
SEATS
ACROSS COUNTRY
ON TABLE HOLD AS H001
END
?FF H001
TABLE FILE H001
PRINT
COMPUTE S1/D5 = SEAENGLAND;
COMPUTE S2/D5 = SEAW GERMANY;
END
The first TABLE produces a HOLD file with these columns:
How does one reference the column with name "SEAW GERMANY" (the 2nd COMPUTE in this example throws an error)? I would rather not use "SEAW" or "E05".
Thanks,This message has been edited. Last edited by: Francis Mariani,
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
April 26, 2011, 05:54 PM
Waz
You use quotes around the field.
Not sure if its single or double.
I think Developer Studio does this for you, a good place to test it.
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!
April 26, 2011, 05:56 PM
Francis Mariani
The problem with using quotes:
COMPUTE S2/D5 = 'SEAW GERMANY' * 123;
This does not work.
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
April 26, 2011, 06:13 PM
Francis Mariani
Amazingly, I cannot manipulate The Dev Studio GUI to create a report based on a HOLD file! Am I an idiot?
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
April 26, 2011, 07:40 PM
N.Selph
If you create the hold file earlier in the fex in the DEV Studio GUI, you should see it in the list of tables the GUI throws up, in the next piece of its "necklace".
You may reference field names with a space as verb objects using single quotes. People use to do this to make for "pretty" column heading.
It also had the effect of driving the support people crazy (also know as me) , when the someone called about error caused by omitted single quotes. The syntax would looked perfect unless you looked at the master. Asking for the master file description often became a "teaching moment" because the caller had never heard of such a thing. They just copied from someone else, and "only made a little change".
TABLE FILE INSURE SUM 'WRITTEN PREMIUM' 'EARNED PREMIUM' BY POLICY END
But in compute / define to the left of an equal sign "=" Focus assumes anything in single quotes is a literal.
My advice get ride of the "blank-it-blank" space.
Jim Morrow Web Focus 7.6.10 under Windows 2003 MVS 7.3.3
April 27, 2011, 10:04 AM
WF_IL
Hi
Another option to use the internal columns numbering in the report itself
SET ASNAMES=ON SET HOLDLIST=PRINTONLY SET HOLDFORMAT=ALPHA TABLE FILE CAR SUM SEATS ACROSS COUNTRY ON TABLE HOLD AS H001 END -RUN
ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ ENDSTYLE ENDThis message has been edited. Last edited by: WF_IL,