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



The problem is in whatever is calling this, not in this program
itself.   Since #F1 & #F2 are parameters, they are using memory from
the calling program.

If the calling program has less than 126 bytes allocated to the
variable/array/datastructure that it's passing for the first parm,
then you'll have a problem.

i.e. your program writes 126 blanks starting at the beginning of the
variable passed, and continuing past the end of the variable if necessary,
until 126 blanks have been written.

The command-line, for example, will only allocate 32 bytes to each
parameter.  Thus, 86 extra blanks will go in whatever happens to be in
memory after those 32 bytes.   In your case, that happens to be the other
parameter (you're lucky, because it could potentially be something that
would cause much bigger problems)

I hope that explanation helps you understand how it works...


On Fri, 25 Oct 2002 Frank.Kolmann@revlon.com wrote:

> I am probably missing something simple.
> I checked the archives but did not uncover much.
> The following is code snipped from a production program.
> The line to clear the array W  also clears some elements
> in array SLS.
> Debug the program and display SLS, I saw some elements in
> SLS were 0 after the CLEAR of W.
> This is on V4R5, any suggestions.
>
> Frank Kolmann
>
>
> H OPTIMIZE(*NONE) OPTION(*NODEBUGIO)  ALWNULL(*USRCTL)
> H DFTACTGRP(*YES)
> D #F1             DS
> D  W                             7S 0 DIM(18)
> D #F2             DS
> D  SLS                           7S 0 DIM(36)
> C     *ENTRY        PLIST
> C                   PARM                    #F1
> C                   PARM                    #F2
> C                   SetON                                        LR
> C                   Clear                   SLS
> C                   Z-Add     22            SLS
> C                   Clear                   W
>



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.