× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



By error code I assume you mean errno, and in that case errno 3021
would map to message CPE3021: The value specified for the argument
is not correct.

In looking at your sample code, I would suggest a few changes.  I
would add VALUE to the three parameters being defined on your function
prototype of fcntl(); verify that F_SETFL is being initialized to the
value you want (looking at qsysinc/h fcntl it looks like SETFL is
mapped to '7' and that '4' is SETLK); verify your flag setting is
appropriate for what your arg is (O_NONBLOCK is not a 4 for instance);
etc.

Bruce

>
>When I attempt to execute the code below I get an error code of 3021, which
>I can't find anywhere. Does anybody know what this error code means?
>
>Thanks,
>
>Albert
>
> D F_SETFL         s             10i 0 inz(4)
> D Non_Block        s             10i 0 inz(4)
>D SocketID           s              10i 0
>
> D fcntl           PR            10i 0 ExtProc('fcntl')
> D  fcntl_skt                    10i 0
> D  fnctl_cmd                   10i 0
> D  fcntl_opt                    10i 0
>
> C                   eval      rc = fcntl(SocketID:F_SETFL:Non_Block)
>


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.