TAA Tools
CHKCMD          CHECK COMMAND                          TAACMEX

The  Check Command  command  provides  the  functions of  QCMDCHK  with
additional  options provided  by  the QCAPCMD  API.   This  includes 1)
Prompting  for  the  command  on missing  required  parameters  or some
invalid entries  and 2)  Limited user  checking.   The  command is  not
run, but  can be useful when  attempting to simulate a  command line on
a menu.

The  return   parameter  includes  the  command  as  it  would  be  run
including keywords.

A typical command would be:

             DCL       &RTNCMD *CHAR LEN(5000)
              .
             CHKCMD    CMD(SNDMSG TOUSR(xxx)) RTNCMD(&RTNCMD)

Because the  SNDMSG command  requires the  MSG  parameter, the  command
prompt  would  appear  with  text describing  the  fact  that  the  MSG
parameter  is required.   This  is  as opposed  to QCMDCHK  which would
fail and send an escape message.

The command  does  not  run, but  the  command  that would  be  run  is
returned (including keywords) in the RTNCMD parameter.

It is valid to use selective prompting when entering the command.

You may run the command  which is returned by using QCMDEXC  or the TAA
RUNMNUCMD command.

CHKCMD escape messages you can monitor for
-------------------------------------------

      CPF6801    Command was cancelled

Escape messages from based on functions will be re-sent.

Command parameters                                    *CMD
------------------

   CMD           The command  to be syntax  checked.  Up  to 5000 bytes
                 may be entered.

   CMDLINE       Whether  to  check  the  command as  if  on  a command
                 line.   *YES  is  the default  to  operate as  if  the
                 command  would be  entered on  a command  line.   This
                 means  that 1) Limited user  checking is performed and
                 2) Prompting for missing  required parameters or  some
                 invalid parameters occurs.

                 For an  understanding of  the 'Limited  user checking'
                 function,  see the CRTUSRPRF  command LMTCPB parameter
                 and the CRTCMD command ALWLMTUSR parameter.

                 *NO may  be specified  to operate  as if  QCMDCHK  was
                 called.

   SRCTYPE       The type of  source entered.   *CLP is the  default to
                 use system syntax checking.

                 *CLP38  may entered  to  use the  syntax  checking for
                 S/38.

   RTNCMD        The  optional  return command  string  after prompting
                 has been completed.   If  declared, the variable  must
                 be specified as *CHAR LEN(5000).

Restrictions
------------

Because the  command returns a  variable, it may  only be used in  a CL
program.

Prerequisites
-------------

The following TAA Tools must be on your system:

     RSNLSTMSG       Resend last message
     SNDESCINF       Send escape information

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   CHKCMD        *CMD                   TAACMEX       QATTCMD
   TAACMEXC      *PGM       CLP         TAACMEXC      QATTCL
					

Added to TAA Productivity tools September 1, 2004


Home Page Up to Top