Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Creating new focus file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Creating new focus file
 Login/Join
 
Silver Member
posted
I am using the following code to concatenate two files into a new focus database. With the SET TEMPERASE=OFF I can find the files in a temporary directory on the report server. Is there a way to redirect the new focus files to a specific directory. I've tried using the FILEDEF command but cannot seem to get it to work.

SET TEMPERASE=OFF
DEFINE FILE TRACKLOG
LOGKEY/A17=LOGKEY;
LOGTOD/A8=LOGTOD;
LOGDATE/A8=LOGDATE;
PROGRAM/A10=PROGRAM;
TAG/A20=TAG;
CLIENT/A10=CLIENT;
IPADDR/A20=IPADDR;
SERVER/A10=SERVER;
BASE/A20=BASE;
END
TABLE FILE TRACKLOG1
PRINT LOGKEY LOGTOD LOGDATE PROGRAM TAG CLIENT IPADDR SERVER BASE
ON TABLE HOLD AS NEWTRACKLOG FORMAT FOCUS
BY LOGKEY
BY LOGTOD
BY LOGDATE
BY PROGRAM
BY TAG
BY CLIENT
MORE
FILE TRACKLOG
END

Thanks,
Ron

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 38 | Location: Milwaukee | Registered: April 28, 2005Report This Post
Expert
posted Hide Post
Try the USE command, used for FOCUS databases:

USE
D:\path\DBNAME.FOC NEW
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
I tried using the "USE" statement described and I'm still not finding the focus database in the directory entered. It only shows up in the temp directory.

Ron
 
Posts: 38 | Location: Milwaukee | Registered: April 28, 2005Report This Post
Expert
posted Hide Post
Let's see your code.

The USE command must state the same db name as the ON TABLE HOLD command.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Ron, on my site i have an 8-character limit to the filename of a new focus db.
USE
D:\IBI\path...\NEWTRACK.FOC NEW
END
... make the file
..then
CMD COPY NEWTRACK.MAS D:\IBI\path..\NEWTRACK.MAS /Y
I find copying the masters out of the agent cleaner than using FILDEF HOLDMAST or SET TEMPDIR

PS: I'm wrong about the 8 char limit. that vanished, i just never knew! Smiler
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Susannah, have you tried

APP HOLDMETA appname

With this command, HOLD Masters get created in the specified App directory - no FILEDEF HOLDMAST or COPY needed.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
It looks like it was a combination of things. I had to change the code so that the database name was the same in the USE and the ON TABLE HOLD statements, and I had change the db name to 8 characters or less. After these changes the .FOC file was created in the correct directory and the .MAS file was created in the temp directory.

Thanks for your help.

Ron
 
Posts: 38 | Location: Milwaukee | Registered: April 28, 2005Report This Post
Expert
posted Hide Post
Thanks Francis, but i use edapath.
oui, dinosaur, moi.
and i don't filedef holdmast ever because i want to make sure no interim masters get held. I'm guessing an APP HOLDMETA would hold interim masters as well, yes?
and i control my copy with dm so that i only copy on certain conditions.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Yes, unfortunately, APP HOLDMETA holds the interim masters as well. This is annoying. Even more annoying is that it also holds the FOC$HOLD master which, as far as I can remember, can cause problems if it exists in the APP Path.

It would be nice if we could issue the APP HOLDMETA command as ON TABLE APP HOLDMETA appname
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
so,Francis, how about this?
how about app holdmeta to your agent
and then use the dos command to copy your resulting master out of your agent and into wherever you want?
i do it that way to avoid any foc$hold anywhere
i do it like this:
-SET &MYPATH = TEMPPATH(40,'A40');
-* take off that last \ so set tempdir works
-SET &AL = ARGLEN(40,&MYPATH,'I2') -1 ;
-SET &LAL ='A'|&AL;
-SET &MYPATH = SUBSTR(40,&MYPATH,1,&AL,&AL,'&LAL');
and then when i need to absolutely make sure stuff isn't getting written where i dont want it,
FILEDEF HOLDMAST &MYPATH
SET TEMPDIR = &MYPATH
then when i'm good and ready...
COPY &MYPATH|\MYMASTER.MAS D:\IBI\...wherever
you don't even need the mypath in this case, since the agent defaults to the top, but maybe thats an edapath thing. dunno.
This is useful to me in a big etl job where the TEMPDIR has to get set somewhere real at the beginning, and then i want to UNset it later in the job;
Ron, i hope i'm not annoying you with a side conversation in your thread.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Excepts from Francis and Susannah:
quote:
Susannah: oui, dinosaur, moi. ...

I'm guessing an APP HOLDMETA would hold interim masters as well, yes?
 
Francis: Yes, unfortunately, APP HOLDMETA holds the interim masters as well. This is annoying. Even more annoying is that it also holds the FOC$HOLD master which, as far as I can remember, can cause problems if it exists in the APP Path.

It would be nice if we could issue the APP HOLDMETA command as ON TABLE APP HOLDMETA appname

Well, the good news is that there is an APP DELETEF command. I would encourage everyone to use APP DELETEF if you do not want the files to be used after the execution of the fex. But, then again, don't use "APP HOLDMETA / APP HOLDDATA" if the HOLD file are only for the current session.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Creating new focus file

Copyright © 1996-2020 Information Builders