1 | Command string | I/O | Char(*) |
2 | Length of command string | Input | Packed(15,5) |
3 | IGC process control | Input | Char(3) |
The Check Command Syntax (QCMDCHK) API performs syntax checking for a single command, and optionally prompts for the command. The command is not run. If prompting is requested, the command string is returned to the calling program with the updated values as entered through prompting. The QCMDCHK API can be called from an HLL program.
Typical uses of QCMDCHK are:
Notes:
The command you want to check is entered as a character string. If the command contains blanks, it must be enclosed in apostrophes. The maximum length of the character string is 32,702 characters; delimiters (the apostrophes enclosing the string) are not counted as part of the string.
The length of the command string being passed. If the command string is passed as a quoted string, the command length is exactly the length of the quoted string. If the command string is passed in a variable, the command length is the length of the variable.
The IGC process control instructs the system to accept double-byte data. The only value supported is IGC. IGC must be entered using all uppercase letters.
While this API is threadsafe, it should not be used to run a command that is not threadsafe in a job that has multiple threads. Use the Display Command (DSPCMD) command to determine whether a command is threadsafe.
Message ID | Error Message Text |
---|---|
CPF0005 E | Returned command string exceeds variable provided length. |
CPF0006 E | Errors occurred in command. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
xxxnnnn E | Any escape message issued by any command may be returned. The messages listed previously are those issued by this API. Once the API has called the command analyzer, any message issued as an escape message may appear. |
Top | Program and CL Command APIs | APIs by category |