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     Making a permanent table

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Making a permanent table
 Login/Join
 
Gold member
posted
hi,

I am executing a stored proc and fetching some data in SQLOUT. I want to permanently save this data in a FOCUS table which also has a corresponding MAS file, so that I can access this data later.

Please suggest an approach for creating permanent FOC and MAS file.

Thanks
 
Posts: 78 | Registered: December 11, 2005Report This Post
Expert
posted Hide Post
Check out documentation on APP HOLD


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Thanks,

But i dont have access to the documentation. Even the WF 7.1 help doesnt have much to discuss.
 
Posts: 78 | Registered: December 11, 2005Report This Post
<Tim Howard_ABCBS>
posted
The following code will allow you to save the results in a directory on the Data Server. Hope this may be what you are looking for:

APP FI HOLDTST directory/filename.ftm

TABLE FILE CAR
PRINT
COUNTRY
ON TABLE HOLD AS HOLDTST
END


Use the same 'APP FI ...' command to access the file when you need it.

Tim H.
 
Report This Post
<Tim Howard_ABCBS>
posted
If you have access to the support site, the following document explains all the different types of permanent hold file methods:

http://documentation.informationbuilders.com/masterinde...adm761/05access8.htm


Tim H.
 
Report This Post
Expert
posted Hide Post
BS!,

Select Help in DS, type in "APP HOLD", and boom, documentation. I'm tired of coding for people that don't want to help themselves;

maybe, TAKE A CLASS!!!!

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
Tom, Be NICE instead of jumping on someone try telling them how you pulled up the documentation maybe they don't know how. We are need help now and then.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
Tom,

I agree with TS that your response is a little harsh. There are many ways in which one can reply without being so forceful.

The main thing here is that if you're "tired of coding for people that don't want to help themselves", then don't help, just do not reply to the request (I know because I do just that). That way, your blood pressure will not be raised, no one can take offence at what you've posted, and everyone will be calm and happy.

Remember, the Forum boasts many gifted contributors who will probably be able to provide a meaningful and helpful response, and that is what the Forum thrives upon.

As Kango said to Roo, "if you can't say anything nice, then don't say anything at all"

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<lfrerker>
posted
Try APP HOLD baseapp -- this will place the focus file and it's master file into baseapp which you can then access within a fex or through the gui tools.
 
Report This Post
Guru
posted Hide Post
Tony, you may also use the quote from Ever After - "Do not speak unless you can improve the silence". I use that a lot. Wink

I'm fairly new to webfocus so don't put too much weight on my response but I've done this one before:

  
FILEDEF file1 DISK directory/filename.txt

ENGINE SQLODBC SET DEFAULT_CONNECTION connect1
SQL SQLODBC
SELECT field1, field2
FROM table1;
TABLE FILE SQLOUT
PRINT *
ON TABLE SAVE AS file1 FORMAT ALPHA
END
-RUN

USE
directory/focusdb.foc NEW
END

CREATE focusdb
MODIFY FILE focusdb
FIXFORM FROM file1
DATA ON file1
END



This requires a file1.mas as a FIX file and focusdb.mas as a FOC file. The CREATE statement will create a new focus db. If the db already exists, take out the NEW on the use statement and take out the CREATE statement - this will make the MODIFY append the data to the existing db.

And if you're looking for documentation on MODIFY, I think it's a whole book all to itself.

wf 7.1.4


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Expert
posted Hide Post
Well, I guess my PC skills need some refining!!

The access to documentation struck a chord; I, as most of the senior mentors on this site, have burned the midnight oil with paging through manuals, testing code at all hours, talking with other consultants, going to Top Gun, FUSE, etc. to advance our knowledge necessary to complete mission-critical projects.

This new world, where "NEW" consultants are looking for actual code to complete their mission-critical tasks, are affecting many areas in the consultant, WF fireperson (PC??), road warrior world. These are career-affecting areas and, well, I got upset and decided to voice an opinion, and, obviously, without the dignity this site deserves.

For that, I apologize.

This is an excellent mentoring site, with many differing views on how to climb the WebFOCUS mountain. I don't proffer to get a slap-on-the-back, I own a few mirrors, but to direct individuals to areas where they can gleen the info on their own.

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Tom,

I couldn't agree more with your sentiment and I have been close to your earlier response myself, but after some thought I decided to alter my response. We just hope your blood pressure is OK Wink.

These "easy ride" folk are in the minority though and nil responses to questions may "encourage" them to at least try for themselves. Most, if not all, of them have to try and learn the language (seemingly) without the support of their company through training etc.

