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

Posted on 2007-10-09
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)
Question by:spr-electrolux
    LVL 26

    Expert Comment


    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.


    Author Comment

    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
    LVL 14

    Accepted Solution

    This sounds like the web pages might be cached.
    have you inculded
    in the script?


    Author Comment

    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.              

    Author Comment

    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.
    LVL 26

    Expert Comment

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
    Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
    Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now