|
I sent this 10 minutes to soon. I think I found the answer here http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/index.htm?info/api s/open.htm, look for O_SHARE_NONE. -----Original Message----- From: Bartell, Aaron L. (TC) [mailto:ALBartell@xxxxxxxxxxxxxx] Sent: Friday, August 29, 2003 2:32 PM To: 'RPG400-L@xxxxxxxxxxxx' Subject: IFS file in use I am trying to lock an IFS file by opening it in one program (in debug) and then seeing if I can open it in another program (in debug in separate session). I thought the second program should puke and not provide me a handle for the file, but it gives me the handle just fine. I am assuming that since I am opening it for reading and writing that I should get a file lock but evidently not. Here is the program I am using to test the process: H DFTACTGRP(*NO) D open PR 10I 0 ExtProc('open') D filename * value options(*string) D openflags 10I 0 value D mode 10U 0 value options(*nopass) D codepage 10U 0 value options(*nopass) D close PR 10I 0 ExtProc('close') D handle 10I 0 value D* Reading & Writing D O_RDWR C 4 D handle S 10I 0 D rc S 10I 0 /Free handle = open('/tmp/Example3.xml': O_RDWR); rc = close(handle); *InLR = *On; /End-Free Any ideas? Aaron Bartell _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.