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     capturing creation date of data file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
capturing creation date of data file
 Login/Join
 
Platinum Member
posted
Is the a variable displays the Modified Date shown in the Explorer window for a data file? If not, how would you include this date in a page heading?

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
From within your fex do a 'dos dir' for the file in question and store this in an intermediate file using teh redirect option (a '>'). Next read in the file using DM and manipulate that data to find out what the date is for the file.

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
Virtuoso
posted Hide Post
John,
Try this:
  
-* File cardate.fex
!DIR c:\ibi\apps\ibisamp\car.foc > a.a
FILEDEF AA DISK A.A
-RUN
-#GETDATE
-READ AA &GDATE.A10.
-IF &GDATE OMITS '/' GOTO #GETDATE;
-TYPE &GDATE


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
-#GETDATE appears to be an undocumented command, or is it some kind of Windows command?

A link to something about it would be handy.

Is !DIR some kind of non-DOS way of running a DIR command?


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
Expert
posted Hide Post
Francis,

-#GETDATE is nothing more than a DM label. Danny is doing a loop until the -READ includes a "/"

!DIR is a UNIX command which copies/"bangs"/"pipes" the details of the CAR database into a.a.
! can be replaced with UNIX DIR...

You can do the same in WINDOWS with DOS DIR, as GamP stated above...


FYI...

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
Expert
posted Hide Post
Right! Haven't had my morning tea yet!

Interestingly !DIRR works on my Windows Server 2003 installation. But I had to change the A10 to A11 to get the complete date in one DM variable.

Carry on.


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
Expert
posted Hide Post
Its a pity APP QUERY doesn't give you the modified date.

Francis -#GETDATE is a label, IBI tend to use -:label alot.

!dir is away to issue OS commands, you don't have to know what the OS is, it works for Unix and Windows, don't have a MF server to check though.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Francis,

Never thought of trying !DIR on WINDOWS, can type DOS fairly quickly!!! Smiler


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

You routine works exactly as it should when accessing files on the C: drive.

However, when accessing files on the U: drive this is the result:

  
 0 ERROR AT OR NEAR LINE     58  IN PROCEDURE data_check_cashbal
 (FOC295) A VALUE IS MISSING FOR: &GDATE


Please advise.

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
This means the !DIR command did not create the output file A.A.

Are you sure it's the U drive?

It may be the U drive on your workstation, but it is most likely the C, D or E drive on the WebFOCUS server...


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
Francis,

Yes, I'm sure. The U drive is on the server. Even for data files on the D drive of the server the result is the same.

I found this routine only works on files in the c:\ibi\apps\ibisamp directory.

How can we get this or some other routine to work on files in locations other than c:\ibi\apps\ibisamp?

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
Try changing the DIR command to

DOS DIR U:\ibi\apps\ibisamp\car.foc > a.a


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
quote:
DOS DIR


Results in the same error message.


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
This might work, it specifies the physical location of the temporary file:

-SET &ECHO=ALL;

-SET &TEMPDIR = TEMPPATH(60,'A60');

-SET &FILEINFO = &TEMPDIR || 'fileinfo.ftm';

DOS DIR D:\ibi\apps\ibisamp\car.foc > &FILEINFO
-RUN

FILEDEF FILEINFO DISK &FILEINFO
-RUN

-LOOP1
-READ FILEINFO &GDATE.A11.
-IF &GDATE OMITS '/' GOTO LOOP1;

-TYPE &GDATE


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
Here's the code. It still results in the same error message.

 
-SET &TEMPDIR = TEMPPATH(60,'A60');

-SET &FILEINFO = &TEMPDIR || 'fileinfo.ftm';

DOS DIR C:\ibi\apps\ibidemo\alerts.foc > &FILEINFO
-RUN

FILEDEF FILEINFO DISK &FILEINFO
-RUN

-LOOP1
-READ FILEINFO &GDATE.A11.
-IF &GDATE OMITS '/' GOTO LOOP1;

-TYPE &GDATE
 


John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
The error occurs if the file or directory in the DIR command (C:\ibi\apps\ibidemo\alerts.foc) does not exist.


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
Expert
posted Hide Post
JohnB,

Works in 7.6.5 on both, the Reporting Server and MRE:

 
-SET &TEMPDIR = TEMPPATH(60,'A60');
-SET &FILEINFO = &TEMPDIR || 'fileinfo.ftm';
DOS DIR C:\ibi\apps\ibidemo\alerts.foc > &FILEINFO
-RUN

FILEDEF FILEINFO DISK &FILEINFO
-RUN

-LOOP1
-READ FILEINFO &GDATE.A11.
-IF &GDATE OMITS '/' GOTO LOOP1;

-TYPE &GDATE
 


Output:

