The following example is a sample subcommand handler definition.
Sample definition of a subcommand handler
ULONG command_handler( PRXSTRING Command, /* Command string from REXX */ PUSHORT Flags, /* Returned Error/Failure flags */ PRXSTRING Retstr); /* Returned RC string */
Command
Command is a null-terminated RXSTRING containing the issued command.
RXSUBCOM_OK
If the subcommand handler sets Flags to RXSUBCOM_ERROR, the REXX interpreter raises an ERROR condition if SIGNAL ON ERROR or CALL ON ERROR traps have been created. If TRACE ERRORS has been issued, REXX traces the command when the subcommand handler returns.
If the subcommand handler sets Flags to RXSUBCOM_FAILURE, the REXX interpreter raises a FAILURE condition if SIGNAL ON FAILURE or CALL ON FAILURE traps have been created. If TRACE FAILURES has been issued, REXX traces the command when the subcommand handler returns.