Overview

Viewpoint Versioning is a new feature designed to archive ‘versioned’ copies of ViewPoint objects (views, reports, scripts) and output stream files (PC files on the IFS) when performing a save-and-replace operation.

This new feature is invoked based on the value of the REPLACE parameter on some commands (explicit ver- sioning), the value of the Replace Action user default when using ‘Design’ commands, or when using ViewPoint to modify and save views, reports, or scripts (implied versioning).

So, when you open an existing view—make a change—and save— the save operation (using the REPLACE parameter) can either:

  • Overwrite the object - REPLACE(*YES)
  • Does not overwrite and issue a warning - REPLACE(*NO)
  • Create a versioned copy of the object and save the existing object - REPLACE(*VER)
  • Do what the user default says - REPLACE(*DFT)—which will be either *YES or *VER

This chart shows the relation between versioning type, object type, and versioning commands/processes.

 

ViewPoint Objects
These commands/processes can cre ate or modify ViewPoint objects.

Stream file Objects
These commands can create PC files on the IFS.

Explicit Versioning Commands that use the REPLACE(*VER/*DFT) parameter to version an object when saved.

  • CRTVIEW
  • CRTSCRIPT
  • EXECUTE
  • EXECUTEVPT
  • REPORT
  • REPORTVPT

Implied Versioning Commands or ViewPoint processes that create versioned objects only if the user’s default—Replace Action—is set to *VER.

Green screen ‘Design’ Commands to create/modify:

  • DSNVIEW
  • DSNREPORT
  • DSNSCRIPT (standard and script views)

ViewPoint interface to create/modify:

  • Views
  • Reports
  • Scripts/Script Views

Versioning is not available/supported when creating stream files from ViewPoint.

 

Do the Following to Start Versioning:

  1. The install creates the SEQUELREPO library (where new versions of your ViewPoint objects will be saved) by default. You can use this library, or create your own by issuing the following command:
    CRTLIB LIB(XXXXX)  (where XXXXX is a new library)

    Each user can have his/her own repository for versioned objects.
     
  2. Create a folder in the IFS with the same name as your Repository Library with a command like so:
    MKDIR ‘/SCSERVER10/HISTORY/XXXXX’  (where XXXXX is the Repository Library name)

    This is where new versions of stream files will be saved. Scserver10/History is the required path for all stream file repositories.
     
  3. Change your user defaults to use the new library created above:
    1. Issue the command SETDFT and press enter.
    2. Page up once to see the two settings you will be altering—Repository Library and Replace Action.
    3. Set the Repository Library to the library you created in step 1 (or the default SEQUELREPO library).
    4. Set the Replace Action value to *VER.

      You can also use ViewPoint Administrator to change these user default values. See the ‘Set User Defaults’ chapter in the ViewPointAdministrator User Guide for information on this.

 

To see Host Object versioning in action, try the following:

  1. Perform the three steps in the ‘Do the Following to Start Versioning’ section above to make sure versioning is setup.
  2. Use ViewPoint Explorer to navigate to the SEQUELEX sample library
  3. Right-click on the view CUSTLIST, and select Design.
  4. Make a change to the view like adding a new field, or change the ORDER BY clause.
  5. On the Design menu, select the File\Save option. You should see a message that the view was saved.
  6. Make a different change to same view and save it again.
  7. To see if objects were successfully versioned, use ViewPoint Explorer to navigate to your repository library, or issue the command WRKSEQUEL OBJ(XXXXX/*ALL) where XXXXX is your repository library, and look for versions of the objects you saved.
    The first archived file for a given object will keep the original name. Subsequent versioned file names are made up of the first six characters of the original object name appended to a 4-digit counter (0001 to 9999) like CUSTLI0001 and so on, along with version descriptions.

    You can also issue the following command to see the version info in the SQVRSNUS file on the iSeries:
    DISPLAY SQL(‘SELECT * FROM SCSERVER10/SQVRSNUS’)

 

Note: Due to the way versioned objects are created, you are limited to approximately 9999 versions for an object.

 

To see Stream File versioning in action, try the following:

  1. Perform the three steps in the ‘Do the Following to Start Versioning’ section above to make sure versioning is setup.
     
  2. Issue the following command three times at a command line (once to create a file, and two more times to replace it and create multiple versions):
    EXECUTE VIEW(SEQUELEX/CUSTLIST) TOSTMF(‘/TMP/CUSTLISTLIST.TXT’) REPLACE(*VER)
    (you should see a message that a file was created)
     
  3. To see if the stream file objects were successfully versioned, use Windows Explorer to navigate to \\ISERIES\ROOT\SCSERVER10\HISTORY\XXXXX, where XXXXX is the folder that corresponds to your re- pository library, and look for versions of the objects you saved.

    The first archived file for a given object will keep the original name. Subsequent versioned file names are made up of the first six characters of the original object name appended to a 4-digit counter (0001 to 9999) like CUSTLI0001 and so on, along with version descriptions.

    You can also issue the following command to see the version information in the SQVRSNSTMF file on the iSeries:
    DISPLAY SQL(‘SELECT SQSTMF LEN(50), REPOSTMF LEN(50), SQVRSNTS FROM SCSERVER10/SQVRSNSTMF’)

 

Note: Due to IBM i file naming conventions and limits and the way versioned objects are created, you are limited to approximately 9999 versions for an object.

 

 

 

 


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: November 20, 2018