Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Validity Checking Program (VCP) Trouble

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validity Checking Program (VCP) Trouble

    Sorry, but the best thing to do is move the spool file validity checking portion of your code to the Command Processing program (CPP). The VCP was never intended to validate things like spool files and system objects outside of the command parameters. It can only deal with the most basic of parameter validation issues. (ie. If this value is specified in this parameter then this or that value must be specified in this or that parameter, etc., etc.) It's basic premise was to be used to validate parameters that were beyond the functionality provided by the command definition language statements, which is why the VCP is called in PDM.

  • #2
    Validity Checking Program (VCP) Trouble

    I ran in to this, and what I did was re-compile the command without the VCP, created the CL that calls it, then re-compiled the command with the VCP. I usually only write a VCP if I plan to use it for more than one command. I have one for checking an object's existence.

    Comment


    • #3
      Validity Checking Program (VCP) Trouble

      I have written a new command with a validity checking program. The command and VCP work great with one exception. When keying the command in a CL program (via PDM), the VCP edits the command parms and issues error messages. The command processes spool files (see sample below) and one of the edits in the VCP verifies the existence of the spool file. At this point, the spool file does not exist, so I get an error message. The message is not received if using variables but always shows if a literal is used. Any thoughts? PROCSPLF FILE(QSYSPRT) - I receive "Spooled file QSYSPRT not found." PROCSPLF FILE(&FILE) - no message displayed Thanks. Mark Thanks.

      Comment


      • #4
        Validity Checking Program (VCP) Trouble

        I have created a command that uses a validity checking program (VCP) to change the value on one of the parms to an acceptable value. The command runs just fine when I execute it with debug, however, it fails to replace the parm when I run it interactively without using STRISDB. The parm in question is the 4th parm in the command out of a total of 7. Parms 4 through 7 are conditioned using the PMTCTL keyword, which is based on the 3rd parm. The 3rd parm can only have a value of "Y" or "N". If it is "Y", only 5th parm is to appear; if it is "N", then parms 4, 6, and 7 are to appear. I also noticed something unusual when running debug. The validity checking program is run twice before control is passed to the command processing program (CPP). I am to the point where I may need to abandon the command and replace it with new code, but I would very much like to know what is causing the issue, as I would like to use the concept in the future as well. Any suggestions would be greatly appreciated. I am including the command code and the compilation command.
        Code

        Comment

        Working...
        X