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


  • Subject: Re: Variable corruption
  • From: "Peter Dow" <pcdow@xxxxxxxxx>
  • Date: Fri, 1 Oct 1999 11:28:41 -0700

Hi Loyd,

Without seeing all the details, it smells like you've got some parameters to
QWCCVTDT defined with the wrong size or something. For example, if the API
is expecting a 10-character field and you pass it a 6-character field, it
will change the 4 characters immediately following the 6-character field. If
these 4 happened to be nextpos, results are unpredictable.

That's just a guess.

Peter Dow
Dow Software Services, Inc.
909 425-0194 voice/fax


----- Original Message -----
From: Goodbar, Loyd (AFS-Water Valley) <LGoodbar@afs.bwauto.com>
To: <midrange-l@midrange.com>
Sent: Friday, October 01, 1999 8:03 AM
Subject: Variable corruption


> Has anyone experienced variable corruption while using APIs in an RPG/IV
> program (non-ILE)?
>
> I wrote a progam to process save files (retrieve info and display).
> Everything worked fine until I started using the QWCCVTDT (Convert date
and
> time format) API.
>
> Here's a quick sample:
> - - - - -
>
> d nextpos 9b 0 inz
> c eval nextpos = offstart + 1
> c do numentries
>  * Receive entry
> c call 'QUSRTVUS'
> c parms .........
>  * Process if save file
> c if extatr = 'SAVF'
>  * Convert creation date
> c call 'QWCCVTDT'
> c parms........
>  * Display
> .....
> c endif
> c eval nextpos = nextpos + sizeent
> c enddo
>
> - - - - -
>
> Before using the QWCCVTDT API, nextpos would increment by 172 (the length
of
> the OBJL0300 return list). After inserting the API, nextpos would become
> corrupted after the QWCCVTDT API was called.
>
> For example, nextpos would increment from 1196 to 1368 (not real numbers).
> After calling the QWCCVTDT, nextpos was -252513633.
>
> Using this code fixed the problem:
>
> - - - - -
>
> d mynextpos 9b 0 inz               (NEW)
> d nextpos 9b 0 inz
> c eval nextpos = offstart + 1
> c do numentries
>  * Receive entry
> c call 'QUSRTVUS'
> c parms .........
> c eval mynextpos = nextpos         (NEW)
>  * Process if save file
> c if extatr = 'SAVF'
>  * Convert creation date
> c call 'QWCCVTDT'
> c parms........
>  * Display
> .....
> c endif
> c eval nextpos = mynextpos       (NEW)
> c eval nextpos = nextpos + sizeent
> c enddo
>
> - - - - -
>
> nextpos is used with the QUSRTVUS API, but not with the QWCCVTDT API.
> Has anyone had experience with the variable corruption I'm experiencing?
It
> was easy to work around, but this does concern me.
>
> Thanks!
>
> --
> Loyd Goodbar
> Programmer/Analyst
> Borg-Warner Automotive, AFS, Water Valley
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.