<?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: sys$synch iosb returning status as SS$_ENDOFFILE in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840845#M28439</link>
    <description>&lt;P&gt;The code for sys$qio and sys$synch are as below .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stat = sys$qio(0, chan,&amp;nbsp;IO$_WRITEVBLK | IO$M_NOVCACHE,&amp;nbsp; iosb,0, 0,&amp;nbsp;&amp;nbsp;&amp;nbsp; buf,&amp;nbsp; len,&amp;nbsp; blkn, 0, 0, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int&amp;nbsp;&amp;nbsp; stat = sys$synch(EFN$C_EFN, (short unsigned int *)iosb);&lt;/P&gt;</description>
    <pubDate>Mon, 22 Oct 2012 12:13:45 GMT</pubDate>
    <dc:creator>allin-in-one</dc:creator>
    <dc:date>2012-10-22T12:13:45Z</dc:date>
    <item>
      <title>sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840529#M28435</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;we have an application which is reading from the socket writing to disk using sys$qio. Using sys$synch to check the completion of operation.In sys$synch iosb returning status as SS$_ENDOFFILE. Please advise under what conditions this can occur.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 Oct 2012 10:57:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840529#M28435</guid>
      <dc:creator>allin-in-one</dc:creator>
      <dc:date>2012-10-22T10:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840629#M28436</link>
      <description>&lt;P&gt;Welcome to the forum!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some more information would be useful:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAX/Alpha/Itanium, OS versions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of your code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are truly using $QIOW then $SYNCH is superfluous.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&amp;nbsp;The synchronous services such as $QIOW execute code that checks for the true completion status in the same way that $SYNCH does"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Duncan&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 07:56:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840629#M28436</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2012-10-22T07:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840757#M28437</link>
      <description>&lt;P&gt;Thanks you. Sorry, it is a typo the service I am using is sys$qio&amp;nbsp; NOT sysqiow. the system is&amp;nbsp; IA64 OpenVMS V8.3.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 10:56:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840757#M28437</guid>
      <dc:creator>allin-in-one</dc:creator>
      <dc:date>2012-10-22T10:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840839#M28438</link>
      <description>&lt;P&gt;.. and your code sample, so that we can see exactly what your QIO command looks like, and the corresponding SYNCH operation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 12:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840839#M28438</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2012-10-22T12:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840845#M28439</link>
      <description>&lt;P&gt;The code for sys$qio and sys$synch are as below .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stat = sys$qio(0, chan,&amp;nbsp;IO$_WRITEVBLK | IO$M_NOVCACHE,&amp;nbsp; iosb,0, 0,&amp;nbsp;&amp;nbsp;&amp;nbsp; buf,&amp;nbsp; len,&amp;nbsp; blkn, 0, 0, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int&amp;nbsp;&amp;nbsp; stat = sys$synch(EFN$C_EFN, (short unsigned int *)iosb);&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 12:13:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840845#M28439</guid>
      <dc:creator>allin-in-one</dc:creator>
      <dc:date>2012-10-22T12:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840991#M28440</link>
      <description>&lt;P&gt;From the $SYNCH service description:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"The Synchronize service checks the completion status of a system service that completes asynchronously. The service whose completion status is to be checked must have been called with the &lt;STRONG&gt;efn&lt;/STRONG&gt; and &lt;STRONG&gt;iosb&lt;/STRONG&gt; arguments specified, because the $SYNCH service uses the event flag and I/O status block of the service to be checked."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see: &lt;A target="_blank" href="http://h71000.www7.hp.com/doc/84final/4527/4527pro_116.html#jun_584"&gt;http://h71000.www7.hp.com/doc/84final/4527/4527pro_116.html#jun_584&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code for the $QIO did not specify an efn, and you then used a completely different efn for the $SYNCH call!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You must specificy a non-zero efn in the $QIO call, and then use the same efn and the same iosb for the $SYNCH call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Duncan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 14:10:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5840991#M28440</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2012-10-22T14:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841023#M28441</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank for the reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;actually the code is &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;int&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="4" face="Courier New"&gt;&lt;FONT size="4" face="Courier New"&gt;stat = sys$synch(EFN$C_EFN, (&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4" color="#0000ff"&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="4" face="Courier New"&gt;&lt;FONT size="4" face="Courier New"&gt;&lt;FONT size="4" face="Courier New"&gt;*)iosb);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="4" face="Courier New"&gt;&lt;FONT size="4" face="Courier New"&gt; (stat == SS$_ILLEFC) &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sys$synch(0, (&lt;SPAN&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;&lt;FONT size="4" face="Courier New" color="#0000ff"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="4" face="Courier New"&gt;&lt;FONT size="4" face="Courier New"&gt;*)iosb);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As per the document &lt;A href="http://h71000.www7.hp.com/doc/82final/5841/5841pro_020.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/5841/5841pro_020.html&lt;/A&gt;&amp;nbsp;we can specify efn as EFN$C_ENF for ZERO&amp;nbsp; event flag&lt;/SPAN&gt;&amp;nbsp;EFN$C_EFN (128) is not supported (in VAX&amp;nbsp; and&amp;nbsp;early ALPHA)&lt;SPAN&gt;. Please correct me. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Actually this code is working in almost all scenarios. But I have seen a problem recently in which iosb is returning SS$_ENDOFFILE in some cases. I would like to know under what circumstances iosb status will be SS$_ENDOFFILE. From the manuals I couldn't find the circumstances for this scenario.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Once again thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 14:47:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841023#M28441</guid>
      <dc:creator>allin-in-one</dc:creator>
      <dc:date>2012-10-22T14:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841029#M28442</link>
      <description>&lt;P&gt;Like any good engineer, I like to see code and learn about versions and so one, but folks this is an EASY self-inflicted error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QIO&amp;nbsp;&amp;nbsp;IO$_WRITEVBLK returning &amp;nbsp;&amp;nbsp;ENDOFFILE means... drum roll.... the END OF FILE was reached. No kiddding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears the folks writing the application were just smart enough to be dangerous as suggested by the QIO + SYNC usage and the little known IO$M_NOVCACHE modifier.&lt;/P&gt;&lt;P&gt;But if you use QIO to write to a file, then the program needs to pre-allocate or extent the file as needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample below.&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Hein&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$create QIO_EOF.c
#include        &amp;lt;rms&amp;gt;           /* defines for rabs and fabs    */
#include        &amp;lt;stdio&amp;gt;         /* defins printf...             */
#include        &amp;lt;string&amp;gt;
#include        &amp;lt;iodef&amp;gt;
main(int argc,char *argv[])
{
char            buf[64*512];
struct FAB      outfab, *fab;   /* Allocate fabs and a pointer to fab */
int             s, i=0, len=512, blkn=1, sys$create(), sys$qiow();
unsigned short  iosb[4];

outfab = cc$rms_fab;                    /* Make this a real FAB (bid and bln) */
outfab.fab$b_fac = FAB$M_PUT;           /* record write access                */
outfab.fab$l_fop = FAB$M_UFO;
outfab.fab$l_fna = (argc &amp;gt; 1) ? argv[1] : "TMP.TMP";
outfab.fab$b_fns = strlen(outfab.fab$l_fna);
outfab.fab$l_alq = 10;


s = sys$create ( &amp;amp;outfab );     /* Try to open target file          */
if (s &amp;amp; 1) {
   s = sys$qiow(0, outfab.fab$l_stv, IO$_WRITEVBLK | IO$M_NOVCACHE,  iosb,0, 0,    buf,  len,  blkn, 0, 0, 0);
   printf ("qio %d. vbn = %d, status = 0x%0X, iosb = 0x%0X\n", ++i, blkn, s, iosb[0]);
   blkn = 10000;
   s = sys$qiow(0, outfab.fab$l_stv, IO$_WRITEVBLK | IO$M_NOVCACHE,  iosb,0, 0,    buf,  len,  blkn, 0, 0, 0);
   printf ("qio %d. vbn = %d, status = 0x%0X, iosb = 0x%0X\n", ++i, blkn, s, iosb[0]);
   if (s&amp;amp;1) s =  iosb[0];
   return s;
   }
}

$ cc QIO_EOF
$ link QIO_EOF
$ run QIO_EOF
qio 1. vbn = 1, status = 0x1, iosb = 0x1
qio 2. vbn = 10000, status = 0x1, iosb = 0x870
%SYSTEM-W-ENDOFFILE, end of file&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 14:45:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841029#M28442</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2012-10-22T14:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841033#M28443</link>
      <description>&lt;PRE&gt;$ help /messa/fac=SYS ENDOFFILE

 ENDOFFILE,  end of file

  Facility:     SYSTEM, System Services

  Explanation:  This message was received because of one or more of the
                following conditions:

 
                o The file system ACP encountered the end of the allocated
                  space for a virtual I/O operation or an attempted
                  truncation.


  User Action:  If necessary, modify the source program to detect and respond to the condition.

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 14:48:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841033#M28443</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2012-10-22T14:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: sys$synch iosb returning status as SS$_ENDOFFILE</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841123#M28444</link>
      <description>&lt;P&gt;Once&amp;nbsp; again thanks for the help .&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 16:00:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sys-synch-iosb-returning-status-as-ss-endoffile/m-p/5841123#M28444</guid>
      <dc:creator>allin-in-one</dc:creator>
      <dc:date>2012-10-22T16:00:27Z</dc:date>
    </item>
  </channel>
</rss>

