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



Have you tried adding the DB reference using RDi?



________________________________
From: Booth Martin <booth@xxxxxxxxxxxx>
Sent: Monday, January 1, 2018 1:14 PM
To: RPG programming on the IBM i / System i
Subject: RPGLE SQ:L retrieving Identity Column for DSPF

I create a file:

// Create STATESP File
exec sql
create table MARTIN/STATESP (
ID_COL for unique numeric (6, 0)
generated always as identity
(start with 1, increment by 1, no cycle),
STATE char(13) not null,
CITY char(13) not null);

Then I write a DSPF:
*****************************************************************
R SFL1 SFL
S1ID_COL R 5 3REFFLD(ID_COL STATESP)

And the compile fails with ID_COL not defined so I did DSPFFD and see
the field's name is UNIQUE and tried that, but that failed too. (IT
does find STATE & CITY so it's field related.)

Which leads me to conclude there is more to this so I start looking
around and don't recognize anything that helps me. My current concern
is that I best figure this out so I don't confuse the RRN's value with
the Identity Column value.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.