- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- File Attribute
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
Forums
Discussions
Discussions
Discussions
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
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
02-15-2007 12:18 AM
02-15-2007 12:18 AM
File Attribute
Or how is it possible to get file attribute like created date, modified date etc with out using lexical function F$FILE_ATTRIBUTES
Please help me..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2007 01:04 AM
02-15-2007 01:04 AM
Re: File Attribute
any language, including BASIC. For example
code in C, you could look at the source for
the Info-ZIP Zip program ([.vms]vmsmunch.c:
VMSmunch()).
http://www.info-zip.org/
http://www.info-zip.org/Zip.html
http://sourceforge.net/project/showfiles.php?group_id=118012
However, the fact that you're asking the
question suggests that you may be unfamiliar
with VMS system services, so some struggling
may be expected.
A quick Google search for:
basic qio OR qiow IO$_ACCESS
did find this potentially helpful example
showing how to do some similar things.
http://h18000.www1.hp.com/support/asktima/appl_tools/009688F7-F95FC060-1C0097.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2007 01:07 AM
02-15-2007 01:07 AM
Re: File Attribute
wr sys$output f$file("login.com","cdt")
21-JUL-2006 09:12:13.42
see th help with
$ help lexical f$file arg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2007 01:29 AM
02-15-2007 01:29 AM
Re: File Attribute
Are you sure you are talking VAX, not Alpha?
What version, what box? what VMS versions?
The data most basically is avaiable from the file system through QIO ans Steven suggests.
However, you may prefer the RMS access methods, where the dates will be mdae available in the XABDAT (or XABRDT) structure.
There you have three basic (sic) choices:
1) Use the BASIC language OPEN statement to have it create a FAB and RAB and provide a USEROPEN in which an XABDAT is hooked up.
Example: http://h18000.www1.hp.com/support/asktima/appl_tools/00928923-BAC83760-1C0069.html
2) Allocate your own FAB and XAB and call SYS$OPEN directory form Basic
Incolplete examples:
http://h71000.www7.hp.com/freeware/freeware60/rms_tools/bonus/indexed_file_patch.bas
http://h71000.www7.hp.com/wizard/wiz_4613.html
3) The above, but using C or Macro to do teh dirty work and just call a service routine from basic.
Good luck,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2007 02:29 AM
02-15-2007 02:29 AM
Re: File Attribute
inside. Sorry.
To make up here is a complete example.
Sample usage:
$ mcr sys$login:date_test login.com
RDT 30-JAN-2007 22:18:15.99
CDT 6-JUL-2006 13:04:50.47
EDT 17-NOV-1858 00:00:00.00
BDT 11-JAN-2007 05:00:26.55
$ type date_test.bas
1 OPTION TYPE = EXPLICIT, CONSTANT TYPE = INTEGER
!
! Get_file_dates.bas Hein van den Heuvel, Feb-2007
! Based on indexed_file_patch.bas example.
!
On error go to hell!
EXTERNAL LONG FUNCTION SYS$OPEN(FABDEF), LIB$GET_FOREIGN(STRING,STRING)
EXTERNAL LONG CONSTANT RMS$_NORMAL
%INCLUDE "$FABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"
%INCLUDE "$RABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"
%INCLUDE "$XABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"
%INCLUDE "$XABDATDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"
DECLARE STRING FILE_NAME, TXT
DECLARE INTEGER STAT, DATE_OFFSET, DATE_POINTER
MAP (RMS_BLOCKS) XABDATDEF XABDAT, RABDEF RAB, FABDEF FAB, &
STRING DATE_TIME = 23, NAME_BUFFER = 80
MAP (RMS_BLOCKS) XABDEF XAB ! Yuck
STAT = LIB$GET_FOREIGN (FILE_NAME, 'File name: ')
NAME_BUFFER = FILE_NAME !Move into static string for LOC().
FAB::FAB$B_BID = FAB$C_BID !Make this a real FAB
FAB::FAB$B_BLN = FAB$C_BLN !Make this a real FAB
FAB::FAB$L_FNA = LOC(NAME_BUFFER) !Put Address of name_buf in Fab
FAB::FAB$B_FNS = LEN(FILE_NAME) !Put Lenght of file_name in Fab
FAB::FAB$B_FAC = FAB$M_GET !READ access
FAB::FAB$B_SHR = FAB$M_UPI !No locking what so ever needed
RAB::RAB$L_FAB = LOC(FAB) !Put Address of Fab in Rab
FAB::FAB$L_XAB = LOC(XAB) !Put Address of Xab in Fab
XAB::XAB$B_COD = XAB$C_DAT !Make this a DAT XAB
XAB::XAB$B_BLN = XAB$C_DATLEN !Make this a DAT XAB
STAT = SYS$OPEN(FAB) !Open the file
CALL sys$exit(STAT BY VALUE) IF STAT <> RMS$_NORMAL
! Like to get OFFSETs, rather than fiels for the dates. Cheat:
! $ pipe libr/out=sys$output:/extr=$xab*def -
! SYS$LIBRARY:STARLET.mlb | search sys$pipe: t_overlay
DATA 12,"RDT",20,"CDT",28,"EDT",36,"BDT",0
READ DATE_OFFSET
WHILE (DATE_OFFSET)
DATE_POINTER = LOC(XABDAT) + DATE_OFFSET
CALL sys$asctim (0 BY VALUE, DATE_TIME, &
DATE_POINTER BY VALUE, 0 BY VALUE)
READ TXT
PRINT TXT, DATE_TIME
READ DATE_OFFSET
NEXT
GOTO 2
HELL: PRINT ERT$(ERR) UNLESS ERR = 11
RESUME 2
2 END
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2007 07:46 PM
02-18-2007 07:46 PM