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



Hi Gerald,

Not sure what you are doing wrong!
I never had problems compiling sources where I specified SQL indexes in the
F-Specs.

Here an example:
1. I have the following DDS described physical file (ORDHDR):
A UNIQUE
A R ORDERHDR
A ORHNBR 5 COLHDG('ORDER NUMBER ')
A ALIAS(ORDER_NUMBER )
A CUSNBR 5 COLHDG('CUSTOMER NUMBER ')
A ALIAS(CUSTOMER_NUMBER)
A ORHDTE L COLHDG('ORDER DATE ')
A ALIAS(ORDER_DATE )
A ORHDLY L COLHDG('ORDER DELIVERY ')
A ALIAS(ORDER_DELIVERY )
A SRNBR 10 COLHDG('ORDER SALESREP ')
A ALIAS(ORDER_SALESREP )
A ORHTOT 11P 2 COLHDG('ORDER TOTAL ')
A ALIAS(ORDER_TOTAL )
A K ORHNBR

2. There is a SQL index over this physical file defined as follows:
Create Index OrdHdrI01 ON MySchema/ORDHDR
(ORDER_DATE, CUSTOMER_NUMBER, ORDER_NUMBER);

3. Here is a snippet from an RPG Program where I define this index in the
F-Specs:
H Option(*NoDebugIO) Debug
H DatFmt(*ISO) TimFmt(*ISO)
***************************************************************
FORDHDRI01 IF E k DISK Rename(OrdHdrF: OrdHdrF1)
***************************************************************
* D-Specs
***************************************************************
/Free
... Some Code
SetLL (D'2004-07-10': '55555') OrdHdrF1;
If Not %Equal;
Return;
EndIf;

... Other Code
ReadE (KeyDate: KeyCust) OrdHdrF1;

/End-Free

Hope this helps!

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von
GKern@xxxxxxxxxxxxxxxx
Gesendet: Friday, April 20, 2007 14:31
An: midrange-l@xxxxxxxxxxxx
Betreff: AW: SQL logical file equivalent


Birgitta,

"A SQL Index can be used with native I/O like any keyed DDS described
logical file."

I've tried that but never found it to be acceptable to the RPG compiler.

Care to share an example?

Regards, Jerry

Gerald Kern - MIS Project Leader
Lotus Notes/Domino Administrator
IBM Certified RPG IV Developer
The Toledo Clinic, Inc.
4235 Secor Road
Toledo, OH 43623-4299
Phone 419-479-5535
gkern@xxxxxxxxxxxxxxxx


This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized use, disclosure or distribution is
prohibited. If you are not the intended recipient, please inform the
sender by reply e-mail and destroy this and all copies of this message.

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.