gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1617 Posts in 535 Topics by 779 Members - Latest Member: rhoronjeff@comcast.net December 02, 2022, 09:46:45 PM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Support  |  General  |  Does Absoft support PXFSTAT or something similar?
gfx
gfxgfx
 

Author Topic: Does Absoft support PXFSTAT or something similar?  (Read 6484 times)

rboone

  • Newbie
  • *
  • Posts: 11
Does Absoft support PXFSTAT or something similar?
« on: February 17, 2010, 05:08:02 PM »
Folks,

I'm an intermediate programmer, tracking down a specific issue.  I would like to access the time stamp on an existing file, to know if it has been modified since last used.  Some browsing on the web suggests that STAT, or better, PXFSTAT, are the best and most portable way of getting that information.  Does Absoft have a means of supporting the PXF tools?

Thank you,
Randy

Mike Linacre

  • Sr. Member
  • ****
  • Posts: 259
Re: Does Absoft support PXFSTAT or something similar?
« Reply #1 on: February 17, 2010, 06:26:41 PM »
Randy: What platform are you targeting? Linux, Mac, Windows, ....

rboone

  • Newbie
  • *
  • Posts: 11
Re: Does Absoft support PXFSTAT or something similar?
« Reply #2 on: February 17, 2010, 08:56:20 PM »
Hi Mike,

I'm using Absoft 10.1.2 on a Windows XP or 7 machine, but looking for portability, to allow use on a Linux multi-core cluster some day.  I've read advice about isolating potential platform dependent code into its own routine, and will do that.  So if I need to edit a bit to get the Linux version to compile (perhaps using g95), that's no problem.  But I don't want to build something that just won't port into the core of the program.  Beyond that, I don't know Abosft even supports calls to the STAT or PXFSTAT routines.

Thanks again,
Randy

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 333
Re: Does Absoft support PXFSTAT or something similar?
« Reply #3 on: February 18, 2010, 09:29:59 AM »
Try the Absoft Unix support library. It contains fstat(), lstat(), and stat() functions. From the command line, add the library as "unix.lib". From AbsoftTools, check "Unix library" on the General page of the Options dialog. Documentation is in Start | Programs | Absoft Pro Fortran 10.1 | Documentation | Support Library Guide

The Unix library is available on all Absoft supported platforms and is a fairly common feature of most Fortran implementations.

rboone

  • Newbie
  • *
  • Posts: 11
Re: Does Absoft support PXFSTAT or something similar?
« Reply #4 on: February 18, 2010, 03:50:00 PM »
Great, thanks for the reply.  I should have caught that.  The library you cite should do nicely.

Randy

Mark Coxhead

  • Jr. Member
  • **
  • Posts: 82
Re: Does Absoft support PXFSTAT or something similar?
« Reply #5 on: February 19, 2010, 03:59:38 AM »
Hello Forum Admin,

Can we extend the scope of the question to the one I asked on 11th August 2009, but which, unfortunately, received no response please:

Quote
When in Windows Explorer and you RIGHT CLICK on a file created by a Fortran program (or via most other languages for that matter), and go to PROPERTIES and then the SUMMARY tab, there are whole host of blank fields:


Title
Subject
Author
Category
Key words
Comments


My question is an enquiry into whether these fields can be populated using the Abosft Fortran OPEN statement?   If so how, and what are the parameters?

I have seen a solution in Visual Basic that uses a DLL DSOFILE3 (aka OLE FILE PROPERTY READER 2.1) that achieves this result for VB applications and so I assume is probably achieveable within an Absoft environment?

The reason why we have this requirement is to create an audit trail on some of the files so as to establish a mechanism to indicate which files have been manually produced and those generated by our systems.

Thank you.


I looked at the FSTAT, STAT and LSTAT functions and these allow the programmer to enquire and read  the various statitics, but not actually update.
« Last Edit: February 19, 2010, 04:04:25 AM by Mark Coxhead »

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 333
Re: Does Absoft support PXFSTAT or something similar?
« Reply #6 on: February 19, 2010, 11:22:36 AM »
Hello Forum Admin,

Can we extend the scope of the question to the one I asked on 11th August 2009, but which, unfortunately, received no response please:


I don't think adding this feature to the compiler and runtime library is the most appropriate solution. The runtime library code base is more than 95% platform independent; the same code is used on Windows, Linux and Macintosh. This provides reliability for Absoft and for our customers. Our previous experience of doing this on the Macintosh in the mid 1980's is still haunting us with end-user incompatible code when Apple deprecated this feature.

I think a more appropriate solution would be a function or set of functions to directly manipulate the file directory entry where I believe this information is maintained. There may be permission problems, but we will look into it. 

Mike Linacre

  • Sr. Member
  • ****
  • Posts: 259
Re: Does Absoft support PXFSTAT or something similar?
« Reply #7 on: February 19, 2010, 07:13:34 PM »
One way to change file properties under Windows would be to "shell" out to a .NET module which would do the work - probably best done immediately after the file is closed. Pass the file name and desired properties on the "shell" command line.

For code, see: Microsoft Developer Support OLE File Property Reader 2.1 Sample (KB 224351)

Absoft User Forum  |  Support  |  General  |  Does Absoft support PXFSTAT or something similar?
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!