BPX1IOC (w_ioctl) example

The following code conveys a command to the standard output device. To run properly this example needs a command defined by the user for the COMMAND parameter. This command must be understood by the device driver providing support for the output device. For the callable service, see w_ioctl (BPX1IOC, BPX4IOC) — Control I/O. AMODE 64 callers use BPX4IOC (w_ioctl) example.
                                              
         MVC   BUFLENA,=F'1024'                                         
         MVC   COMMAND,=F'123'       User defined command               
         SPACE ,                                                        
         CALL  BPX1IOC,              I/O Control                       +
               (=A(STDOUT_FILENO),   Input: File descriptor            +
               COMMAND,              Input: Command                    +
               BUFLENA,              Input: Argument length            +
               BUFFERA,              Argument buffer name              +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------