Manage Learn to apply best practices and optimize your operations.

Modify the CHGJOB command

I would like to modify the CHGJOB command to validate the user before allowing certain changes to jobs. I tried a VALCKR program (MODJOB) but I have not been able to find the parms required by that command and keep getting the following error message:

Message ID . . . .
. . :   CPD0162       Severity . . . . . . . :   30
 Message type . . . . . :   Diagnostic
 Date sent  . . . . . . :   02/20/03      Time sent  . . . . . . :

 Message . . . . :   Parameters do not match those in program MODJOB in

Is there a way to determine the parms, their definitions, and the required order for the CHGJOB command?

You have a couple of options to check things out before the CHGJOB command runs. You can write a parameter validation program (VLDPGM) for the CHGJOB command. The parameters passed to the program are the same as are passed to the CPP and those are documented in the CL Reference manual, which is available at the iSeries info center on the Web.

The other option is to write a command exit program. There are two command exits. One, QIBM_QCA_RTV_COMMAND, allows you to view the command string before it is executed. The other,QIBM_QCA_CHG_COMMAND allows you to change the command string before it is executed. Unfortunately, this one has some limitations. If the user library qualifies the name of the command, e.g., QSYS/CHGJOB, the command exit program will be called but you will only be able to see, not change the command string. If the user does not library qualify the call, e.g., runs *LIBL/CHGJOB or just CHGJOB, then you can change the command string. The exit point formats are again documented in the InfoCenter.


The Best Web Links: Tips, tutorials and more.

Search400.com's targeted search engine: Get relevant information on security.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Read this Search400.com Featured Topic: Secure your iSeries

Dig Deeper on iSeries physical security