Yes, RRN(table-name) is available. The trouble is, that value can be different for the same data set in a record due to at least a couple things - most of all, RGZPFM with order based on a logical file. So it isn't going to be guaranteed to be the same for any record between one run and another.

Vern

Brian Johnson wrote:
No sure why someone thinks they need RRN to insert. However RRN is available for SQL queries:

select rrn(mytable), mytable.* from mytable ...

No need to add additional fields, and works with physical files created from DDS. The RRN result column could be used in subsequent update statements, eliminating the need to know the primary key (perhaps one does not even exist) for the table.


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
fbocch2595@xxxxxxx
Sent: Monday, February 01, 2010 3:45 PM
To: midrange-l@xxxxxxxxxxxx
Subject: IDENTITY_VAL_LOCAL


Hi Folks, I'm out of my league on this one but I'd like to
know if it's possible to define a field in DDS that will hold
the RRN without having any programming to populate the field?

We are trying to update fields in an AS400 file from the web
server using SQL. Our web people are saying they need the
RRN in the file in order to insert the record using SQL.
They asked if we could create a field and use the function
Identity_Val_Local but we've got no experience with it.

Does anyone out there in AS400/iSeries land know how it's used?

As always, thanks ahead of time.

Frank


--
This is the Midrange Systems Technical Discussion
(MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



_______________


Confidentiality Notice: This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.

________________

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.