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     [CODE] Retrieving file object attributes

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CODE] Retrieving file object attributes
 Login/Join
 
Gold member
posted
Cool
I had a need to find out the date a reporting file was last updated.

I cobbled this solution together from posts on this forum and the user manuals and thought it might just help someone else.

It uses APP QUERY to dump a directory listing into system table FOCAPPQ which is defined in WebFocus.

I then queried the table to select the file I wanted and stored the date in a hold file which I then read.

Here is the sample code.

SET PCOMMA=ON
SET ALL=ON
APP QUERY CLECO_TEMP HOLD
TABLE FILE FOCAPPQ
WHERE FILENAME EQ 'IBIMRUSR.TXT' OR FILENAME EQ 'ibimrusr.txt'
PRINT DATE
ON TABLE SAVE AS FILEINFO FORMAT ALPHA
END
-RUN
-SET &TEXTDATE = 'NOT FOUND';
-READ FILEINFO, &TEXTDATE
-RUN

Other file attributes are also available (see definition of the FOCAPPQ table fo list).

I hope someone finds this useful!

This message has been edited. Last edited by: knegrotto,


WebFOCUS 769
Windows
all
 
Posts: 53 | Registered: April 29, 2009Report This Post
Virtuoso
posted Hide Post
Good One


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
Wow! Cool tip. Thanks for sharing it knegrotto!



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Great job!
We do something almost identical for an automated process that we have. An external customer sends us a file via FTP once a quarter. We never know exactly when it's going to come so we just have an automatic script that takes the ftp'ed file when it arrives, decrypts it using a private key and moves it to the location where the WF server can access it.

In order for the user to know whether they have the most current file, I wrote a very similar procedure that the user can run any time after the quarter end to see if the customer has submitted the latest required file.
SET HOLDLIST=PRINTONLY
APP QUERY FLATFILES HOLD
-RUN
DEFINE FILE FOCAPPQ
DATE_DMYY/A8DMYY=EDIT(DATE,'99$99$9999');
FDATE/MtrDYY=DATE_DMYY;
END
TABLE FILE FOCAPPQ
PRINT FILENAME/A12 SIZE FDATE AS 'DATE' TIME
WHERE FILENAME EQ 'filename.ftm';
END


Then they don't have to keep calling us to see when the new file will be available.

This message has been edited. Last edited by: Darin Lee,


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Well Darin, you've just given me a great idea to brush off ... I mean, to give business users more independence! Music



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 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     [CODE] Retrieving file object attributes

Copyright © 1996-2020 Information Builders