Focal Point
Variable Fields in Hold File [closed]

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4847076476

February 11, 2015, 07:40 AM
amdev
Variable Fields in Hold File [closed]
In this closed discussion...
http://forums.informationbuild...331%2Fm%2F4997091226
...there's the following code, whoich I have tried running (v.8006) and I get the error "Cannot include resource specified FIELDS". Has something changed?
I'm still fairly new to this webfocus world so apologies if the answer is staring me in the face.

Thanks


TABLE FILE CAR
PRINT
SALES
RETAIL_COST
DEALER_COST
BY COUNTRY
ON TABLE HOLD AS CARHOLD
END
-*
CHECK FILE CARHOLD HOLD
-*
TABLE FILE HOLD
PRINT FIELDNAME
WHERE FIELDNAME NE 'COUNTRY';
ON TABLE SAVE AS FIELDS
END
-RUN
-*
TABLE FILE CARHOLD
SUM
-INCLUDE FIELDS
BY COUNTRY
END

This message has been edited. Last edited by: amdev,


WebFOCUS 7.6
Windows, All Outputs
February 11, 2015, 07:57 AM
Tony A
Works fine on my install of WF 8.

Double check that it is created by using CMD DIR and look for the FIELDS.FTM file in the directory listing from EDATEMP.

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 11, 2015, 08:21 AM
Håkan
The files will go as soon as the report is displayed, so do issue the command SET TEMPERASE=OFF (ON is the default) in the beginning. Also, the files will go into subdirectory to edatemp called ts999999, where the 999999 corresponds to the number of your agent, eg. ts000001.


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
February 11, 2015, 08:25 AM
Ram Prasad E
Works fine for me in EDA server.

Double check if you are trying in MRE or Data Server?

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
February 11, 2015, 10:23 AM
Tony A
quote:
SET TEMPERASE=OFF

Håkan, this is not a good idea as it could fill up edatemp folders unless you have agent refresh set a low number.

I would only recommend this on rare occasions.

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 11, 2015, 11:02 AM
Håkan
Tony, I agree completely. I would never use it unless for debugging etc. Another alternative is APP HOLD appdir

Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
February 11, 2015, 11:54 AM
eric.woerle
amdev,

Have you considered using the SYSCOLUM table to get a list of fields? I prefer this to using checkfile because it respects the security of the system (DBA, RS etc). Try this:

 
TABLE FILE SYSCOLUM
PRINT NAME AS FIELDNAME
SEGNAME
IF TBNAME EQ 'CAR'
END


There is a lot more information that you can get from the Syscolum table like field types, descriptions etc. But if all you are looking for is a list of field names, this will work.

quote:
I get the error "Cannot include resource specified FIELDS". Has something changed?


I don't know if this is the case for what you are doing here since I dont generally use the -include like you are using it, but the -INCLUDE syntax did change in V8 (one of the biggest impacts I had in my conversion). This could be why you are getting that error. You now need to have the absolute path for the INCLUDE file. If you wanted to adjust what you have for that, you most likely would want to save you file to foccache and then specify the path to the file.

 -INCLUDE IBFS:/EDA/EDASERVE/foccache/FIELDS.ftm

This message has been edited. Last edited by: eric.woerle,


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
February 11, 2015, 12:34 PM
Danny-SRL
quote:

TABLE FILE HOLD
PRINT FIELDNAME
WHERE FIELDNAME NE 'COUNTRY';
ON TABLE SAVE AS FIELDS
END
-RUN
-*
TABLE FILE CARHOLD
SUM
-INCLUDE FIELDS
BY COUNTRY
END


It all depends in what environment you are running.
If it is within the portal then yes, you should use the full path as Eric writes.
If not, then I would code:
FILEDEF FIELDS DISK FIELDS.FEX  
-RUN
TABLE FILE HOLD 
PRINT FIELDNAME 
WHERE FIELDNAME NE 'COUNTRY'; 
ON TABLE SAVE AS FIELDS
END
-RUN
-*
TABLE FILE CARHOLD 
SUM
-INCLUDE FIELDS 
BY COUNTRY
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

February 12, 2015, 05:32 AM
amdev
Thanks for the assistance, I'll give these a try.