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



Scott:

Thanks very much. Had to tweak your first line just hair:

C                   eval      SpaceStart = OffsetDBR + 1         

Art Tostaine, Jr.
CCA, Inc.
Jackson, NJ 08527


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, August 12, 2003 6:38 PM
To: Midrange Systems Technical Discussion
Subject: RE: DSPRCDFMT from News/400?


On Tue, 12 Aug 2003, Art Tostaine, Jr. wrote:
>
> Here's the complete source.  It works on my V5R1 machine.
>
[SNIP]

There are two lines of code in this program that look like they could
be causing release compatibility issues.  If they aren't, they will
eventually.  :)

The first one is here:

     C                   eval      SpaceStart = 513

This number should not be hardcoded to a value.  It should be retrieved
from data in the user space.  Otherwise, if IBM adds any new data to the
header area of the space, it'll cause an incompatibility.

Presumably, he should be using the OffsetDBR field which he's even using
for the data base relations API, and just not for the list fields API,
which really bugs me :(

The other one is here:
     C                   eval      SpaceStart = (SpaceStart + DataSize)

He's adding "DataSize" (which is the size of his data structure) to the
space start.  That's not right.  He should be adding the Entry Size to
his start position, not the size of his data structure.   Otherwise, if
IBM adds any new fields into the per-entry data, it'd break
compatibility.

Since I don't have the rest of this code (the screen DDS, the files, the
command, etc) I can't change it and compile/run it... therefore I don't
know if that really solves the problem.

But, those things just jump out at me as being "timebombs"

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-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.