BPX4ITY (isatty) example

The following code determines if the standard output device is a terminal. For the callable service, see isatty (BPX1ITY) (POSIX Version) — Determine whether a file descriptor represents a terminal. AMODE 31 callers use BPX2ITY (isatty) example.
                                              
         CALL  BPX4ITY,              Determine if device is a TTY      +
               (=A(STDOUT_FILENO),   Input: File descriptor            +
               RETVAL,               Return value: 0 isn't, 1 is, -1   +
               RETCODE,              Return code: describes why VAL=-1 +
               RSNCODE),             Reason code: qualifier on RETCODE +
               MF=(E,PLIST)          ---------------------------------- 
         ICM   R15,B'1111',RETVAL    Test RETVAL                        
         BZ    PSEUDO                RETVAL=0 means device not terminal