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



1. Check the Outline view to see what statements modify the field, marked with an (M).
2. Set a Watch Breakpoint in debug to see every time the field value changes.

HTH



-----Original Message-----
From: Greg Wilburn [mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx]
Sent: Thursday, September 05, 2019 3:09 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Value in field does not match database????

A program that is well over 4 years old failed today... When I view the suspect field value in debug (or do a PGM DUMP and view in spool file), I see a DIFFERENT value than what is actually in the database file.

How could this be??

The field in question ODSEQ# is packed (5,0) - it is the line sequence number for our Order Entry Detail file.

In debug (and in the dump) the value in this field is 03409.
In the database file, the value is 8.

I verified the database record using SQL select by

1. Keyed values, and

2. Relative Record Number (got this from WRKJOB)

The field inside the program is not manipulated or referenced anywhere in the code, other than the failing line:
EVAL %SUBST(PSQ:ODSEQ#:1) = 'X'

This is from the dump:
ODSEQ# PACKED(5,0) 03409. '03409F'X

This is from SQL select:
COMPANY ORDER WWSEQ5
014 10001831 8

Any ideas???

Greg


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.