BPX4DEL (deleteHFS) example

The program ictasma located at ict/bin is loaded into storage using BPX4LOD, branched to and then deleted from storage using BPX4DEL. For the callable service, see deletehfs (BPX1DEL, BPX4DEL) — Delete a program from storage. AMODE 31 callers use BPX1DEL (deleteHFS) example.
                                              
         MVC   BUFLENA,=F'16'                                           
         MVC   BUFFERA(16),=C'/ict/bin/ictasma'                         
         MVC   OPTIONS,=A(0)                                            
         MVC   LIBPTHLN,=A(0)                                           
         SPACE ,                                                        
         CALL  BPX4LOD,              Load Program                      +
               (BUFLENA,             Input: Pathname length            +
               BUFFERA,              Input: Pathname                   +
               OPTIONS,              Input: Options                    +
               LIBPTHLN,             Input: Library Path Length        +
               LIBPATH,              Input: Library Path               +
               EPADDR,               Entry Point address               +
               RETVAL,               Return value                      +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ---------------------------------- 
         L     R15,RETVAL            Load return value                  
         C     R15,=F'-1'            Test for -1 return                 
         BE    PSEUDO                Branch on error                    
         SPACE ,                                                        
         LG    R15,EPADDR                                               
         BASSM  R14,R15               Branch to loaded program          
         SPACE ,                                                        
         CALL  BPX4DEL,              Delete program                    +
               (EPADDR,              Input: Entry point address        +
               RETVAL,               Return value: -1 or 0             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------