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.
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.
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.
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, 2004
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.
Tony, you may also use the quote from Ever After - "Do not speak unless you can improve the silence". I use that a lot.
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.
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.
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 .
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, 2004
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.
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, 2007
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.
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
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.