Focal Point
FOCUS error 1166 in FOCUS 7.1.1

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

August 23, 2005, 06:59 PM
gppande
FOCUS error 1166 in FOCUS 7.1.1
What is the meaning of this FOCUS error in 7.1.1?

(FOC1166) CREATE FUNCTION NOT AVAILABLE FOR THIS
ENGINE

I suspect this to be something wrong with my focmaster. I never got this error before doing changes to focmaster.

Thanks in advance.
GP.
August 24, 2005, 10:05 AM
Tony A
What is the suffix of your master file?
August 24, 2005, 03:24 PM
gppande
SUFFIX=FIX
August 24, 2005, 03:46 PM
Tony A
There's your problem then, you can't do a create file on SUFFIX=FIX. That is a flat file by any other name.

What are you trying to do? Sample code?
August 25, 2005, 02:33 AM
susannah
gppande, as tony says, you can't CREATE a fix file, but you dont really need to. you can certainly make one, and you don't need the verb CREATE.
you just need to filedef it and write it out.
FILEDEF MYFILE DISK D:\IBI\wherever\MYFILE.TXT
or .FTM
then write to it any number of ways
TABLE FILE CAR
PRINT something
ON TABLE HOLD AS MYFILE {FORMAT ALPHA}
.or you can use dialog manager
-WRITE MYFILE some &vars from your workspace
You can filedef it with (APPEND and write stuff out to the end of an existing one.
all kinds of stuff you can do. easy. agony free.
August 25, 2005, 07:28 AM
Tony A
Too true Susannah, but you can also filedef using the APP command -

APP FI MYFILE DISK [application]/filename.extn

or

APP FI MYFILE DISK [path]/filename.extn

and then write to it in all the ways you've mentioned including SAVE and SAVEB.

If you do not want to bother defining the file but wish to have the file deposited into an application folder you can also use -

APP HOLD [application]

If you only want the data, you would use -

APP HOLDDATA [application]

and if you only want the master -

APP HOLDMETA [application]
August 25, 2005, 03:36 PM
<Joseph Coule>
quote:
Originally posted by gppande:
[qb] SUFFIX=FIX [/qb]
You've probably got a HOLD.MAS (HOLD MASTER) earlier in the path and then you're doing HOLD FORMAT FOCUS in your procedure. The procedure finds HOLD MASTER with suffix=fix earlier in the path somewhere and generates the error.

HOLD FORMAT FOCUS issues a CREATE FILE against the ddname (the filename) used in the HOLD procedure. If this is the case, simply use a different ASNAME in the HOLD FORMAT FOCUS (e.g., HOLD AS TEMP1 FORMAT FOCUS).

As Tony suggested, a short code sample would help clear things up.

JC
August 26, 2005, 01:06 AM
gppande
Hi all,
Sorry for the delay. As Joseph said, I am creating a intermediate HOLD file with format FOCUS. It executes FOC$HOLD which is creating a file. I renamed it and all worked fine !!! Now the question is what is HOLD.MAS?

Thanks for all your help.

GP.
August 26, 2005, 03:11 PM
<Joseph Coule>
quote:
Originally posted by gppande:
[qb]Now the question is what is HOLD.MAS?
[/qb]
HOLD.MAS is the master file description created for a temporary HOLD file. The name "HOLD" is the default, but you can call your hold file anything you like.

My guess is that there is a HOLD.MAS somewhere in your path on a non-writeable drive. When the FOC$HOLD procedure creates a new HOLD.MAS (with SUFFIX=FOC) it is not used in the load because WebFOCUS finds the other file first with SUFFIX=FIX (hence the FOC1166 error).

You could investigate this to see if the other HOLD.MAS file is needed by anyone or any program, and if not, then you could have it deleted. Or just use a different ASNAME (e.g., HOLD AS FRED FORMAT FOCUS).

Glad you got it running.

JC