On 1 June 2015 at 20:32, Fajardo, Eduardo <eduardo.fajardo@xxxxxxxxx> wrote:
I'm just surprised to know why the data didn't get dropped but instead moved to the next field. A colleague from way back says it is related to what he calls "5250 data stream" which I'm now googling.

Your colleague is almost right.
Here's a simple example.

Display file fields:

When RPG sends to the screen, it sends 35 characters. The DDS
interprets the first 5 as the customer number and the next 30 as the
name. Which it displays according to the specifications. Now let's
change the program. The two fields are in a data structure (which is
unusual, but that's a different thread...) We make the customer
number 6 long in the RPG and don't compile the DDS.

The buffer in the RPG program is 36 characters long and the buffer in
the DDS in still 35. You send the 36 bytes to the screen and the DDS
interprets the first 5 as the customer number and the next 30 as the
name. But column 6 actually contains the last character of the
customer number, because that's where the RPG program put it. So the
NAME field gets the 'extra' character.

This is the key point: RPG does not send individual fields to the
screen, it sends a single block of data, very much like a data
structure. If you change the DS on one side but not the other, the
field mapping will be all wrong.

I can't say that I have ever had a use for LVLCHK(*NO) on a display file.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.