HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

COMMAND

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Programmatically executes a command.

Syntax

           CA        I16       I16

   COMMAND(cmdimage,cmderror,parmnum);

Parameters

cmdimage

character array (required)

Passes an ASCII string of <=279 characters consisting of a command and parameters, terminated by a carriage return. The carriage return character (%15) must be the last character of the command string. Do not include a prompt character in this string.

cmderror

16-bit signed integer by reference (required)

Returns any error code set by the command:

  • If cmderror is zero, no error occurred.

  • If cmderror is negative, a warning was detected.

This the same error that would be returned by the command interpreter if cmdimage were executed interactively or in batch. The error message can be found in message set two of CATALOG.PUB.SYS.

NOTE: When the CI displays multiple errors for a single command, cmderror contains only the last error number displayed.Remote commands executed through the COMMAND or HPCICOMMAND intrinsics may not return a meaningful error status.
parmnum

16-bit signed integer by reference (required)

Returns a number indicating the error:

  • If parmnum is positive, it is a file system error number and cmderror is non-zero.

  • If parmnum is negative, it is the column number where the error occurred and cmderror is non-zero. (The command interpreter (CI) prints a caret there.)

  • If parmnum is zero, then no additional error-related data is available.

NOTE: The cmderror is the correct parameter to check to verify if cmdimage succeeded. The parmnum may provide additional information.

Operation Notes

User-defined commands (UDCs) cannot be executed with the COMMAND intrinsic. RUN and other process creation commands are allowed if you, or the program calling COMMAND, have process handling (PH) capability. Command files and the implied RUN are not allowed.

The cmdimage parameter can contain any command except the following:

   ABORT           JOB           

   BYE             LISTREDO    

   CHGROUP         MOUNT           

   DATA            MRJE         

   DISMOUNT        NRJE             

   DO              REDO       

   EOD             RESUME      

   EOJ             RJE         

   EXIT            SETCATALOG   

   HELLO           VSUSER        
NOTE: CIERROR 9103 is returned if cmdimage contains a command that is not supported.

For compatibility with MPE V/E, the COMMAND intrinsic converts three error numbers into CIERROR 975. They are: 9086, 9090, and 9091.

Condition Codes

CCE (2)

Request granted. Although, a CI warning may have been detected.

CCG (0)

Request denied. An executor-dependent error, such as an erroneous parameter, prevented execution of the command. The numeric error code is contained in cmderror. The command with the error terminated before executing completely.

CCL (1)

Request denied. The command was undefined.

Related Information

Intrinsics

HPCICOMMAND

Commands

None

Manuals

Command Interpreter Access and Variables Programmer's Guide (32650-90011) and MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-90003 and 32650-90364)

Feedback to webmaster