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] Capture result of ? Query into a file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Capture result of ? Query into a file
 Login/Join
 
Member
posted
I need to display the date and time of the last modification made to a file. The ?FDT query shows me this. Is it possible to write this information to a file that I can parse out and extract the Date/Time information? This would enable me to display this info on an HTML page of our self-service screen. The only other option I can think of is to create another field in each data base 'LAST_UPDATE_DATE' and add logic to our update programs to record the Date/Time of each update.

This message has been edited. Last edited by: Kerry,
 
Posts: 14 | Registered: December 30, 2005Report This Post
Guru
posted Hide Post
Here is a fex that will get you what you need. Just modify it to show what you want to. FOCAPPQ is a special system "table" that contains this information. Set &APPFOLD to your application folder name (Self-Serve).
 
APP QUERY &APPFOLD HOLD

DEFINE FILE FOCAPPQ
FILETYPE/A3=GETTOK(FILENAME,70,2,'.',3,'A3');
RMSL/A8=EDIT (DATE, '99$99$9999');
READDATE/YYMD=DATECVT(RMSL,'A8DMYY','YYMD');
END


TABLE FILE FOCAPPQ
ON TABLE SET PAGE-NUM OFF
ON TABLE SET LINES 999999
HEADING
"WebFocus Application <APPNAME "
"On &WF_ENV Environment"
" "
FOOTING
"All files are shown lower case regardless of actual filename case."
PRINT
	FILENAME AS 'Filename'
 SIZE AS 'Filesize,in bytes'
 READDATE AS 'Date Last,Updated'
 TIME AS 'Time Last, Updated'
BY FILETYPE
ON TABLE SET STYLE *
TYPE=HEADING, LINE=1, SIZE=12, STYLE=BOLD, JUSTIFY=CENTER,$
TYPE=HEADING, LINE=1, OBJECT=FIELD, COLOR=RED, STYLE=BOLD+UNDERLINE,$
TYPE=HEADING, LINE=2, SIZE=11, STYLE=BOLD, JUSTIFY=CENTER,$
TYPE=TITLE, SIZE=10, STYLE=BOLD, COLOR=RED,$
ENDSTYLE
END

 


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Expert
posted Hide Post
quote:
APP QUERY &APPFOLD HOLD

N.
Can you tell me what this command does?
in FILEDEF terms?
thanks.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
From the docs:
quote:
APP QUERY app HOLD - Writes a list of all files in the application app in the file focappq.ftm in a temporary directory; the output is described by focappq.mas

http://documentation.informationbuilders.com/masterinde...adm532/05access3.htm

Simple fex:
-*--- List files in an APP folder --------------------------

APP QUERY eqp HOLD

TABLE FILE FOCAPPQ
WHERE FILENAME CONTAINS '.fex'
PRINT *
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Anybody have an idea on how to capture the output of an '? FILE filename' ???


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 2003Report This Post
Virtuoso
posted Hide Post
Currently there is no standard way of doing this. IBI is researching on how to implement this, but it won't be here soon.
Meanwhile, you could misuse the good old tracing mechanism to do this.
Example:
SET TRACEOFF = ALL
SET TRACEON = ALL
SET TRACESTAMP=OFF
SET TRACEUSER=TEST.TRC
-RUN
? FILE somefocusfile
SET TRACEOFF = ALL
-RUN
FILEDEF MASTER DISK TRACE.MAS
FILEDEF TRACE DISK TEST.TRC
-RUN
-WRITE MASTER FILENAME=TRACE, SUFFIX=FIX
-WRITE MASTER SEGNAME=TRACE
-WRITE MASTER FIELDNAME=LINE, FORMAT=A200, ACTUAL=A200, $
-RUN
APP HOLD SESSION
DEFINE FILE TRACE
RESULT/A175 = SUBSTR(200,LINE,45,200,155,'A155');
END
TABLE FILE TRACE
PRINT RESULT
IF LINE CONTAINS 'ngput'
ON TABLE SAVE AS OUTPUT
END
-RUN

Now there is a file stored in your SESSION app dir called output.ftm, which contains the output of the ? FILE command.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report 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] Capture result of ? Query into a file

Copyright © 1996-2020 Information Builders