Re: Thanks for the info on *USRQs; now a question about LOCK/UNLOCK
Dave McKenzie <[email protected]>
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
Since a *FILE is a system domain object, you can't manipulate it directly with a user state program. ALCOBJ is probably the easiest way. What I usually do is create an ILE CL module with all the CL commands I want to do and bind it with the C module. Then call it like a function, passing parms to the commands. --Dave James H H Lampert wrote: > My Fellow MI geeks: > > Thanks for the suggestions; I ended up trying a *USRQ, and it turned out > to be easier to deal with than I'd imagined. > > Now, I'm trying to append a group of records (the exact number unknown > at compile time) to a physical file, while keeping all other jobs out of > the file (so that there's no chance of two jobs interleaving their > blocks of records). So I tried the ILE C front-end for the LOCK MI > instruction, passing it a system pointer to the file, and it blew up in > my face with a Sec40 violation. > > Can somebody explain what's going on here? > > What do I need to do? Am I stuck with having to shell out ALCOBJ and > DLCOBJ CL commands? Or is there a cheaper way? > > -- > JHHL > _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.