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



Stu,

If it were me, I'd open a PMR with IBM to clarify the way it is supposed to 
work.

That being said, here's how I'd work around the way it is working now.  Change 
the RPG program that writes out the records to use a logical file that does not 
contain the identity column. 

HTH,

Charles Wilt
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
 

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Bramley, Stu
> Sent: Friday, April 29, 2005 7:30 AM
> To: RPG programming on the AS400 / iSeries
> Subject: Identity Columns
> 
> 
> I can't find anything in the IBM manuals to explain what is 'supposed'
> to happen when using an identity column with the identity value
> generated by default in RPG.
> 
> An article by Kent Milligan on the iSeries network site at: 
> http://www.iseriesnetwork.com/artarchive/index.cfm?fuseaction=
> viewarticl
> e&CO_ContentID=15329&channel=art&subart=issue&issueid=677
> 
> states that :
> 
> "If a row is added via a non-SQL application interface (e.g., RPG
> Write), DB2 UDB will always generate the identity column value even if
> BY DEFAULT has been specified."
> 
> However our (VR53) box doesn't behave in this manner - if an 
> RPG program
> writes a record or it is inserted by another means (eg. DFU without
> specifying a value for the identity column) it is written as zero.
> 
> As I can't find IBM documentation saying how this is supposed 
> to work, I
> don't know if this is a bug, or it is working as designed... 
> Is there a
> way (compile option?) to make the database generate the value for the
> identity column without specifying generated always (which 
> doesn't work
> with our HA mirroring software)?
> 
> Cheers,
> Stu
> 
> Stuart Bramley 
> Senior Technical Developer 
> Skandia Life::GroupIT 
> Southampton 
> t: 023 80 72 64 29 e: stu.bramley@xxxxxxxxxxxxx 
> IBM Certified Specialist
> Sun Certified Java Programmer
> If you are not the intended recipient, please notify the 
> sender by return email and then delete the message from your 
> computer. The Skandia UK Group reserves the right to monitor 
> e-mail communications through its networks.
> 
> No contract may be concluded on behalf of the Skandia UK 
> Group by email.
> 
> Skandia Life Assurance (Holdings) Limited Skandia Life 
> Assurance Company Limited Skandia MultiFUNDS Limited, Skandia 
> Investment Management Limited.
> 
> Registered Nos: 1606702, 1363932, 1680071, 4227837, England
> Registered Office: Skandia House, Portland Terrace, Southampton SO14
> 7EJ, United Kingdom
> 
> Royal Skandia Life Assurance Limited Registered No : 24916 Isle of Man
> Registered Office: Skandia House, King Edward Road, Onchan, 
> Isle of Man IM99 1NU, British Isles
> 
> Skandia Life Assurance Company Limited, Skandia MultiFUNDS 
> Limited, Skandia Investment Management Limited and Royal 
> Skandia Life Assurance Limited are authorised and regulated 
> by the Financial Services Authority for UK
> investment business.
> 
> Internet: www.skandia.co.uk
> 
> 
> 
> -- 
> 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 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.