Hello, I'm trying to find a way to get the columns fields that a COMPUTE expression contains. Something like: COMPUTE XPTO/A30 = COL1+COL2+COL3;
I thought in using the WF parsing functions to get the columns. But is very difficult to parse complex expression.
The other option was something like: TABLE FILE filename PRINT COMPUTE XPTO/A30 = COL1+COL2+COL3; ON TABLE HOLD AS RES END
CHECK FILE RES HOLD AS MYCHECK TABLE FILE MYCHECK PRINT * END
This way I get the COL1, COL2 and COL3. The point is that I need to execute the query. In may case this is not an option. So my question is: It's possible to get this information without executing the query?
Or maybe there is another way to solve this issue.
Thanks in advanced, Carlos DiasThis message has been edited. Last edited by: Carlos Dias,
WebFOCUS version: 7.6 Linux/Windows HTML, Excel
January 16, 2013, 03:35 PM
Waz
Why do you want to eval COMPUTES ?
Is there a reason or problem ?
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!
January 16, 2013, 05:34 PM
Carlos Dias
There is no problem at all... I just want to get the columns of the COMPUTE to make another operations.
I can get this running the query. But the best was to create the HOLD to get the master file without running the query. It's possible? Why is necessary to execute the query to get the master file created by the HOLD? The data is not necessary.
Thanks, Carlos Dias
WebFOCUS version: 7.6 Linux/Windows HTML, Excel
January 16, 2013, 05:56 PM
FrankDutch
Should the result of the expression be an a30 field? But maybe I lust do not understand the question.
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
January 16, 2013, 06:09 PM
Francis Mariani
Carlos,
To get a Master for a HOLD file without accessing the data, add this code before the TABLE FILE command:
SET XRETRIEVAL=OFF
Change it to ON when you want to access data (or delete the command).
You are using + signs in your COMPUTE statement, we assume the columns COL1, COL2 and COL3 are numeric. If so, XPTO must be numeric. If COL1, COL2 and COL3 are alphanumeric, you need to concatenate the columns: