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
July 22, 2008, 04:21 AM
GamP
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
July 22, 2008, 04:47 AM
Danny-SRL
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
July 22, 2008, 09:21 AM
Francis Mariani
-#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
July 22, 2008, 09:30 AM
Tom Flynn
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,
-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
July 22, 2008, 04:19 PM
Tom Flynn
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...
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
July 22, 2008, 04:43 PM
JohnB
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.
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
July 23, 2008, 02:19 AM
Tony A
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
July 23, 2008, 02:33 AM
Tony A
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 messageThis 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
July 23, 2008, 05:23 AM
GamP
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
July 23, 2008, 08:43 AM
Danny-SRL
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
July 28, 2008, 08:33 PM
JohnB
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.