VERSION Run Control Options

I have to keep looking this up, so I’m writing it down to make it easier to find next time! There are three modes for the VERSION app engine:

  • Report Mode
    Evaluates the VERSION counters and reports any changes needed; does not change data.
  • Classic Mode
    Resets all the VERSION counters to their starting value (1)
  • Enhanced Mode
    The default mode – it will “advance VERSION counters in a preditable manner” according to Oracle Support.

The name of your run control is how you change the behavior of the VERSION app engine.

  • Report Mode: REPORTONLYxxx – The run control must start with the REPORTONLY value (not case-sensitive)
  • Classic Mode: RESETVERSIONSxxx – The run control must start with the RESETVERSIONS value (not case-sensitive)
  • Enhanced Mode: Any value other than the two above will trigger Enhanced Mode

There is much more to running VERSION, but I’ll save that for another post.

4 thoughts on “VERSION Run Control Options

  1. I thought I’d share this customization for your future post. In the 8.52 days, we used to run VERSION (like RESETVERIONS form), but this always was a headache for browser cache. We would have the usual notice, email, or documents all saying “Please clear your browser cache!”. I din’t know too many commercial sites that plastered that notice on their site, so why should PeopleSoft. So I came up with a solution to deal with cache. I customized VERSION to drive the “content” type objects that get cached on web servers (and browsers), by forcing a version number increment by the number of weeks from a selected start date (version number used in file name). I update all content objects, so this included the tools objects (where upgrades gave most of the problems), and added the code at the end of the VERSION AE program. Doing a tools upgrade always resets the tools objects back to 1, but objects like PT_NAV2_JS_1.js will be completely different from major tools versions. So, this solved the issue. The only cost is extra overhead of re-caching after the VERSION runs, but this showed to be very small and occurred during non-peak times after the maintenance windows.

    /* Added incremental versioning for Web Content Objects.
    This solution is being implemented to resolve manual need to cache clearing
    that lead to corrupted pages.
    The sequence is generated based on the number of weeks from Jan 1st, 2012. Every
    week this version number will be incremented resulting in a new version number
    and new web content cache. VERSION is ran for the monthly maintenance release.
    */
    Local number &VER_SEQ;
    SQLExec("select TO_NUMBER(TO_CHAR(SYSDATE, 'IW')) + (52 * (TO_NUMBER((TO_CHAR(SYSDATE, 'YYYY')) - 2012))) AS VER_SEQ from Dual", &VER_SEQ);

    MessageBox(0, "", 0, 0, "Web Content sequence number incremented to " | &VER_SEQ);
    /* apply proper version changes */
    SQLExec("UPDATE PSCONTDEFN SET VERSION = :1 WHERE CONTTYPE IN (1,4,9)", &VER_SEQ);
    SQLExec("UPDATE PSSTYLSHEETDEFN SET VERSION = :1", &VER_SEQ);
    SQLExec("UPDATE PSVERSION SET VERSION = :1 WHERE OBJECTTYPENAME IN ('PDM', 'CRM', 'SSM')", &VER_SEQ);
    SQLExec("UPDATE PSLOCK SET VERSION = :1 WHERE OBJECTTYPENAME IN ('PDM', 'CRM', 'SSM')", &VER_SEQ);
    SQLExec("UPDATE PSVERSION SET VERSION = :1 WHERE OBJECTTYPENAME = 'SYS'", &VER_SEQ);

    /* END Version Mod */

    We don’t run “reset” anymore with the new VERSION AE options, but do still run a SQL after some tools upgrades/patches that ensure all the content objects change to force browsers to reload cached content (or just customize the tools upgrade CA job/template to not run the “Reset” type of VERSION, and use the fix/enhanced method).

    Local number &VER_SEQ;
    SQLExec("select MAX(VERSION) + 1 from PSVERSION WHERE OBJECTTYPENAME IN ('PDM', 'CRM', 'SSM')", &VER_SEQ);

    MessageBox(0, "", 0, 0, "Web Content sequence number incremented to " | &VER_SEQ);
    /* apply proper version changes */
    SQLExec("UPDATE PSCONTDEFN SET VERSION = :1 WHERE CONTTYPE IN (1,4,9)", &VER_SEQ);
    SQLExec("UPDATE PSSTYLSHEETDEFN SET VERSION = :1", &VER_SEQ);
    SQLExec("UPDATE PSVERSION SET VERSION = :1 WHERE OBJECTTYPENAME IN ('PDM', 'CRM', 'SSM')", &VER_SEQ);
    SQLExec("UPDATE PSLOCK SET VERSION = :1 WHERE OBJECTTYPENAME IN ('PDM', 'CRM', 'SSM')", &VER_SEQ);
    SQLExec("UPDATE PSVERSION SET VERSION = VERSION + 1 WHERE OBJECTTYPENAME = 'SYS'");

    1. Nate – I like that modification! I’d be tempted to clone VERSION and run the copy for any web content resets. That way you don’t have a “modified” VERSION program 🙂

      Updating the version for web content is a much better solution than sending out the email asking people to clear browser cache. First, very few people will clear their cache (I never clear cache if I see that in an email), and second, the cache clearing is automatic to everyone. Thanks for sharing the code!

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax