<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: File Attribute in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028622#M24106</link>
    <description>One can do this using VMS system services in&lt;BR /&gt;any language, including BASIC.  For example&lt;BR /&gt;code in C, you could look at the source for&lt;BR /&gt;the Info-ZIP Zip program ([.vms]vmsmunch.c:&lt;BR /&gt;VMSmunch()).&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.info-zip.org/" target="_blank"&gt;http://www.info-zip.org/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.info-zip.org/Zip.html" target="_blank"&gt;http://www.info-zip.org/Zip.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://sourceforge.net/project/showfiles.php?group_id=118012" target="_blank"&gt;http://sourceforge.net/project/showfiles.php?group_id=118012&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;However, the fact that you're asking the&lt;BR /&gt;question suggests that you may be unfamiliar&lt;BR /&gt;with VMS system services, so some struggling&lt;BR /&gt;may be expected.&lt;BR /&gt;&lt;BR /&gt;A quick Google search for:&lt;BR /&gt;&lt;BR /&gt;      basic qio OR qiow IO$_ACCESS&lt;BR /&gt;&lt;BR /&gt;did find this potentially helpful example&lt;BR /&gt;showing how to do some similar things.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h18000.www1.hp.com/support/asktima/appl_tools/009688F7-F95FC060-1C0097.html" target="_blank"&gt;http://h18000.www1.hp.com/support/asktima/appl_tools/009688F7-F95FC060-1C0097.html&lt;/A&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 15 Feb 2007 09:04:18 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2007-02-15T09:04:18Z</dc:date>
    <item>
      <title>File Attribute</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028621#M24105</link>
      <description>Is there any function in VAX Basic to get file attribute like created date, modified date etc.&lt;BR /&gt;&lt;BR /&gt;Or how is it possible to get file attribute like created date, modified date etc with out using lexical function F$FILE_ATTRIBUTES&lt;BR /&gt;&lt;BR /&gt;Please help me..</description>
      <pubDate>Thu, 15 Feb 2007 08:18:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028621#M24105</guid>
      <dc:creator>KiranSharma</dc:creator>
      <dc:date>2007-02-15T08:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: File Attribute</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028622#M24106</link>
      <description>One can do this using VMS system services in&lt;BR /&gt;any language, including BASIC.  For example&lt;BR /&gt;code in C, you could look at the source for&lt;BR /&gt;the Info-ZIP Zip program ([.vms]vmsmunch.c:&lt;BR /&gt;VMSmunch()).&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.info-zip.org/" target="_blank"&gt;http://www.info-zip.org/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.info-zip.org/Zip.html" target="_blank"&gt;http://www.info-zip.org/Zip.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://sourceforge.net/project/showfiles.php?group_id=118012" target="_blank"&gt;http://sourceforge.net/project/showfiles.php?group_id=118012&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;However, the fact that you're asking the&lt;BR /&gt;question suggests that you may be unfamiliar&lt;BR /&gt;with VMS system services, so some struggling&lt;BR /&gt;may be expected.&lt;BR /&gt;&lt;BR /&gt;A quick Google search for:&lt;BR /&gt;&lt;BR /&gt;      basic qio OR qiow IO$_ACCESS&lt;BR /&gt;&lt;BR /&gt;did find this potentially helpful example&lt;BR /&gt;showing how to do some similar things.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h18000.www1.hp.com/support/asktima/appl_tools/009688F7-F95FC060-1C0097.html" target="_blank"&gt;http://h18000.www1.hp.com/support/asktima/appl_tools/009688F7-F95FC060-1C0097.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 09:04:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028622#M24106</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-02-15T09:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: File Attribute</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028623#M24107</link>
      <description>The create date is with CDT, example&lt;BR /&gt;&lt;BR /&gt;wr sys$output f$file("login.com","cdt")&lt;BR /&gt;21-JUL-2006 09:12:13.42&lt;BR /&gt;&lt;BR /&gt;see th help with &lt;BR /&gt;$ help lexical f$file arg</description>
      <pubDate>Thu, 15 Feb 2007 09:07:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028623#M24107</guid>
      <dc:creator>labadie_1</dc:creator>
      <dc:date>2007-02-15T09:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: File Attribute</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028624#M24108</link>
      <description>There is no function directly in vax-basic.&lt;BR /&gt;&lt;BR /&gt;Are you sure you are talking VAX, not Alpha?&lt;BR /&gt;What version, what box? what VMS versions?&lt;BR /&gt;&lt;BR /&gt;The data most basically is avaiable from the file system through QIO ans Steven suggests.&lt;BR /&gt;&lt;BR /&gt;However, you may prefer the RMS access methods, where the dates will be mdae available in the XABDAT (or XABRDT) structure.&lt;BR /&gt;&lt;BR /&gt;There you have three basic (sic) choices:&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;Example: &lt;A href="http://h18000.www1.hp.com/support/asktima/appl_tools/00928923-BAC83760-1C0069.html" target="_blank"&gt;http://h18000.www1.hp.com/support/asktima/appl_tools/00928923-BAC83760-1C0069.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2) Allocate your own FAB and XAB and call SYS$OPEN directory form Basic&lt;BR /&gt;&lt;BR /&gt;Incolplete examples:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/freeware/freeware60/rms_tools/bonus/indexed_file_patch.bas" target="_blank"&gt;http://h71000.www7.hp.com/freeware/freeware60/rms_tools/bonus/indexed_file_patch.bas&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/wizard/wiz_4613.html" target="_blank"&gt;http://h71000.www7.hp.com/wizard/wiz_4613.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;3) The above, but using C or Macro to do teh dirty work and just call a service routine from basic.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 09:29:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028624#M24108</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-02-15T09:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: File Attribute</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028625#M24109</link>
      <description>&lt;!--!*#--&gt;One of my links shows an ugly &lt;BR /&gt; inside. Sorry.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To make up here is a complete example.&lt;BR /&gt;&lt;BR /&gt;Sample usage:&lt;BR /&gt;&lt;BR /&gt;$ mcr sys$login:date_test login.com&lt;BR /&gt;RDT           30-JAN-2007 22:18:15.99&lt;BR /&gt;CDT            6-JUL-2006 13:04:50.47&lt;BR /&gt;EDT           17-NOV-1858 00:00:00.00&lt;BR /&gt;BDT           11-JAN-2007 05:00:26.55&lt;BR /&gt;&lt;BR /&gt;$ type date_test.bas&lt;BR /&gt; 1      OPTION TYPE = EXPLICIT, CONSTANT TYPE = INTEGER&lt;BR /&gt; !&lt;BR /&gt; !      Get_file_dates.bas       Hein van den Heuvel, Feb-2007&lt;BR /&gt; !      Based on indexed_file_patch.bas example.&lt;BR /&gt; !&lt;BR /&gt;        On error go to hell!&lt;BR /&gt;&lt;BR /&gt;        EXTERNAL LONG FUNCTION  SYS$OPEN(FABDEF), LIB$GET_FOREIGN(STRING,STRING)&lt;BR /&gt;        EXTERNAL LONG CONSTANT  RMS$_NORMAL&lt;BR /&gt;       %INCLUDE "$FABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"&lt;BR /&gt;       %INCLUDE "$RABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"&lt;BR /&gt;       %INCLUDE "$XABDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"&lt;BR /&gt;       %INCLUDE "$XABDATDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET.TLB"&lt;BR /&gt;&lt;BR /&gt;        DECLARE STRING  FILE_NAME, TXT&lt;BR /&gt;        DECLARE INTEGER STAT, DATE_OFFSET, DATE_POINTER&lt;BR /&gt;        MAP (RMS_BLOCKS) XABDATDEF XABDAT, RABDEF RAB, FABDEF FAB, &amp;amp;&lt;BR /&gt;                         STRING DATE_TIME = 23, NAME_BUFFER = 80&lt;BR /&gt;        MAP (RMS_BLOCKS) XABDEF XAB ! Yuck&lt;BR /&gt;&lt;BR /&gt;        STAT = LIB$GET_FOREIGN (FILE_NAME, 'File name: ')&lt;BR /&gt;&lt;BR /&gt;        NAME_BUFFER = FILE_NAME         !Move into static string for LOC().&lt;BR /&gt;        FAB::FAB$B_BID = FAB$C_BID      !Make this a real FAB&lt;BR /&gt;        FAB::FAB$B_BLN = FAB$C_BLN      !Make this a real FAB&lt;BR /&gt;        FAB::FAB$L_FNA = LOC(NAME_BUFFER)       !Put Address of name_buf in Fab&lt;BR /&gt;        FAB::FAB$B_FNS = LEN(FILE_NAME) !Put Lenght of file_name in Fab&lt;BR /&gt;        FAB::FAB$B_FAC = FAB$M_GET      !READ access&lt;BR /&gt;        FAB::FAB$B_SHR = FAB$M_UPI      !No locking what so ever needed&lt;BR /&gt;        RAB::RAB$L_FAB = LOC(FAB)       !Put Address of Fab in Rab&lt;BR /&gt;        FAB::FAB$L_XAB = LOC(XAB)       !Put Address of Xab in Fab&lt;BR /&gt;        XAB::XAB$B_COD = XAB$C_DAT      !Make this a DAT XAB&lt;BR /&gt;        XAB::XAB$B_BLN = XAB$C_DATLEN   !Make this a DAT XAB&lt;BR /&gt;&lt;BR /&gt;        STAT = SYS$OPEN(FAB)    !Open the file&lt;BR /&gt;                CALL sys$exit(STAT BY VALUE) IF STAT &amp;lt;&amp;gt; RMS$_NORMAL&lt;BR /&gt;&lt;BR /&gt; ! Like to get OFFSETs, rather than fiels for the dates. Cheat:&lt;BR /&gt; ! $ pipe libr/out=sys$output:/extr=$xab*def -&lt;BR /&gt; !     SYS$LIBRARY:STARLET.mlb | search sys$pipe: t_overlay&lt;BR /&gt;&lt;BR /&gt;        DATA 12,"RDT",20,"CDT",28,"EDT",36,"BDT",0&lt;BR /&gt;        READ DATE_OFFSET&lt;BR /&gt;        WHILE (DATE_OFFSET)&lt;BR /&gt;             DATE_POINTER = LOC(XABDAT) + DATE_OFFSET&lt;BR /&gt;             CALL sys$asctim (0 BY VALUE, DATE_TIME, &amp;amp;&lt;BR /&gt;                 DATE_POINTER BY VALUE, 0 BY VALUE)&lt;BR /&gt;             READ TXT&lt;BR /&gt;             PRINT TXT, DATE_TIME&lt;BR /&gt;             READ DATE_OFFSET&lt;BR /&gt;       NEXT&lt;BR /&gt;       GOTO 2&lt;BR /&gt;&lt;BR /&gt; HELL:  PRINT ERT$(ERR) UNLESS ERR = 11&lt;BR /&gt;        RESUME 2&lt;BR /&gt; 2       END&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:29:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028625#M24109</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-02-15T10:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: File Attribute</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028626#M24110</link>
      <description>thank you</description>
      <pubDate>Mon, 19 Feb 2007 03:46:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/file-attribute/m-p/5028626#M24110</guid>
      <dc:creator>KiranSharma</dc:creator>
      <dc:date>2007-02-19T03:46:25Z</dc:date>
    </item>
  </channel>
</rss>

