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 currently have a scheduled procedure that fires off each day, and adds its' output to an ftm file. The cumulative output is emailed to me each day as a spreadsheet.
Here is the basic logic:
FILEDEF HOLD_APP DISK holdapp/2018Summary.ftm
(REPORT LOGIC)
TABLE FILE HOLD1 SUM FIELD1 FIELD2 (ETC) BY FIELD3 BY DATE BY HIGHEST FIELD4 ON TABLE HOLD AS HOLD_APP END
TABLE FILE HOLD_APP PRINT FIELD1 FIELD2 FIELD3 (ETC) ON TABLE PCHOLD FORMAT XLSX END
How would I go about using the accumulated data from 2018Summary.ftm in a separate report? I looked at "Saving and Retrieving HOLD files" in the user manual, but I'm messing something up.
I've tried:
APP PATH HOLDAPP
FILEDEF 2018SUMMARY DIR holdapp\2018summary.ftm
TABLE FILE 2018SUMMARY PRINT * END
but I don't have any metadata associated with 2018summary. I thought using HOLD AS would create the metadata, but that doesn't seem to be the case. Can anyone point me in the right direction?This message has been edited. Last edited by: rray9895,
Originally posted by Francis Mariani: The Master for the Hold file will disappear at the end of the request.
Try this:
ON TABLE HOLD AS holdapp/2018Summary
This will save the Master in app folder holdapp.
I'm getting help from a legend.
One thing, I forget when writing my code in the example that I am APPENDING
so it actually looks like
FILEDEF HOLD_APP DISK holdapp/2018Summary.ftm (APPEND
does that effect how I need to reference it? I would think I would need the ON TABLE HOLD AS HOLD_APP in order for it to append, or am I overthinking it?
Providing that the fields and their formats do not change, you should be OK in doing that.
However, a more secure / robust(?) method would be to insert the output from HOLD1 into a table (be it FOCUS or RDBMS etc.) using SQL or FOCUS MODIFY - depending upon your skills.
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
DBMS is a no go. If I'm understanding you correctly, that would be placing the output directly in our database. That would be a nightmare to finagle considering how rarely I need to do this. Our IT department keeps that too locked down.
quote:
However, a more secure / robust(?) method would be to insert the output from HOLD1 into a table (be it FOCUS
Where would I go to get some more information about this?
Alright, I'm still not doing something correctly apparently
APP PATH IBISAMP HOLDAPP
FILEDEF HOLD_TEST DISK holdapp/HOLDtest2.ftm (APPEND
TABLE FILE CAR
PRINT COUNTRY
CAR
MODEL
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS holdapp/HOLDtest2.ftm
END
I'm getting the ftm file, but it still isn't producing metadata. I'm overlooking something simple, I'm sure but I'm not sure what.
1. Your DDNAME is HOLD_TEST, your ON TABLE HOLD AS is not referencing your FILEDEF. 2. Your APP PATH command is overriding what you have access to.
To check what you have access to, at the top of any focexec, do: ? PATH -EXIT
This will display all folders availble to you; see if holdapp is there.
If not, Change to baseapp(AND, don't use mixed case, it will all be converted to lowercase anyway):
-* Don't do this
-* APP PATH IBISAMP HOLDAPP
FILEDEF HOLD_TEST DISK baseapp/holdtest2.ftm (APPEND
TABLE FILE CAR
PRINT COUNTRY
CAR
MODEL
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS HOLD_TEST FORMAT ALPHA
END
0 ERROR AT OR NEAR LINE 3 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: CAR
BYPASSING TO END OF COMMAND
The CAR synonym is in the IBISAMP app path. Several tables I reference are not in baseapp, and I always have to reference APP PATH in order to use them in a procedure.
That means your APP PATH is not set up on your Reporting Server, OR, ibisamp is not part of the path(should be, talk to your admin). Fine, include it, all will still work, IF, holdapp is a valid folder... If not, APP PATH IBISAMP BASEAPP AnyOtherFolderThatIsRequired...
I think I'm not communicating something correctly. Creating the ftm file in the application path isn't a problem, I also need it to create the metadata. Using the method you described above (APP PATH logic discussion is kind of getting us off track), the holdtest2.ftm file is getting created but I still don't have a synonym to reference in another procedure.
Originally posted by BabakNYC: According to the doc: APP HOLDMETA appname Specifies the application name for HOLD Master Files.
Wouldn't that force the master file for your hold file to go to a specific app path?
APP PATH IBISAMP
APP HOLDMETA HOLDAPP
FILEDEF HOLD_TEST DISK holdapp/holdtest2.ftm (APPEND
TABLE FILE CAR
PRINT COUNTRY
CAR
MODEL
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS HOLD_TEST FORMAT ALPHA
END
Result: FTM file created, No metadata created
quote:
Add APP HOLD BASEAPP after your APP PATH
APP PATH IBISAMP HOLDAPP
APP HOLD HOLDAPP
FILEDEF HOLDTEST2 DISK holdapp/holdtest2.ftm (APPEND
TABLE FILE CAR
PRINT COUNTRY
CAR
MODEL
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS HOLDTEST2 FORMAT ALPHA
END
Result: This totally works. My ftm file is getting created, AND I've got metadata. However, when I reference it in another procedure:
APP PATH HOLDAPP
TABLE FILE HOLDTEST2
PRINT *
END
Zero records returned.
I go to the reporting server and look at the synonym, I do sample data and get the same result.
My ftm file is at holdapp/holdtest2.ftm My synonym (holdapp/holdtest2.mas) looks like this: