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



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:
CUST# 5
NAME 30

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

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.