We help IT Professionals succeed at work.

why is my CGI RPGLE program showing old data until it is re-compiled?

Last Modified: 2013-12-25
I have a CGI RPGLE program that serves a web page getting data from a KRONOS (Iseries timekeeper) file. The program works fine until we run the KRONOS payroll process, where the transactions change to a status not valid for the data selection in the program. The file I am reading is a simple logical with a select/omit specification to select only unposted transactions (a blank in a certain field, which shouldn't be making any difference in my program's performance). However, once the process has been run, my CGI program shows old information!!. I mean it does not break or produce any error, but just shows the data like if it hasn't been updated!... And it gets fixed after I re-compile the program!... Now, is that weird or what?....(We have OS/400 V5R3M0 and KRONOS version 4.10)
Watch Question


1. Does it use embedded SQL?
2. What is its activation group settings?
3. Does it have USROPN specified for the file and does it CLOSE/OPEN the file each time?
4. Does the file have MAINT(*IMMED)? I.e., is the access path defined for immediate maintenance?
5. Does the program end with *inLR set off?

Those answers will help guide the search for the answer. They will suggest either the final answer or further questions along that path.



Thanks, Tom... Here are the answers......

1.- No
2.- H DftActGrp(*No) BndDir('*LIBL/CGIBNDDIR')
3.- Yes, USROPN and then I close them to the end of the process
4.- Yes, it does have MAINT(*IMMED)
5.- No, it ends with a "RETURN" instruction.

I will include the intruction to seton *inLR and see what happens.

These programs are done using the skeleton of the sample programs in Giovanny Perrotti's web site:

Tnhaks again.... I will inform of the results
Unlock this solution and get a sample of our free trial.
(No credit card required)


Thank you dave.

I have these meta tags:

<meta http-equiv="Content-Language" content="en-us">                  
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">              
<meta name="ProgId" content="FrontPage.Editor.Document">

I will also implement your suggestion and see what happens.              


I have included the "meta tag" suggested by dave, but I have also included a line to seton the *INLR
I am almost positive that the meta tag resolved the problem, but I also think that the LR indicator might have had something to do with the program performance. So I really appreciate Tom's input as well. Should anybody experience something like this, please take in account the suggestions from both experts.
I agree with Dave's suggestion. My questions were merely intended to eliminate possibilities on the basic execution. First rule is to ensure that everyone understands what the problem is. And it's almost as important for us to get the environment defined as it is to give an eventual answer. Later viewers of the thread should be able to determine if the given answer is appropriate to them.

Glad it's working for you.

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.