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



An example...

Say I have a screen display that utilizes fields from a file, in this
case I would use the external DS.  The user enters information into
this screen, which changes the data structure.  When the user presses
enter say I want to validate this data and make sure they are not
duplicating data in another record.  Currently I would have to save
a copy of the buffer then read through my records and do validation,
and then restore the buffer and write it.

With this new method, I would not have to save the buffer, but would
just read the file into another data buffer and do my checking on
that, then when I was finished I could simply write my data buffer
that is shown on the screen.

Many times I have found myself having to save record data buffers
into a temp buffer so I could check other records in a file.  It
has always been a pain to code and prone to bugs if I forget a
variable or two.  This way would be much easier, IMO.

Regards,

Jim Langston
Programmer/Analyst
Cels Enterprises, Inc.

-----Original Message-----
From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
Behalf Of boldt@ca.ibm.com
Sent: Tuesday, August 28, 2001 10:33 AM
To: rpg400-l@midrange.com
Subject: RE: Externally-Described Field used as array name.



Njal wrote:
>What's the benefit of this (I/O to ext-desc struct) versus today's ability
>to define a "ds like(rcdfmt of file)"?
>
>I assumed he was after a function like the Windows API MapViewOfFile
>which would be more like System Service Tools (SST) sees all objects.

What are the benefits (other than just another ticky mark in the
announce letter)?  First, you can have one READ read into data
structure A and another read into DS B.  Some people might find
that useful, especially if they're using qualified data structures.
Secondly, since the DS matches the layout of the record format,
only one move of a block of bytes is needed, rather than moving
multiple fields, some of which may require data conversion.  And
so I/O may be a little faster.  OK, performance isn't really that
big an issue - the main thing is providing some additional
flexibility that some programmers have requested.

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com




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.