-SET &TEMPDIR = TEMPPATH(60,'A60');
-SET &FILEINFO = C:\ibi\DEVSTU~1\srv76\wfs\edatemp\ts000001\ || 'fileinfo.ftm';
DOS DIR C:\ibi\apps\ibidemo\alerts.foc > C:\ibi\DEVSTU~1\srv76\wfs\edatemp\ts000001\fileinfo.ftm
-RUN
-TYPE C:\ibi\DEVSTU~1\srv76\wfs\edatemp\ts000001\
C:\ibi\DEVSTU~1\srv76\wfs\edatemp\ts000001\
-TYPE C:\ibi\DEVSTU~1\srv76\wfs\edatemp\ts000001\fileinfo.ftm
C:\ibi\DEVSTU~1\srv76\wfs\edatemp\ts000001\fileinfo.ftm
FILEDEF FILEINFO DISK C:\ibi\DEVSTU~1\srv76\wfs\edatemp\ts000001\fileinfo.ftm
-RUN
-LOOP1
-READ FILEINFO &GDATE.A11.
-IF Volume in OMITS '/' GOTO LOOP1;
-LOOP1
-READ FILEINFO &GDATE.A11.
-IF Volume Ser OMITS '/' GOTO LOOP1;
-LOOP1
-READ FILEINFO &GDATE.A11.
-IF Directory OMITS '/' GOTO LOOP1;
-LOOP1
-READ FILEINFO &GDATE.A11.
-IF 10/26/2006 OMITS '/' GOTO LOOP1;
-TYPE 10/26/2006
10/26/2006
-EXIT


Are you using DevStudio???
Are you MAPPED to WebFOCUS???

I've never seen drive U used as the default drive...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Here's the output I got:

  
 -SET &TEMPDIR = TEMPPATH(60,'A60');
 -SET &FILEINFO = C:\ibi\srv76\wfs\edatemp\ts000122\                           || 'fileinfo.ftm';
 DOS DIR C:\ibi\apps\ibidemo\alerts.foc > C:\ibi\srv76\wfs\edatemp\ts000122\fileinfo.ftm
 -RUN
 FILEDEF FILEINFO DISK C:\ibi\srv76\wfs\edatemp\ts000122\fileinfo.ftm
 -RUN
 -LOOP1
 -READ FILEINFO &GDATE.A11.
 0 ERROR AT OR NEAR LINE     63  IN PROCEDURE data_check_valuati
 (FOC295) A VALUE IS MISSING FOR: &GDATE


The file C:\ibi\apps\ibidemo\alerts.foc does exist.

I don't know why this environment is using the U: drive on the server. All focexecs run fine and they access those data files on the U: drive and other drives.

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
JohnB,

Put

-SET &ECHO=ALL:
-DEFAULT &GDATE = ''

at the top of data_check_valuati

also, do the following after the FILEDEF:

? PATH
? FILEDEF
DOS STATE &FILEINFO
-RUN

See what the output is, maybe post it and we can see something...

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
Have you tried just the DOS DIR command?

DOS DIR C:\ibi\apps\ibidemo\alerts.foc

If that doesn't give you something like the following then WebFOCUS doesn't 'know' the file the same way you 'know' the file.


 Volume in drive D is IBI
 Volume Serial Number is 64D5-9CBB
 Directory of D:\IBI\APPS\IBISAMP
 02/21/2005  12:38 PM            32,768 car.foc
 1 File(s)         32,768 bytes
 0 Dir(s)  154,007,011,328 bytes free


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
Francis,

WebFOCUS doesn't 'know' the file. But why does it know files in C:\ibi\apps\ibisamp?


DOS DIR C:\ibi\apps\ibidemo\alerts.foc
-EXIT
The system cannot find the file specified.

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
JohnB,

Please do a ? PATH and place the output here...


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
John,

DOS DIR C:\ibi\apps\ibidemo

for a complete list of files in that directory.

DOS DIR C:\ibi\apps\ibisamp

for a complete list of files in that directory.

Do a

DOS DIR U:\ibi\apps\whatever-your-directory-is

for a complete list of files in that directory.

This should tell you if the file you're looking for actually exists.

Are you running this in DevStudio? Is it pointing to ONLY your local server?


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
Expert
posted Hide Post
quote:
DOS DIR U:\ibi\apps\whatever-your-directory-is
Remember that this command will be run on your reporting server (where ever that might be - local or remote) and the drive letter specified in the DOS DIR command (can also use ! DIR or CMD DIR on windoze) has to be available on THAT machine. If it isn't then use the form \\servername\c$\file-path-info.

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
Better still, use a little error code detection -

! DIR C:\wf76\ibi\apps\ibidemo\alerts.foc > temp.dat
-RUN
-IF &RETCODE NE 0 THEN :NoFile;
FILEDEF FILEINFO DISK temp.dat
-RUN
-LOOP1
-READ FILEINFO &GDATE.A11.
-IF &GDATE OMITS '/' GOTO LOOP1;
-TYPE &GDATE
-EXIT
-:NoFile
-TYPE The system cannot file the file specified

On our 7.6.2 set-up this returns the message as the ibidemo library doesn't exist (first appeared in 7.6.5?).

T

Edited to relate that the "error" returned is the final TYPE message

This message has been edited. Last edited by: Tony A,



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
Virtuoso
posted Hide Post
If it is the U: drive, then it is probably a network share.
Don't have any experience with this under 76, but in earlier versions, when you start your server it would not respect any network drives, so without any further action it would not have the U: drive available to it.
I had to solve this by adding the net use command to create the U: drive for use within your server environment to either the edasprof or the fex that needs it.
It may very well be that this behaviour still exists in the 76x versions....

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
Virtuoso
posted Hide Post
John,

This really generated a lot of excitement. Let's see what can be done.

Did you try running in a fex:
!dir U:\

You should get the root directory of your U: drive. If you get nothing or something like "The system cannot find the path specified", that means that the U: drive is not defined in the server.

If there are no problems, do:
!dir U:\ > a.a
!type a.a


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
It turned out that what I see as our U: drive is the D: drive on the server. Changing the code from U: to D: solved the problem.

Thank you, Everyone!


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 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     capturing creation date of data file

Copyright © 1996-2020 Information Builders