I have two programs where table array occurs depending on and both having the same definition. PGM A loads the table from the accumulated working variables. PGM B loads from the file.
When PGM A search the key for the table and doesn't find anything the program will have decimal data error.
When PGM B search the key for the table and doesn't find anything the program won't have decimal data error. I just want to know what's wrong with PGM A.
My guess is that your array is defined as numeric, but was not initialized before populating it. Try initializing your array with zeros, *hival, *loval etc. and I will bet your problem goes away. If that doesn't do it, then you might want to examine the data that program A is attempting to put into your array.
Dig Deeper on RPG iSeries programming
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.