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



So - the user runs it 3 separate times and each time the problem happens
You run it - no problem

Does this file exist in more than one library - and it's a library list problem?

That's the only thing I can see about this

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Greg Wilburn
Sent: Thursday, September 05, 2019 4:37 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] RE: Value in field does not match database????

This is weird...

Program was last compiled Aug 31 2015 (4 years ago)... has been used 445 days.

100% certain the program has no errors. File is defined as input only, accessed via keyed logical view (this field is the 3rd part of the key).

Here is the weird part... I used UPDDTA to "look" at the record. It looked fine. Not sure this had anything bearing.

So instead of a user running the program (where the error occurred 3 times), I ran the program after setting an SEP and a breakpoint (it runs in QBATCH).

PROBLEM IS GONE!!

ODSEQ# = 8. No program message or error.

Friday the 13th is NEXT week, right?



-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Thursday, September 05, 2019 4:29 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Value in field does not match database????

Can't think of anything except either:

a) A programming error which has modified the value by mistake

b) Corruption probably due to mis-matched parameters

Has it been recently re-compiled for some reason? In the case of scenario b some causes of corruption can cause no apparent problems for years and then due to internal compiler changes a simple recompile causes it to crash and burn because the corruption now hits something that matters.


On Sep 5, 2019, at 4:08 PM, Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

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
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.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.