- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: sys$synch iosb returning status as SS$_ENDOFFI...
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
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
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
10-21-2012 11:58 PM - edited 10-22-2012 03:57 AM
10-21-2012 11:58 PM - edited 10-22-2012 03:57 AM
sys$synch iosb returning status as SS$_ENDOFFILE
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 12:56 AM
10-22-2012 12:56 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
Welcome to the forum!
Some more information would be useful:
VAX/Alpha/Itanium, OS versions?
Example of your code?
If you are truly using $QIOW then $SYNCH is superfluous.
" The synchronous services such as $QIOW execute code that checks for the true completion status in the same way that $SYNCH does"
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 03:56 AM
10-22-2012 03:56 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
Thanks you. Sorry, it is a typo the service I am using is sys$qio NOT sysqiow. the system is IA64 OpenVMS V8.3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 05:08 AM
10-22-2012 05:08 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
.. and your code sample, so that we can see exactly what your QIO command looks like, and the corresponding SYNCH operation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 05:13 AM
10-22-2012 05:13 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
The code for sys$qio and sys$synch are as below .
stat = sys$qio(0, chan, IO$_WRITEVBLK | IO$M_NOVCACHE, iosb,0, 0, buf, len, blkn, 0, 0, 0);
int stat = sys$synch(EFN$C_EFN, (short unsigned int *)iosb);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 07:10 AM
10-22-2012 07:10 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
From the $SYNCH service description:
"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 efn and iosb arguments specified, because the $SYNCH service uses the event flag and I/O status block of the service to be checked."
see: http://h71000.www7.hp.com/doc/84final/4527/4527pro_116.html#jun_584
Your code for the $QIO did not specify an efn, and you then used a completely different efn for the $SYNCH call!
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.
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 07:41 AM - edited 10-22-2012 07:47 AM
10-22-2012 07:41 AM - edited 10-22-2012 07:47 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
Thank for the reply.
actually the code is
int
stat = sys$synch(EFN$C_EFN, (int*)iosb);
if (stat == SS$_ILLEFC)
sys$synch(0, (int*)iosb);
As per the document http://h71000.www7.hp.com/doc/82final/5841/5841pro_020.html we can specify efn as EFN$C_ENF for ZERO event flag EFN$C_EFN (128) is not supported (in VAX and early ALPHA). Please correct me.
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.
Once again thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 07:45 AM
10-22-2012 07:45 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
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.
QIO IO$_WRITEVBLK returning ENDOFFILE means... drum roll.... the END OF FILE was reached. No kiddding.
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.
But if you use QIO to write to a file, then the program needs to pre-allocate or extent the file as needed.
Sample below.
Good luck,
Hein
$create QIO_EOF.c #include <rms> /* defines for rabs and fabs */ #include <stdio> /* defins printf... */ #include <string> #include <iodef> 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 > 1) ? argv[1] : "TMP.TMP"; outfab.fab$b_fns = strlen(outfab.fab$l_fna); outfab.fab$l_alq = 10; s = sys$create ( &outfab ); /* Try to open target file */ if (s & 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&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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 07:48 AM
10-22-2012 07:48 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
$ 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2012 09:00 AM
10-22-2012 09:00 AM
Re: sys$synch iosb returning status as SS$_ENDOFFILE
Once again thanks for the help .