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




Hi All,

Can anybody please confirm if they have an error when running this code:

d DS1 ds qualified
d template
d line 200A dim(50)
d zone 3S 0 overlay(line:01)
d char 3A overlay(line:01)

d DS2 ds likeds(DS1)

d i s 5S 0

/free

for i = 1 to %elem(DS2.line);
DS2.zone(i) = 50 - i;
endfor;
sorta DS2.char;

*inlr = *on;
return;

/end-free

When we run it on our 6.1 machine it fails on the sorta specifying a pointer error (originating from a reference to a space offset outside the job).

The array(s) within DS2 is populated without errors, and all elements can be referenced within debug.

Interestingly, if we comment out the template keyword and recompile/rerun, the code runs fine - the array is sorted.
If the code is amended to run directly on DS1 (without template) everything is fine also.
To make it weirder, if we reduce the size of line to say 20A it also works without errors.

This code is a sample created to reproduce the error. I'd be very interested to see if anybody else can reproduce this, or offer any ideas as to the cause.

Cheers

Larry Ducie



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.