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



RPG file i/o fully supports Identity columns. When you write to a table
with a identity column it gives it the next available value in RPG or SQL
I/O. You do not need to do what you did.

A CLRPFM does not reset an identity column. You need an alter table to
reset.


On Thu, Aug 22, 2013 at 1:38 PM, dale janus <dalejanus@xxxxxxxxxxxxxxxxx>wrote:

We are gradually modernizing our accounts payable system and have defined
the files with DDL.

The basic method is data is added to an entry file (by a PHP program)
that has an identity column. The entry file is processed and the
identity column is moved to a similarly defined field in the master file
that is NOT defined as an identity column but will be used as if it were
an identity column. It is defined as an integer, same as the record id in
the entry file.

The reasoning for this method was SQL is not being used in the RPG
programs, so the identity column in the master file may not get
incremented correctly. The entry file is fed by PHP/SQL so the DDL
should do its thing there and we would have nice unique identities that
could be added to the master files.

After each batch is updated, we run CLRPFM on the entry file. I was
assuming this would not reset the record id number, but we have been
getting some duplicate ids in the master file. As we are preparing this
system, we are slinging data around like there's no tomorrow, so it's
possible that we did something ourselves that caused the duplicates. But
I'd like to make sure my method for coming up with unique numbers from
the entry file are valid.


So can anyone confirm that CLRPFM will not reset the identity column in a
DDL defined file?


---Dale
--
This is the RPG programming on the IBM i (AS/400 and 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 ...

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.