Anatess,

A good quote and not one I've heard - must be all the cartoons I watch (not).

Oh, and never put yourself down, there is always need for differing insights and the views and input of new-to-webfocus folks are as important as those from the dyed-in-the-wool breed.

In fact your post brings up a point over storing FOCUS Dbs, that being that if you HOLD FORMAT FOCUS (or XFOCUS) you will get an additional column that you may not want - FOCLIST (although there are occasions when you do not). By approaching the problem as you have you end up with the DB as you want it.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<Tim Howard_ABCBS>
posted
So am I reading this correctly. Using FILEDEF instead of APP ... you do not get the FOCLIST field? I knew FILEDEF was another approach, but did not know the differenct. Maybe I need to change the way I'm doing it.

Tim H.
 
Report This Post
Virtuoso
posted Hide Post
I would mix and match lfrerker and Anatess. For when you want to extract, use and not update again (providing there is not too much data here):
APP HOLD baseapp
ENGINE SQLODBC SET DEFAULT_CONNECTION connect1
SQL SQLODBC
SELECT field1, field2
FROM table1;
TABLE FILE SQLOUT
PRINT fieldd
BY fielda
BY fieldb
BY fieldc
ON TABLE HOLD AS file1 FORMAT FOCUS
END

This will produce a FOCUS db, with Master file. The BY fields determine any repeat records, so for the car file you would have:
TABLE FILE CAR
PRINT SALES RCOST DCOST
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
ON TABLE HOLD FORMAT FOCUS
END

This is just one of a multitude of optiosn open to you.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
<Tim Howard_ABCBS>
posted
The only problem with using 'APP HOLD directory' is that it will hold any hold files used in the focexec, including ones you may not want. This is not a problem if the only hold file produced is the one you want to keep, but if others are used in processing, it can kinda cause a mess. Both 'APP FI' and 'FILEDEF' allow you to specify the hold file name you want to hold and only stores those files permanently.

Tim H.
 
Report This Post
Expert
posted Hide Post
Tim,

The APP command does NOT have to be at the beginning of the request:


TABLE FILE WHATEVER
ETC,
ON TABLE HOLD AS HOLD1
END
-RUN
TABLE FILE WHATEVER
ETC,
ON TABLE HOLD AS HOLD2
END
-RUN
TABLE FILE WHATEVER
ETC,
ON TABLE HOLD AS HOLD3
END
-RUN
TABLE FILE WHATEVER
ETC,
ON TABLE HOLD AS HOLD4
END
-RUN

MATCH/JOIN FILE ETC.
AFTER MATCH HOLD AS FINAL (OLD-OR-NEW)
END
-RUN
APP HOLD FOLDERNAME
-RUN

TABLE FILE FINAL
THIS WILL BE THE ONLY FILE THAT IS CATALOGUED TO THE FOLDERNAME....
ON TABLE HOLD AS GOTITALL FORMAT XXXXXXXX
END
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
<Tim Howard_ABCBS>
posted
That makes sense, thanks for the tip. I'll remember that next time. I got in a bad habit of putting my APP and FILEDEF commands at the beginning.

Tim H.
 
Report This Post
Expert
posted Hide Post
Tim,

FILEDEF has nothing to do with the FOCLIST field, apologies if I misled you?

As for the APP comand, don't forget that you can direct the metadata and the data to different app files -

APP HOLDMETA mymfds
APP HOLDDATA mydata

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
The FOCLIST field only rears it's head with PRINT *

to fully remove, add the BY columns to the VERB list, then do the BY columns with NOPRINT...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
<Tim Howard_ABCBS>
posted
Yea, I understand the different types of APP commands availalbe, I've printed them off because I forget everytime I need them. I think possitioning them properly will help solve most of my issues.

Again, thanks for the help and great tips.

Tim H.
 
Report This Post
<Tim Howard_ABCBS>
posted
Tom,

Thanks, that helps alot. I've had problems with the FOCLIST in the past and that definitely helps in understanding why.

Tim H.
 
Report This Post
Master
posted Hide Post
quote:
to fully remove, add the BY columns to the VERB list, then do the BY columns with NOPRINT...


or use SUM instead of PRINT. SUM eliminates FOCLIST.

Another option for non-Mainfram without using APP HOLD is to follow your TABLE command with a -RUN and system copy command. For example,

-RUN
-UNIX cp focusfile.* /path/baseapp


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report 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     Making a permanent table

Copyright © 1996-2020 Information Builders