<?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: COBOL and XAB in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228341#M39591</link>
    <description>Mick,&lt;BR /&gt;&lt;BR /&gt;There is the link to the documentation of the routines that Richard mentioned:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82final/6296/6296pro_110.html#rtl_rout" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/6296/6296pro_110.html#rtl_rout&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The example gives you how to get the FAB block. I dont know&lt;BR /&gt;if the FAB$L_XAB is filled by COBOL. This is the pointer to the next XAB block.&lt;BR /&gt;Probably the best vay is to create a XABDAT structure, set the reference of the FAB$L_XAB (XAB-ADD field in the example) to this structure and call SYS$DISPLAY so that the structure fget filled.&lt;BR /&gt;Remember to set the XAB$B_COD and XAB$B_BLN fields to the apropriate value.&lt;BR /&gt;&lt;BR /&gt;Some more pointers to the documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;XABDAT specification:&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731final/4523/4523pro_014.html#index_x_668" target="_blank"&gt;http://h71000.www7.hp.com/doc/731final/4523/4523pro_014.html#index_x_668&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SYS$DISPLAY specification:&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731final/4523/4523pro_024.html#index_x_961" target="_blank"&gt;http://h71000.www7.hp.com/doc/731final/4523/4523pro_024.html#index_x_961&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
    <pubDate>Fri, 05 Mar 2010 12:18:33 GMT</pubDate>
    <dc:creator>Bojan Nemec</dc:creator>
    <dc:date>2010-03-05T12:18:33Z</dc:date>
    <item>
      <title>COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228337#M39587</link>
      <description>How can I get file creation date on XAB from a COBOL program?</description>
      <pubDate>Fri, 05 Mar 2010 10:24:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228337#M39587</guid>
      <dc:creator>Mick O'Brien</dc:creator>
      <dc:date>2010-03-05T10:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228338#M39588</link>
      <description>Biggus Mickus,&lt;BR /&gt;&lt;BR /&gt;Rush, rush, rush, so off the top of my head: - with Alpha &amp;amp; Itanium there are those routines that look very much like dcob$get_current_rab and $get_current_fab. I imagine that you can trace the XAB chain from the FAB pointer until you get the one for dates and then locate the date you want.&lt;BR /&gt;&lt;BR /&gt;Alternatively (and I think you'll have code for this somewhere) there should be something like a io$acp_control on the disk driver that returns "blocks" like statistics and stuff and I reakon one of them is the date you want.&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher</description>
      <pubDate>Fri, 05 Mar 2010 10:47:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228338#M39588</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2010-03-05T10:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228339#M39589</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;I looked at those DCOB routines and wrote a test program that opened a file then called DCOB$get_current_fab but the XAB address was set to zero!  So looking within documentation it appears (to me) that thet address needs to be set up prior to opening the file in order to get fields populated (i.e. calling dcob$get_current_fab AFTER the open does not help me).  Can you give me a bit more information on the system call and how I can use that?&lt;BR /&gt;&lt;BR /&gt;Mick</description>
      <pubDate>Fri, 05 Mar 2010 10:55:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228339#M39589</guid>
      <dc:creator>Mick O'Brien</dc:creator>
      <dc:date>2010-03-05T10:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228340#M39590</link>
      <description>Hi Mick,&lt;BR /&gt;&lt;BR /&gt;Bummer about the XAB :-(&lt;BR /&gt;&lt;BR /&gt;Goin out now, jogging (still in denial) tomorrow morning, then getting ripped to shreads by my mum's bougainvillea. If no ones given you the answer by then I'll fire up the VAX and try to see if that codes any use.&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher.&lt;BR /&gt;&lt;BR /&gt;PS. We are now officially paying twice as much for a pint as you :-( *West London or City* -vs- Perth!</description>
      <pubDate>Fri, 05 Mar 2010 11:36:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228340#M39590</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2010-03-05T11:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228341#M39591</link>
      <description>Mick,&lt;BR /&gt;&lt;BR /&gt;There is the link to the documentation of the routines that Richard mentioned:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82final/6296/6296pro_110.html#rtl_rout" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/6296/6296pro_110.html#rtl_rout&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The example gives you how to get the FAB block. I dont know&lt;BR /&gt;if the FAB$L_XAB is filled by COBOL. This is the pointer to the next XAB block.&lt;BR /&gt;Probably the best vay is to create a XABDAT structure, set the reference of the FAB$L_XAB (XAB-ADD field in the example) to this structure and call SYS$DISPLAY so that the structure fget filled.&lt;BR /&gt;Remember to set the XAB$B_COD and XAB$B_BLN fields to the apropriate value.&lt;BR /&gt;&lt;BR /&gt;Some more pointers to the documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;XABDAT specification:&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731final/4523/4523pro_014.html#index_x_668" target="_blank"&gt;http://h71000.www7.hp.com/doc/731final/4523/4523pro_014.html#index_x_668&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SYS$DISPLAY specification:&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731final/4523/4523pro_024.html#index_x_961" target="_blank"&gt;http://h71000.www7.hp.com/doc/731final/4523/4523pro_024.html#index_x_961&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Fri, 05 Mar 2010 12:18:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228341#M39591</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2010-03-05T12:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228342#M39592</link>
      <description>&lt;!--!*#--&gt;&lt;BR /&gt;Below is an example I made a while (decade?) ago to SET the Modification date in Cobol.&lt;BR /&gt;&lt;BR /&gt;You'd need to call SYS$DISPLAY after hooking up the XAB, and SYS$ASCTIM after that passing the CDT field which needs to be added to the XAB layout&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you can't change that to GET the CDT in cobol, then you should be programming in cobol.&lt;BR /&gt;&lt;BR /&gt;Actually, considering how contrived pointer handling and creating an XAB layout is, I would never really code this in Cobol.&lt;BR /&gt;Just make a little MACRO or C subroutine to do the job passing the current-fab and an output buffer.&lt;BR /&gt;In the routine save the current xab, hookup yours, display, restore.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;IDENTIFICATION DIVISION.&lt;BR /&gt;PROGRAM-ID. rdt_test.&lt;BR /&gt;ENVIRONMENT DIVISION.&lt;BR /&gt;INPUT-OUTPUT SECTION.&lt;BR /&gt;FILE-CONTROL.&lt;BR /&gt;    SELECT TEST_FILE&lt;BR /&gt;        ASSIGN               TO TEST_NAME&lt;BR /&gt;        FILE STATUS          IS FILE_STATUS.&lt;BR /&gt;&lt;BR /&gt;DATA DIVISION.&lt;BR /&gt;FILE SECTION.&lt;BR /&gt;FD TEST_FILE.&lt;BR /&gt;01 TEST_RECORD.&lt;BR /&gt;    03  SOME-DATA PIC X(80).&lt;BR /&gt;&lt;BR /&gt;WORKING-STORAGE SECTION.&lt;BR /&gt;&lt;BR /&gt;01  FILE_STATUS                 PIC X(02) VALUE "  ".&lt;BR /&gt;01  FAB_PT                      POINTER.&lt;BR /&gt;01  XABRDT_PT                   POINTER.&lt;BR /&gt;01  FAB_XAB                     POINTER.&lt;BR /&gt;&lt;BR /&gt;01 XABRDT_REC.&lt;BR /&gt;  05 XABRDT_BLN_COD     PIC S9(9) COMP VALUE 5150.&lt;BR /&gt;  05 NXT        USAGE IS POINTER.&lt;BR /&gt;  05 RVN        PIC 9(9) COMP.&lt;BR /&gt;  05 RDT        PIC 9(18) COMP.&lt;BR /&gt;&lt;BR /&gt;01 REC_LEN     PIC 9(4) COMP.&lt;BR /&gt;01 RTN_STATUS  PIC 9(9) COMP.&lt;BR /&gt;01 NEW_TIME     PIC X(23) VALUE "01-APR-2001 01:23:45.67".&lt;BR /&gt;&lt;BR /&gt;PROCEDURE DIVISION.&lt;BR /&gt;&lt;BR /&gt;MY_MAIN SECTION.&lt;BR /&gt;MAIN.&lt;BR /&gt;&lt;BR /&gt;    OPEN I-O  TEST_FILE.&lt;BR /&gt;    IF FILE_STATUS = "00" THEN&lt;BR /&gt;       CALL "DCOB$RMS_CURRENT_FAB" GIVING FAB_PT&lt;BR /&gt;    ELSE&lt;BR /&gt;       DISPLAY "ERROR: TEST FILE OPEN ERROR, STATUS: ", FILE_STATUS&lt;BR /&gt;       STOP RUN&lt;BR /&gt;    END-IF.&lt;BR /&gt;&lt;BR /&gt;    CALL "SYS$BINTIM" USING BY DESCRIPTOR NEW_TIME, BY REFERENCE RDT.&lt;BR /&gt;&lt;BR /&gt;    ADD 36 TO FAB_PT GIVING FAB_XAB.&lt;BR /&gt;    SET XABRDT_PT TO REFERENCE OF XABRDT_REC.&lt;BR /&gt;    CALL "OTS$MOVE3" USING BY VALUE 4,&lt;BR /&gt;                            BY REFERENCE XABRDT_PT,&lt;BR /&gt;                            BY VALUE FAB_XAB.&lt;BR /&gt;&lt;BR /&gt;    CLOSE TEST_FILE.&lt;BR /&gt;    STOP RUN.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Mar 2010 12:57:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228342#M39592</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-05T12:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228343#M39593</link>
      <description>Thanks for the replies.&lt;BR /&gt;&lt;BR /&gt;Hein - I'm a little confused with pointers.  I have been looking at documentation and from that I see all the XAB blocks are chained (please see attached excel spreadsheet) but your code appears to go directly to the XABRDT block i.e. by-passing need to chain.  Can you explain to me how this works then I can go direct to XABDAT block for creation date.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Mick</description>
      <pubDate>Fri, 05 Mar 2010 15:28:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228343#M39593</guid>
      <dc:creator>Mick O'Brien</dc:creator>
      <dc:date>2010-03-05T15:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228344#M39594</link>
      <description>&lt;!--!*#--&gt;[ I missed a NOT in a feeble attempt to make a joke/poke in the prior reply. Sorry.]&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; all the XAB blocks are chained &lt;BR /&gt;&lt;BR /&gt;Yes, any XAB that need to be considered, be it for input or output, need to be chained through XAB$L_NXT starting from FAB$L_XAB (or the RAB).&lt;BR /&gt;&lt;BR /&gt;In this case we can save whatever there was (nothing, but better save than sorry). &lt;BR /&gt;Hook up the 1 we need, do the deed, restore as found.&lt;BR /&gt;&lt;BR /&gt;Working CDT example below.  &lt;BR /&gt;&lt;BR /&gt;My threshold for OTS$MOVC3, LIB$INSV and the likes calls in Cobol program is about 3. &lt;BR /&gt;Any more and I prefer switching to a more suitable language to do referencing and bit-twiddling.&lt;BR /&gt;MACRO is always there, so is a fine alternate choice for me.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ type cdt.cob&lt;BR /&gt;IDENTIFICATION DIVISION.&lt;BR /&gt;PROGRAM-ID. cdt_test.&lt;BR /&gt;ENVIRONMENT DIVISION.&lt;BR /&gt;INPUT-OUTPUT SECTION.&lt;BR /&gt;FILE-CONTROL.&lt;BR /&gt;    SELECT TEST_FILE&lt;BR /&gt;        ASSIGN               TO TEST_NAME&lt;BR /&gt;        FILE STATUS          IS FILE_STATUS.&lt;BR /&gt;&lt;BR /&gt;DATA DIVISION.&lt;BR /&gt;FILE SECTION.&lt;BR /&gt;FD TEST_FILE.&lt;BR /&gt;01 TEST_RECORD.&lt;BR /&gt;    03  SOME-DATA PIC X(80).&lt;BR /&gt;&lt;BR /&gt;WORKING-STORAGE SECTION.&lt;BR /&gt;&lt;BR /&gt;01  FILE_STATUS                 PIC X(02) VALUE "  ".&lt;BR /&gt;01  FAB_PT                      POINTER.&lt;BR /&gt;01  XAB_CDT_PT                  POINTER.&lt;BR /&gt;01  FAB_XAB                     POINTER.&lt;BR /&gt;&lt;BR /&gt;* skeleton XAB DAT V2, this is the easy/short one&lt;BR /&gt;01 XAB_CDT_REC.&lt;BR /&gt;  05 XABRDT_BLN_COD     PIC S9(9) COMP VALUE 9234.&lt;BR /&gt;  05 NXT                USAGE IS POINTER VALUE 0.&lt;BR /&gt;  05 rvn                PIC 9(9) COMP.&lt;BR /&gt;  05 rdt                PIC 9(18) COMP.&lt;BR /&gt;  05 CDT                PIC 9(18) COMP.&lt;BR /&gt;  05 EDT                PIC 9(18) COMP.&lt;BR /&gt;  05 BDT                PIC 9(18) COMP.&lt;BR /&gt;&lt;BR /&gt;01 REC_LEN              PIC 9(4) COMP.&lt;BR /&gt;01 RTN_STATUS           PIC 9(9) COMP.&lt;BR /&gt;01 CDT_TIME             PIC X(23).&lt;BR /&gt;01 SAVE_XAB_PTR         USAGE IS POINTER.&lt;BR /&gt;&lt;BR /&gt;PROCEDURE DIVISION.&lt;BR /&gt;&lt;BR /&gt;MY_MAIN SECTION.&lt;BR /&gt;MAIN.&lt;BR /&gt;&lt;BR /&gt;    OPEN I-O  TEST_FILE.&lt;BR /&gt;    IF FILE_STATUS = "00" THEN&lt;BR /&gt;       CALL "DCOB$RMS_CURRENT_FAB" GIVING FAB_PT&lt;BR /&gt;    ELSE&lt;BR /&gt;       DISPLAY "ERROR: TEST FILE OPEN ERROR, STATUS: ", FILE_STATUS&lt;BR /&gt;       STOP RUN&lt;BR /&gt;    END-IF.&lt;BR /&gt;&lt;BR /&gt;* Get currect XAB value (if any), hook up our XAB, DISPLAY and restore.&lt;BR /&gt;&lt;BR /&gt;    ADD 36 TO FAB_PT GIVING FAB_XAB.&lt;BR /&gt;    CALL "OTS$MOVE3" USING BY VALUE 4, BY VALUE FAB_XAB,  BY REFERENCE SAVE_XAB_PTR.&lt;BR /&gt;    SET XAB_CDT_PT TO REFERENCE OF XAB_CDT_REC.&lt;BR /&gt;    CALL "OTS$MOVE3" USING BY VALUE 4, BY REFERENCE XAB_CDT_PT, BY VALUE FAB_XAB.&lt;BR /&gt;    CALL "SYS$DISPLAY" USING BY VALUE FAB_PT GIVING RTN_STATUS.&lt;BR /&gt;    IF RTN_STATUS IS FAILURE CALL "SYS$EXIT" USING BY VALUE RTN_STATUS.&lt;BR /&gt;    CALL "OTS$MOVE3" USING BY VALUE 4, BY REFERENCE SAVE_XAB_PTR BY VALUE FAB_XAB.&lt;BR /&gt;&lt;BR /&gt;    CALL "SYS$ASCTIM" USING BY VALUE 0, BY DESCRIPTOR CDT_TIME, BY REFERENCE CDT, BY VALUE 0.&lt;BR /&gt;&lt;BR /&gt;    DISPLAY "Create Date : ", CDT_TIME.&lt;BR /&gt;    CLOSE TEST_FILE.&lt;BR /&gt;    STOP RUN.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Mar 2010 16:24:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228344#M39594</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-05T16:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228345#M39595</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;Thanks - I think I begin to understand i.e. within COBOL code the call to sys$display statement populates record according to value in BLN/COD field.  Can you point me in the right direction (a link please) where these codes and associated records are detailed?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mick</description>
      <pubDate>Fri, 05 Mar 2010 21:44:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228345#M39595</guid>
      <dc:creator>Mick O'Brien</dc:creator>
      <dc:date>2010-03-05T21:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228346#M39596</link>
      <description>Correct. &lt;BR /&gt;A piece of memory becomes an XAB if the first byte (XAB$B_BID) has one of a dozen valid XAB code, and if the second byte (XAB$B_BLN) has one of the valid length indicator.&lt;BR /&gt;The XAB$L_NXT had better be reasonable or NULL, once RMS decides it is a valid XAB flavor.&lt;BR /&gt;&lt;BR /&gt;All languages EXCEPT Cobol have reasonable methods to define XAB structures. So you can use the PASCAL, C, BASIC,... defintions from the STARLET libraries.&lt;BR /&gt;Personally, I just use the MACRO definitions for Cobol (ab)use.&lt;BR /&gt;&lt;BR /&gt;$ libr/extr=$xabdatdef/out=xabdat.mar sys$library:starlet.mlb&lt;BR /&gt;&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Mar 2010 23:27:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228346#M39596</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-05T23:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228347#M39597</link>
      <description>For yucks I typed in a MACRO subroutine. Compiled and linked in one. Yeah.. I can still do it :-)&lt;BR /&gt;&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;---------- my_get_cdt.mar --------&lt;BR /&gt;        $FABDEF&lt;BR /&gt;        .psect  data,noexe,wrt&lt;BR /&gt;xabdat: $xabdat&lt;BR /&gt;        .psect  code,exe,nowrt&lt;BR /&gt;        .entry  my_get_cdt, 0&lt;BR /&gt;        CALLS   #0, G^DCOB$RMS_CURRENT_FAB       ; pick up FAB address&lt;BR /&gt;        MOVL    R0, R8&lt;BR /&gt;        MOVL    FAB$L_XAB(r8), R2       ; Save old contents&lt;BR /&gt;        MOVAL   xabdat, FAB$L_XAB(r8)   ; Insert our XAB&lt;BR /&gt;        PUSHL   r8&lt;BR /&gt;        CALLS   #1, G^SYS$DISPLAY       ; Please&lt;BR /&gt;        BLBC    R0, 10$                 ; Problem?&lt;BR /&gt;        PUSHL   #0                      ; Time and Date&lt;BR /&gt;        PUSHAL  xabdat + XAB$Q_CDT      ; RMS provided Creation Date&lt;BR /&gt;        PUSHL   4(ap)                   ; Caller provided Ascci time buffer&lt;BR /&gt;        PUSHL   #0                      ; No return length&lt;BR /&gt;        CALLS   #4, G^SYS$ASCTIM&lt;BR /&gt;        MOVL    R2, FAB$L_XAB(r8)       ; Restore as found&lt;BR /&gt;10$:    RET&lt;BR /&gt;        .end&lt;BR /&gt;&lt;BR /&gt;-----------  Sample cobol caller ----------------&lt;BR /&gt;&lt;BR /&gt;    OPEN I-O  TEST_FILE.&lt;BR /&gt;    IF FILE_STATUS NOT = "00" THEN&lt;BR /&gt;       DISPLAY "ERROR: TEST FILE OPEN ERROR, STATUS: ", FILE_STATUS&lt;BR /&gt;       STOP RUN&lt;BR /&gt;    END-IF.&lt;BR /&gt;&lt;BR /&gt;    CALL "my_get_cdt" USING BY DESCRIPTOR CDT_TIME GIVING rtn_status.&lt;BR /&gt;    IF rtn_status IS FAILURE CALL "sys$exit" USING BY VALUE rtn_status.&lt;BR /&gt;&lt;BR /&gt;    DISPLAY "Create Date : ", CDT_TIME.&lt;BR /&gt;    CLOSE TEST_FILE.&lt;BR /&gt;    STOP RUN.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Mar 2010 00:08:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228347#M39597</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-06T00:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228348#M39598</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;Maybe this is a silly question but is there any way of getting the file creation date without opening the file - I'm just s trifle (raspberry) worried that the date may not be available if the file is already open (for exclusive access) by another process?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Mick&lt;BR /&gt;(PS - I'm happy you still have it.  Do you know if it's contagious?)</description>
      <pubDate>Sat, 06 Mar 2010 01:42:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228348#M39598</guid>
      <dc:creator>Mick O'Brien</dc:creator>
      <dc:date>2010-03-06T01:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228349#M39599</link>
      <description>Yes, Macro is contagious. It takes a good bit of exposure to catch it,  but once infected it's hard to shake. :-)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; worried that the date may not be available if the file is already open &lt;BR /&gt;&lt;BR /&gt;That's a very valid concern. &lt;BR /&gt;This is the same problem say F$FILE (filename,"CDT") has.&lt;BR /&gt;&lt;BR /&gt;DIRECTORY/DATE=CREATE does NOT have that problem. It uses QIO access, does not open the file, and only requires the right to look at the file.&lt;BR /&gt;&lt;BR /&gt;I have some examples for that (NOT using Cobol :-), some on the RMS_TOOLS directory under VMS Freeware, overdue for refresh.&lt;BR /&gt;&lt;BR /&gt;But now we have to ask 'what problem are you really trying to solve'.&lt;BR /&gt;&lt;BR /&gt;And without waiting for the answer, but assuming it is a silly management request, how about spawning DIR/DATE from COBOL and just tell them you'll need a bigger box if they really want to have this done? &lt;BR /&gt;:-)&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;Note 1 : I'm waiting for my flight home in the lounge for 'special people' in DTW, not feeing like 'real' work. So I had an hour or two to burn.&lt;BR /&gt;&lt;BR /&gt;Note 2: Forgot the 'retain formatting' checkmark on the Macro reply. Sorry. Source attached as .TXT to make up for that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Mar 2010 02:22:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228349#M39599</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-06T02:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228350#M39600</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;What I'm trying to do is capture the creation date of a log file whilst it is still open hence my questions.  I have found example COBOL code that calls a macro to get the file fid and then makes calls to sys$qiow to get creation date, however as the GETFID macro still opens the file its just not quite right.  Could you let me have details of programs that user ONLY sys$qiow (i.e. no file opens) to get creation date?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mick&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Mar 2010 05:47:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228350#M39600</guid>
      <dc:creator>Mick O'Brien</dc:creator>
      <dc:date>2010-03-06T05:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228351#M39601</link>
      <description>Hi Ungrateful,&lt;BR /&gt;&lt;BR /&gt;Guess there's nothing quite as tragic as unrequited love - I'll try and soldier on :-)&lt;BR /&gt;&lt;BR /&gt;IIRC GETFID was only needed to get the FID/DID so that the $QIO IO$_ACPCONTROL (or io$_access) could use it to do the directory lookup?&lt;BR /&gt;&lt;BR /&gt;If I'm also not mistaken sys$parse outputs the File ID and Directory ID without openong the file (or maybe even has a channel that can be re-used?) See attached for an example of $parse_s and other stuff.&lt;BR /&gt;&lt;BR /&gt;Either way, my money's on your requirement of "creation date without having to open the file" being doable. (But I'm also guessing that detailed spec is worth about one point, so hold out for someone to come and play the aeroplane game. Open wide, boosh, woosh :-)&lt;BR /&gt;&lt;BR /&gt;Maybe if you posted your current FIB definition and $qio code it might speed things up a little bit?&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;BR /&gt;&lt;BR /&gt;PS. Bougainvillia: 1 People with skin: 0&lt;BR /&gt;&lt;BR /&gt;PPS. Bojan great to see you're still around! (as it is Hein) If you get a few minutes and think you might know why FF3 is giving me "too much recursion" please look at:&lt;BR /&gt;&lt;A href="http://groups.google.com/group/comp.lang.javascript/msg/43b32679ec125b17" target="_blank"&gt;http://groups.google.com/group/comp.lang.javascript/msg/43b32679ec125b17&lt;/A&gt;&lt;BR /&gt;Chrome is fine! FF2 is Fine! IE9 craps out after a while in the "innerHTML ="</description>
      <pubDate>Sat, 06 Mar 2010 08:57:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228351#M39601</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2010-03-06T08:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228352#M39602</link>
      <description>As Roy Orbison sang...&lt;BR /&gt;&lt;BR /&gt;"Only the lonely (dum-dum-dum-dumdy-doo-wah)&lt;BR /&gt;Know the way I feel tonight&lt;BR /&gt;(ooh-yay-yay-yay-yeah)&lt;BR /&gt;Only the lonely (dum-dum-dum-dumdy-doo-wah)&lt;BR /&gt;Know this feelinâ   ainâ  t right&lt;BR /&gt;(dum-dum-dum-dumdy-doo-wah)"&lt;BR /&gt;&lt;BR /&gt;I think that last line's for you!&lt;BR /&gt;&lt;BR /&gt;Anyways I have attached the code for you to view (note your name on GETFID.CBL)&lt;BR /&gt;&lt;BR /&gt;I have not tried to run the attached .txt as a .com but should not be too many problems.  The 'bit' that needs changing is get_creation_date.cbl where a call to GETFID is made.&lt;BR /&gt;&lt;BR /&gt;Any help appreciated.</description>
      <pubDate>Sat, 06 Mar 2010 10:17:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228352#M39602</guid>
      <dc:creator>Mick O'Brien</dc:creator>
      <dc:date>2010-03-06T10:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228353#M39603</link>
      <description>Hi Mick,&lt;BR /&gt;&lt;BR /&gt;Just had a look at: -&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731final/4523/4523pro_030.html#parse_service_routine" target="_blank"&gt;http://h71000.www7.hp.com/doc/731final/4523/4523pro_030.html#parse_service_routine&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And saw this: -&lt;BR /&gt;NAM$W_FID 1  File identification (zeroed). &lt;BR /&gt;&lt;BR /&gt;I have to say that "zeroed" bit at the end is a bit discouraging :-) Anyway I've downloaded your example code and will get back if I have anything useful to say.&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;BR /&gt;&lt;BR /&gt;PS. The Big O eh. Best comeback since Lazarus and then he drops dead. There's a moral in there somewhere.</description>
      <pubDate>Sun, 07 Mar 2010 01:49:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228353#M39603</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2010-03-07T01:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228354#M39604</link>
      <description>Me again,&lt;BR /&gt;&lt;BR /&gt;The bad news is RMS looks next to useless in this case (Hein "Mr RMS" Van den Heuvel may prove me wrong)&lt;BR /&gt;&lt;BR /&gt;The good news is I started hacking away at my DIR_WATCH.COM routine (why this has never been included in VMS escapes me!) and I've come up with something that appears to work even on open files. (i.e. no additional "open" required, just a dir lookup)&lt;BR /&gt;&lt;BR /&gt;As with my UWSS, this code does an io$_access on the name and then gets the FID from the FIB. (RMS still being used to get the DID to pass to the $QIO)&lt;BR /&gt;&lt;BR /&gt;Anyway it seems to work, but if I stuff around a bit more I'm sure I can get the creation date directly and save your code the: -&lt;BR /&gt;&lt;BR /&gt;lib$find_file&lt;BR /&gt;get directory&lt;BR /&gt;$assign&lt;BR /&gt;dickie getfid&lt;BR /&gt;$qio&lt;BR /&gt;$dassgn&lt;BR /&gt;etc&lt;BR /&gt;&lt;BR /&gt;Hopefully more later, but in the meantime here's the documentation to go with my DIR_WATCH UWSSs. They really are quite clever and the code is being re-used here so could aid in understanding?&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;BR /&gt;&lt;BR /&gt;PS. Don't worry, all user-mode code in the new stuff.</description>
      <pubDate>Sun, 07 Mar 2010 03:45:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228354#M39604</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2010-03-07T03:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228355#M39605</link>
      <description>&lt;!--!*#--&gt;Richard, most true artist are only recognized when it's way too late. You know that. You will we redeemed. Eventually. Nice work on the directory watch. Looks neat.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mick, check out the attached. It does what you want with a cute 'hack' exploiting the fact that the LIB$FIND_FILE context is in fact... drum roll... a FAB.&lt;BR /&gt;And a nice FAB at that, as it has a hooked up and populated NAM upon success. &lt;BR /&gt;So stuff the Cobol IO and go naked. &lt;BR /&gt;Not to worry. This has worked for 20+ years, and there's no-one left to break it.&lt;BR /&gt;&lt;BR /&gt;fwiw, I pretty much replaced the getfid with an OTS$MOVE3 to de-reference the NAM from the FAB. Hardcoded ATR$ stuff to make kitting easier. This values can't be changed. They are baked in to too many programs.&lt;BR /&gt;And added a sanity check on the QIO IOSB&lt;BR /&gt;&lt;BR /&gt;Enjoy.&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;SMOP to pick up the full file name from the RSA (Resultant File Name String Address) or indeed why not from the lib$find_file return.&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Mar 2010 04:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228355#M39605</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-07T04:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL and XAB</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228356#M39606</link>
      <description>Hi Mick,&lt;BR /&gt;&lt;BR /&gt;I'd go with Hein's purely as it is fiendishly clever (although I contend that mine is demonstrable "better" :-)&lt;BR /&gt;&lt;BR /&gt;The lack of Macro's probably also a maintenance bonus for some. Anyway OTY. . .&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Mar 2010 05:16:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-and-xab/m-p/5228356#M39606</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2010-03-07T05:16:01Z</dc:date>
    </item>
  </channel>
</rss>

