Previous Topic: Address CommandNext Topic: Automatic Printer Definition


Condition Codes

After each command issued, the RC variable is set to one of the following codes:

In the case of errors when executing a CA Spool command, its return code is set to 0, and error messages are placed on the stack as output from the command.

For example, the following IMOD issues a DF command to subsystem ESF9, determines the number of response lines, pulls the response lines, and prints them on the screen.

/* REXX	                                              */
/* Sample XPSPOOL/ISERVE GREXX exec	                  */
 Address XPSPOOL	        /* Set the host command env */
 XPSPOOL.SUBSYS = 'ESF9'	 /* Set the Subsystenm name  */
 XPSPOOL.NJENODE = ''	 /* Set the NJE node name    */
 'DF'	                     /* List all files           */
 NumRecs = Queued()	       /* Get the number of records*/
 Do i = 1 to NumRecs	       /* Pull each record         */
    Parse Pull Record	/*   off of the queue       */
    Say Record	       /* and print it             */
 End