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



Pardon me, but what does "fails on compilation" mean exactly? Is there an
error message perhaps?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"An invasion of armies can be resisted, but not an idea whose time has
come."
-- Victor Hugo



I found a tip from Bob Cozzi which detailed how to automatically map a
DB record to a DS by using a prefix in the file declaration that was
formatted to the qualified DS. This works and can be proven that only
one move is required for the read by stepping through in DEBUG when
*NODEBUGIO is NOT used.

The code looks like:

fafile uf e disk prefix('C.') usropn
:
:
:
d c ds likerec(rafile)
:
:
Read afile c;


The file I'm using has 20 repeating groups of 5 fields (It's a 25 year
old file and no one dares change it!) in the record (rafile) which I
want to access via an array DS, but I can't work out how to do this.

All the code I've tried fails on compilation and I was hoping someone
could point me to a link, or provide an example of achieving what I
want.

The last attempt was:

d c ds likerec(rafile)
d array likeds(ctlds) dim(20)
d overlay(c.kpro1v)
*
dctlds ds qualified
d f1 25
d f2 1
d f3 1
d f4 2s 0
d f5 5

Thanks In Advance



_______________________________________________________________________
________________

The information transmitted in this message and its attachments (if
any) is intended
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any
review,
retransmission, dissemination or other use of, or taking of any action
in reliance
upon this information, by persons or entities other than the intended
recipient is
prohibited.

If you have received this in error, please contact the sender and
delete this e-mail
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose
or distribute
the information contained in this e-mail and any attached files, with
the permission
of the sender.

This message has been scanned for viruses.
_______________________________________________________________________
________________
--
This is the RPG programming on the IBM i / System i (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.