- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: List the latest file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 10:37 PM
тАО05-07-2009 10:37 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 10:59 PM
тАО05-07-2009 10:59 PM
Solutionlastfile=""
last="17-NOV-1858"
last=f$cvtim(last,"COMPARISON")
Loop with file=f$search("*.*") over the directory,
get the creation date cdt=f$file(file,"CDT")
convert the date to comparison cdt=f$cvtim(cdt,"COMPARISON")
Compare to the last time saved
Set last to cdt if cdt .ges. last
Set lastfile to file in this case
Continue loop.
Or search on the VMS freeware disks for the program DIRBYDATE: it does not give You just the latest, but a directory listing with the latest first or last in the list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 11:08 PM
тАО05-07-2009 11:08 PM
Re: List the latest file
What are you trying to do ?
We need more detailed information.
Hakan
Ps. Jobbade tidigare p├Г┬е VMS-supporten hos Digital/Compaq/HP. Ds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2009 11:48 PM
тАО05-07-2009 11:48 PM
Re: List the latest file
You could use QDSB, downloadable from
http://www.quadratrix.be/qdsb.html
Example:
$ QDSB/SORTED=DATE_C=ORDER=DESC
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2009 12:35 AM
тАО05-08-2009 12:35 AM
Re: List the latest file
What a response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2009 12:43 AM
тАО05-08-2009 12:43 AM
Re: List the latest file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2009 12:59 AM
тАО05-08-2009 12:59 AM
Re: List the latest file
>> tried to pipe dir and sort but didnt succeed.
Because the default date format is not ISO or VMS "comparison": one has to switch date-format before the directory command, and has to fix the output fields with the /width qualifier, then one can pipe the output through sort.
I did this for the file size (because it's simpler :-), see
http://wwwvms.mppmu.mpg.de/util_root/com/dir_by_size.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2009 01:44 AM
тАО05-08-2009 01:44 AM
Re: List the latest file
http://wwwvms.mppmu.mpg.de/util_root/com/dir_by_date.com
but it will break the correct order and display whenever a dir-/file-specification exceeds the filename field width (80 in my example).
A slower DCL version using f$search loop is
http://wwwvms.mppmu.mpg.de/util_root/com/dir_by_date2.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2009 01:47 AM
тАО05-08-2009 01:47 AM
Re: List the latest file
$ DEFINE LIB$DT_FORMAT LIB$DATE_FORMAT_COMPARISON,LIB_TIME_FORMAT_001
$ pipe (dir/date/wid=file=40 | search sys$input ";" | sort/key=(pos:43,siz:22,desc) s
ys$input sys$output)
Hakan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2009 03:19 AM
тАО05-08-2009 03:19 AM
Re: List the latest file
@sys$startup:lib$dt_startup has been executed (best insert this in systartup_vms ).