×
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.
If you use GENERATED ALWAYS AS IDENTITY then you will be able to WRITE the record using RLA.
If you use GENERATED BY DEFAULT then you may need to create a view that does not include the identity column in order to use RLA to write the record.
The easiest way being to use IDENTITY_VAL_LOCAL in an SQL program.
EXEC SQL SET :RSCPCPRJ = IDENTITY_VAL_LOCAL();
I find using GENERATED ALWAYS and IDENTITY_VAL_LOCAL works well.
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Dow
Sent: Wednesday, August 31, 2016 2:06 PM
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Subject: Identity columns and RLA
What happens when writing a record with RLA to a table that has an
identity column?
Assuming it actually works, i.e. ignores the value in the identity
column on the WRITE, is there a way to get the value assigned to the
identity column?
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.