<?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: VAX BASIC DOUBT in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946975#M11564</link>
    <description>&amp;gt;&amp;gt; IF L_STAT &amp;lt;&amp;gt; RMS$_NORMAL&lt;BR /&gt;&lt;BR /&gt;The usual and typical test is for the low bit of the return status, and not a specific status until and unless you need a specific status.  A generic success or failure test involves the low bit, and when the low bit is set, the call has worked.  if you need a specific test against a function (usually an error, though there can be alternate successes) then a match against that can be made.&lt;BR /&gt;&lt;BR /&gt;Put another way, the above test misses all of the potential successful status conditions that could conceivably be returned from the function -- save for one.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; CALL SYS$ASCTIM ...&lt;BR /&gt;&lt;BR /&gt;Testing the return condition from most any call that provides it is a good idea.&lt;BR /&gt;&lt;BR /&gt;There exists a list of common coding errors over in the old Ask The Wizard area in topic (1661).  That topic is a collected list of errors that I and other folks have made or have debugged over the years, consolidated down into a relatively small list.  &lt;A href="http://www.hp.com/go/openvms/wizard" target="_blank"&gt;http://www.hp.com/go/openvms/wizard&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The programming concepts manual is a good resource for this, as it introduces various of the expectations and assumptions of the OpenVMS interfaces and of OpenVMS programming.&lt;BR /&gt;&lt;BR /&gt;The OpenVMS (and other product) manuals are available at &lt;A href="http://www.hp.com/go/openvms/doc" target="_blank"&gt;http://www.hp.com/go/openvms/doc&lt;/A&gt; -- for the RMS calls and RMS data structures, the FAB, RAB and XAB stuff is documented in the RMS Routines Reference Manual.&lt;BR /&gt;&lt;BR /&gt;In addition to John's comment, it's also potentially feasible to call into another language which can return the date and time values.  C, for instance, has access to this data through the stat() calls.&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 19 Feb 2007 18:44:24 GMT</pubDate>
    <dc:creator>Hoff</dc:creator>
    <dc:date>2007-02-19T18:44:24Z</dc:date>
    <item>
      <title>VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946967#M11556</link>
      <description>How to get file create,revision and modified date through XAB by using offset and through fields?&lt;BR /&gt;I would also like to know the structure of XAB</description>
      <pubDate>Mon, 19 Feb 2007 04:08:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946967#M11556</guid>
      <dc:creator>sreeraj</dc:creator>
      <dc:date>2007-02-19T04:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946968#M11557</link>
      <description>Are You kidding ? Did Your neighbour post the same question under the name vax_basic recentlty ?&lt;BR /&gt;&lt;BR /&gt; &lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1100553" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1100553&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;answers Your question, with a working example !</description>
      <pubDate>Mon, 19 Feb 2007 05:42:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946968#M11557</guid>
      <dc:creator>Joseph Huber_1</dc:creator>
      <dc:date>2007-02-19T05:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946969#M11558</link>
      <description>sreeraj,&lt;BR /&gt;&lt;BR /&gt;The XAB structure is documented in the RMS Manual, which is available from HP's OpenVMS www site at &lt;A href="http://www.hp.com/go/openvms" target="_blank"&gt;http://www.hp.com/go/openvms&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The BASIC programmer's manual describes the VMS-specific interface information as being contained in SYS$LIBRARY:BASIC$STARLET.TLB, and also explains how to build record definitions for data structures (I would check, but I do not have BASIC loaded on any systems at the moment).&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Feb 2007 05:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946969#M11558</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2007-02-19T05:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946970#M11559</link>
      <description>Oh, I get it now.&lt;BR /&gt;&lt;BR /&gt;This is the 3rd question in a related series. The prior questions are 'closed'.&lt;BR /&gt;&lt;BR /&gt;Sreeraj, (thanks for using a real name instead of 'vax basic') you can just re-open (or not close) topics to continue for detailed question. That easier on all of us!&lt;BR /&gt;&lt;BR /&gt;PLEASE look around in the ITRC Form some for usage rules and hints!&lt;BR /&gt;Notably:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#41" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#41&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;prior question...&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1100856" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1100856&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Which is a really continutation for:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1100553" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1100553&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I now expect the problem with the second question to be the 'trick' with the MAP I used to make the basic generic XAB overlay with the XABDAT to get easy access to the Length and Code fields. The proper solution involves a RECORD with UNION, but that's so tedious! If it was my box I would be much tempted to create an alternative XABDAT defintion with easily addressible COD and BLN instead of the silly mumbleFILLmubles.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; I would also like to know the structure of XAB&lt;BR /&gt;&lt;BR /&gt;Besides the documenations I urge you to SLOWLY and CAREFULLY study:&lt;BR /&gt;1) $ libr/extr=$xabdat/out=xabdat.mar sys$library:starlet.mlb&lt;BR /&gt;&lt;BR /&gt;2) LIBR/EXTR=$XABDATDEF /OUT=XABDAT.BAS SYS$LIBRARY:BASIC$STARLET.TLB&lt;BR /&gt;&lt;BR /&gt;3) LIBR/EXTR=$XABDEF /OUT=XAB.BAS SYS$LIBRARY:BASIC$STARLET.TLB&lt;BR /&gt;&lt;BR /&gt;Hein van den Heuvel&lt;BR /&gt;HvdH Performance Consulting.&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Feb 2007 08:33:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946970#M11559</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-02-19T08:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946971#M11560</link>
      <description>&lt;!--!*#--&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And after you studied all that check out this rehash of my first example, now using the individual fields, not offset tricks.&lt;BR /&gt;Enjoy,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&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;        CALL sys$asctim (0 BY VALUE, DATE_TIME, XABDAT::XAB$L_CDT0, 0 BY VALUE)&lt;BR /&gt;        PRINT "Created:", DATE_TIME&lt;BR /&gt;        CALL sys$asctim (0 BY VALUE, DATE_TIME, XAB::XAB$L_RDT0, 0 BY VALUE)&lt;BR /&gt;        PRINT "Modifed:", DATE_TIME&lt;BR /&gt;&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;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Feb 2007 08:48:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946971#M11560</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-02-19T08:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946972#M11561</link>
      <description>hai all while using the attached file as subroutine there is a run time error.&lt;BR /&gt;&lt;BR /&gt;where as using the same code with in the main program there will not be any error.&lt;BR /&gt;&lt;BR /&gt;can you find a fix for the problem and also the reason for the error&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thank you in advance..</description>
      <pubDate>Mon, 19 Feb 2007 09:36:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946972#M11561</guid>
      <dc:creator>sreeraj</dc:creator>
      <dc:date>2007-02-19T09:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946973#M11562</link>
      <description>&lt;BR /&gt;Read, re-read and re-read all replies I made. The answers is there, spelled out.&lt;BR /&gt;&lt;BR /&gt;You'll need to learn VMS and It's BASIC better if you are going to call system routines.&lt;BR /&gt;&lt;BR /&gt;The broken line is:         DECLARE STRING EX_DATE_TIME&lt;BR /&gt;&lt;BR /&gt;That's a DYNAMIC string.&lt;BR /&gt;It must be STATIC for use by $ASCTIM or at the very least it must be pre-sized.&lt;BR /&gt;&lt;BR /&gt;:-(&lt;BR /&gt;&lt;BR /&gt;Hein</description>
      <pubDate>Mon, 19 Feb 2007 11:42:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946973#M11562</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-02-19T11:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946974#M11563</link>
      <description>sreeraj,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  I would also like to know the structure of XAB&lt;BR /&gt;&lt;BR /&gt;  Although it may be of intellectual interest to know how XABs and other RMS structures are layed out, it's of little practical interest in writing code. Indeed, it may even be a hindrence if you depend on internal details. In general, use whatever prebuilt language constructs are provided and limit yourself to just the fields of interest.&lt;BR /&gt;&lt;BR /&gt;  Start simple, and build up by making small changes to existing, working code. Trying to do everything from the start will be confusing and difficult to diagnose what's wrong.&lt;BR /&gt;&lt;BR /&gt;  For some languages, it's easier, shorter and clearer to code RMS stuff in MACRO32!</description>
      <pubDate>Mon, 19 Feb 2007 17:32:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946974#M11563</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2007-02-19T17:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946975#M11564</link>
      <description>&amp;gt;&amp;gt; IF L_STAT &amp;lt;&amp;gt; RMS$_NORMAL&lt;BR /&gt;&lt;BR /&gt;The usual and typical test is for the low bit of the return status, and not a specific status until and unless you need a specific status.  A generic success or failure test involves the low bit, and when the low bit is set, the call has worked.  if you need a specific test against a function (usually an error, though there can be alternate successes) then a match against that can be made.&lt;BR /&gt;&lt;BR /&gt;Put another way, the above test misses all of the potential successful status conditions that could conceivably be returned from the function -- save for one.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; CALL SYS$ASCTIM ...&lt;BR /&gt;&lt;BR /&gt;Testing the return condition from most any call that provides it is a good idea.&lt;BR /&gt;&lt;BR /&gt;There exists a list of common coding errors over in the old Ask The Wizard area in topic (1661).  That topic is a collected list of errors that I and other folks have made or have debugged over the years, consolidated down into a relatively small list.  &lt;A href="http://www.hp.com/go/openvms/wizard" target="_blank"&gt;http://www.hp.com/go/openvms/wizard&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The programming concepts manual is a good resource for this, as it introduces various of the expectations and assumptions of the OpenVMS interfaces and of OpenVMS programming.&lt;BR /&gt;&lt;BR /&gt;The OpenVMS (and other product) manuals are available at &lt;A href="http://www.hp.com/go/openvms/doc" target="_blank"&gt;http://www.hp.com/go/openvms/doc&lt;/A&gt; -- for the RMS calls and RMS data structures, the FAB, RAB and XAB stuff is documented in the RMS Routines Reference Manual.&lt;BR /&gt;&lt;BR /&gt;In addition to John's comment, it's also potentially feasible to call into another language which can return the date and time values.  C, for instance, has access to this data through the stat() calls.&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Feb 2007 18:44:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946975#M11564</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-02-19T18:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946976#M11565</link>
      <description>i got a run time error ,Memeory management violation , when i put a print statement in my sub routine.&lt;BR /&gt;&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_REV_DATE, XAB::XAB$L_RDT0, 0 BY VALUE)&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_CRT_DATE, XABDAT::XAB$L_CDT0, 0 BY VALUE)&lt;BR /&gt;&lt;BR /&gt;! this print statement cause the problem&lt;BR /&gt;PRINT""&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_BKUP_DATE , XABDAT::XAB$L_BDT0, 0 BY VALUE)&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_EXP_DATE, XABDAT::XAB$L_EDT0, 0 BY VALUE)&lt;BR /&gt;&lt;BR /&gt;please have a look at the follwing code.&lt;BR /&gt;What is wrong with this code.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*******MAIN PROGRAM********&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;EXTERNAL SUB GET_FILE_ATTRIBUTE ( STRING, &amp;amp;&lt;BR /&gt;                                  STRING, &amp;amp;&lt;BR /&gt;                                  STRING, &amp;amp;&lt;BR /&gt;                                  STRING, &amp;amp;&lt;BR /&gt;                                  STRING, &amp;amp;&lt;BR /&gt;                                  LONG  )&lt;BR /&gt;DECLARE STRING T_FILE_NAME,   &amp;amp;&lt;BR /&gt;                T_CREAT_DATE, &amp;amp;&lt;BR /&gt;                T_REVIS_DATE, &amp;amp;&lt;BR /&gt;                T_BAKUP_DATE, &amp;amp;&lt;BR /&gt;                T_EXPIR_DATE&lt;BR /&gt;&lt;BR /&gt;DECLARE LONG    L_ERR&lt;BR /&gt;&lt;BR /&gt;INPUT"ENTER FILE NAME : ";T_FILE_NAME&lt;BR /&gt;CALL GET_FILE_ATTRIBUTE (T_FILE_NAME, &amp;amp;&lt;BR /&gt;                         T_CREAT_DATE, &amp;amp;&lt;BR /&gt;                         T_EXPIR_DATE, &amp;amp;&lt;BR /&gt;                         T_REVIS_DATE, &amp;amp;&lt;BR /&gt;                         T_BAKUP_DATE,&amp;amp;&lt;BR /&gt;                         L_ERR )&lt;BR /&gt;IF L_ERR = 1  THEN&lt;BR /&gt;        PRINT" FILE ERROR "&lt;BR /&gt;ELSE&lt;BR /&gt;!       PRINT"CREATED  DATE ; ";T_CREAT_DATE&lt;BR /&gt;!       PRINT"REVISION DATE ; ";T_REVIS_DATE&lt;BR /&gt;!       PRINT"EXPIRE   DATE ; ";T_EXPIR_DATE&lt;BR /&gt;!       PRINT"BACK UP  DATE ; ";T_BAKUP_DATE&lt;BR /&gt;END IF&lt;BR /&gt;&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/***********************************       SUB ROUTINE     ****************************************************************************/&lt;BR /&gt;&lt;BR /&gt;****File_Att.bas****&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SUB GET_FILE_ATTRIBUTE( STRING T_FILE_NAME,&amp;amp;&lt;BR /&gt;                        STRING T_CRT_DATE,&amp;amp;&lt;BR /&gt;                        STRING T_EXP_DATE,&amp;amp;&lt;BR /&gt;                        STRING T_REV_DATE,&amp;amp;&lt;BR /&gt;                        STRING T_BKUP_DATE,&amp;amp;&lt;BR /&gt;                        LONG L_ERR_STAT )&lt;BR /&gt;        !&lt;BR /&gt;        !       EXTERNAL FUNCTIONS&lt;BR /&gt;        !&lt;BR /&gt;        EXTERNAL LONG FUNCTION  SYS$OPEN(FABDEF)&lt;BR /&gt;        EXTERNAL LONG CONSTANT  RMS$_NORMAL&lt;BR /&gt;&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;&lt;BR /&gt;        MAP (RMS_BLOCKS) XABDATDEF XABDAT, RABDEF RAB, FABDEF FAB, &amp;amp;&lt;BR /&gt;        STRING NAME_BUFFER = 80&lt;BR /&gt;        MAP (RMS_BLOCKS) XABDEF XAB&lt;BR /&gt;&lt;BR /&gt;        RECORD FILE_ATT&lt;BR /&gt;                STRING T_CRT_DATE = 11&lt;BR /&gt;                STRING T_EXP_DATE = 11&lt;BR /&gt;                STRING T_REV_DATE = 11&lt;BR /&gt;                STRING T_BKUP_DATE = 11&lt;BR /&gt;        END RECORD&lt;BR /&gt;! this record is created because the function a SYS$ASCTIM require strings of fixed lenght&lt;BR /&gt;&lt;BR /&gt;        DECLARE INTEGER  L_STAT, L_DATE_OFFSET, L_DATE_POINTER&lt;BR /&gt;        DECLARE STRING rdat&lt;BR /&gt;        DECLARE FILE_ATT F_DATE_ATT&lt;BR /&gt;&lt;BR /&gt;        NAME_BUFFER = T_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(T_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;        L_STAT = SYS$OPEN(FAB)    !OPEN THE FILE&lt;BR /&gt;&lt;BR /&gt;        IF L_STAT &amp;lt;&amp;gt; RMS$_NORMAL THEN&lt;BR /&gt;                L_ERR_STAT=1&lt;BR /&gt;                PRINT "ERROR IN OPENING FILE"&lt;BR /&gt;                GOTO TERMINATE&lt;BR /&gt;        END IF&lt;BR /&gt;&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_REV_DATE, XAB::XAB$L_RDT0, 0 BY VALUE)&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_CRT_DATE, XABDAT::XAB$L_CDT0, 0 BY VALUE)&lt;BR /&gt;&lt;BR /&gt;! this print statement cause the problem&lt;BR /&gt;PRINT""&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_BKUP_DATE , XABDAT::XAB$L_BDT0, 0 BY VALUE)&lt;BR /&gt;        CALL SYS$ASCTIM (0 BY VALUE, F_DATE_ATT::T_EXP_DATE, XABDAT::XAB$L_EDT0, 0 BY VALUE)&lt;BR /&gt;&lt;BR /&gt;        PRINT" REVISION  DATE :";F_DATE_ATT::T_REV_DATE&lt;BR /&gt;        PRINT" CAREATION DATE :";F_DATE_ATT::T_CRT_DATE&lt;BR /&gt;        PRINT" BACKUP    DATE :";F_DATE_ATT::T_BKUP_DATE&lt;BR /&gt;        PRINT" EXPIRE    DATE :";F_DATE_ATT::T_EXP_DATE&lt;BR /&gt;&lt;BR /&gt;!       T_CRT_DATE = F_DATE_ATT::T_CRT_DATE&lt;BR /&gt;!       T_EXP_DATE = F_DATE_ATT::T_EXP_DATE&lt;BR /&gt;!       T_REV_DATE = F_DATE_ATT::T_REV_DATE&lt;BR /&gt;!       T_BKUP_DATE = F_DATE_ATT::T_BKUP_DATE&lt;BR /&gt;&lt;BR /&gt;TERMINATE:&lt;BR /&gt;        END SUB&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Feb 2007 10:34:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946976#M11565</guid>
      <dc:creator>sreeraj</dc:creator>
      <dc:date>2007-02-20T10:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: VAX BASIC DOUBT</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946977#M11566</link>
      <description>&lt;BR /&gt;Got it...&lt;BR /&gt;&lt;BR /&gt;I tend to create my basic with:  OPTION CONSTANT TYPE = INTEGER&lt;BR /&gt;&lt;BR /&gt;But left that for this example.&lt;BR /&gt;So those "0 by value" turned into floating point stuff leaving the real argument in the registers as undefined (actually R16 = 65537 from the RMS$_SUC return, that being to only possible succesfull return from SYS$OPEN :^).&lt;BR /&gt;&lt;BR /&gt;Either use the OPTION, or pass "0% BY VALUE"&lt;BR /&gt;&lt;BR /&gt;Also... if you just want the date, then the documentation SUGGESTS that you should really pass a 12 byte string to SYS$ASCTIM, allowing for the final blank.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Feb 2007 11:00:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-basic-doubt/m-p/3946977#M11566</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-02-20T11:00:36Z</dc:date>
    </item>
  </channel>
</rss>

