BPX4PTR (ptrace) example

The following code enables a process (PROCID) to be debugged with ptrace. For the callable service, see ptrace (BPX1PTR, BPX4PTR) — Control another process for debugging. For the data structure, see BPXYPTRC — Map parameters for ptrace. AMODE 31 callers use BPX1PTR (ptrace) example.
                                              
*        MVC   PROCID,  Process ID from fork                            
         SPACE ,                                                        
         CALL  BPX4PTR,              Debug another process             +
               (=A(PT_ATTACH),       Input: Request           BPXYPTRC +
               PROCID,               Input: Process ID                 +
               =AD(0),               Input: Address                    +
               =AD(0),               Input: Data                       +
               =AD(0),               Input: Buffer                     +
               RETVAL,               Return value: 0, -1, or Request   +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------