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



Thanks for the info, everyone... I certainly benefitted for it. I also
knew there was an issue but I never bothered to ask what the issue was for
myself. My solution was to never populate the data type.


Michael Schutte
Admin Professional
Bob Evans Farms, Inc.
"The Secret's the Sauce! Enjoy our new Bob-B-Q Pulled Pork Knife & Fork
Sandwich!"


rpg400-l-bounces@xxxxxxxxxxxx wrote on 10/17/2007 05:52:39 PM:

Bob P. Roche wrote:
A co-worker had a problem, that I haven't seen before, maybe there is a

PTF for it. He has a file with a field defined as 9s 0, we can verify
it
in several places.

Yes. This is the way RPG works. It converts all numeric fields from
files into packed (unless you tell it not to.) That way, you can use
the same field names in multiple files, and they'll all have the same
definition.

For example, if you have a CUSTMAS (Customer Master) file and a DDS
display file that's intended as a place to edit the customer master
record. You can use the same field names in the display file as you do
in the CUSTMAS record. So you don't have to manually move every field
from CUSTMAS to the display... you can just read the CUSTMAS file, and
it'll automatically populate the display fields.

The same works for any type of file (display, printer, database,
communications, tape, etc). So you can read a record from one file and
write it to another.

The idea is to convert everything to a common format -- to facilitate
this idea of sharing fields between files.

This is the way that RPG has worked since RPG III was introduced on the
S/38.

Note that if you declare an external data structure, or you read your
database file into a data structure, the rules change. When you do
this, RPG will stop trying to convert things to packed, and will use the
same definition that's in the database.
--
This is the RPG programming on the AS400 / 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.