× 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.



Craig,

I noticed that no one has answered your post.  Have you gotten fcntl() to
work yet?  I'm currently trying to do the same.

I too, would love to see a working code snippet.

see inline below:

----original message-----
I am receiving an IFS file that appears to have type STMF.  I want to
automatically FTP that file from one AS/400 to another using RPG IV.  I
need to make sure that the file is completely written.  I have heard you
could use fcntl() to see if there is a lock on the file in order to
determine if data is still being written.  I have never really programmed
with IFS files before but I have learned quite a bit from this RPG list and
the information center.  <<<snip>

Thanks,
Craig Strong

<some code snipped>

D flock           DS
     D  l_type                        5I 0            F_RDLCK...
     D  l_whence                      5I 0            Flag for offset

<more code snipped>

      * Perform file control
     D fcntl           PR            10I 0 ExtProc('fcntl')
     D  fildes                       10I 0 Value
     D  cmd                          10I 0 Value
     D  arg                                Value Like(flock)
<more snips>

----end original message-------------------------

is the problem maybe that 'arg' should be a pointer to a based
datastructure, rather than the datastructure itself?

all of this is like 'fish out of water' stuff to me, but from what I've
been able to gleen from reading the archives is that the c functions tend
to only accept pointers, not data.   i could be wrong though - (probably
am).

Rick



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.