When a dictionary is generated using the “blddbdict” command, it includes a timestamp within it. This timestamp serves as a marker for the state of the dictionary at the time of its creation. Similarly, when a program is compiled, this timestamp is embedded within the compiled object code. This synchronization between dictionary and program timestamps ensures consistency.
However, situations may arise where changes are made to a database table, such as the addition of an index. When such changes occur, running the “blddbdict” command again is necessary to update the dictionary with the new structure. However, until the program is recompiled, the timestamp in the newly generated dictionary will differ from the one in the compiled program. This disparity can trigger the error message you’ve encountered.
To resolve this issue, follow these steps:
- Recompile the Product Line: To align the program with the updated dictionary, you should recompile the entire product line. This can be accomplished by running either the “qcompile” or “lawcmp” command.
- Check for User Exit Programs: If recompiling the program and its invoked programs does not resolve the issue, it’s possible that the program relies on a User Exit program. In this case, you must also compile the User Exit program using the “qcompile” command.
- Locate User Exit Program Code: User Exit program code is typically stored in the “LAWDIR/productline/XXsrc” directory, where “XX” represents the system code of the program. The program names often include “B” for beginning, “M” for middle, and “E” for end. For example, “CU01BPD” and “CU01BWS” could be the names of beginning User Exit programs for “CU01.”
- Check for Compiled User Exit Objects: You can also verify the existence of compiled User Exit objects in the “LAWDIR/productline/usrobj” directory. For example, you might find “CU01B.gnt” as a compiled User Exit object.
- Verify OS File and Directory Permissions: Lastly, ensure that the file and directory permissions on “LABDIR/dict” are set correctly. Both the directory and all files within it should be readable by the “lawson” user group.
By following these steps, you should be able to resolve the timestamp mismatch error and ensure that your program functions correctly with the updated database structure.