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



I)  Sequence vs identity.  Identity works great for a key value on a file, 
like order number for an order file, customer number for a customer number 
file.

II)  Yes an identity field can be read normally with rpg programs.  A 
ROWID is a lot like an identity field, but it has it's own unique type. 
While an identity field can be integer, etc a rowid is a unique type. 
Perhaps a good logical can cast it into some other type.

III)  Generally I would use identity fields for key fields.  A sequence 
field would be useful for some other field.  For example on a order file, 
the order number might be an identity column, but the 
ReturnGoodsAuthorizationNumber might be a sequence field.

IV)  What problems using an identity column?  Depends, if you do your 
writes with RPG I/O, how do you determine the number just used?  If I do 
it with sql I could do
EXEC SQL INSERT ... INTO MYFILE

EXEC SQL VALUES IDENTITY_VAL_LOCAL() INTO :NewOrder

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/info/db2/rbafzmstscale.htm#scaidentity

This may, or may not be critical.  If you don't care what the new order 
number is, fine, but if it's going to write out an order number and them 
pop up a screen for maintaining line numbers associated with that order, 
you might care.

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com


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.