|
1222 = Record cannot be allocated due to referential constraint error. Well, if we ever do referential constraints on the DB (we don't), we'll have to add that (probably with the file's own service program to write to the file, so all the writes are in one place). -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx Sent: Monday, February 27, 2006 3:03 PM To: RPG programming on the AS400 / iSeries Subject: Re: Duplicate Record Monitoring I just tested that out. You get an error 1222. Field status in program francis2 is 1222. 'A' did exist in francisc but not in francisa. program francis1 FFRANCISC UF A E K DISK rename(francisc:francisr) /include routines/qprotosrc,qcmdexc /free chain(e) 'A' francisr; qcmdexc('DLYJOB DLY(300)':15); *inlr=*on; /end-free program francis2 FFRANCISA UF A E K DISK rename(francisa:francisr) D status s 5i 0 /free mykey='A'; mychar='bubba'; write(e) francisr; status=%status(francisa); //debug *inlr=*on; /end-free Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Raul A. Jager W." <raul@xxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 02/27/2006 03:39 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Fax to Subject Re: Duplicate Record Monitoring I think it does happen if you have "Relational Integrity" and the "master" for the record you are trying to add is locked. Lapeyre, Francis wrote: >I have to wonder how a record lock can happen on a record that doesn't exist >yet.. Some undocumented feature? > >Francis Lapeyre >IS Dept. Programmer/Analyst >Stewart Enterprises, Inc. >E-mail: flapeyre@xxxxxxxx > > > >-----Original Message----- >From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] >On Behalf Of Buck >Sent: Monday, February 27, 2006 2:19 PM >To: rpg400-l@xxxxxxxxxxxx >Subject: Re: Duplicate Record Monitoring > > > However, I've never had any error other > than a 1021 on that file. > >That's just Murphy's way of telling you that a record lock is in your near >future... :-) > --buck >
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.