BPX1SF (send_file) example

The following code create a parameter list to send the contents of the specified file to the designated socket. to 1. For the callable service, see send_file (BPX1SF, BPX4SF) — Send a file on a socket. AMODE 64 callers use BPX4SF (send_file) example.
                                              
         LA    R5,BUFFERA                                               
         ST    R5,BUFA                                                  
         USING SFPL,R5                                                  
         XC    SFPL(SFPL#LENGTH),SFPL  Initialize to nulls (required)   
* NULLS= no header, no trailer, start at offset 0                       
*        MVC   SFFileDes,...                    Read from file          
*        MVC   SFSocketDes,...                  Write to Socket         
         MVC   SFFileBytesH,=XL4'FFFFFFFF'      To file end             
         MVC   SFFileBytesL,=XL4'FFFFFFFF'      To file end             
         OI    SFflagByte4,SF_Close   Close socket after write          
         SPACE ,                                                        
         CALL  BPX1SF,               Send_file                         +
               (=A(SFPL#LENGTH),     Input: Length of BPXYSFPL         +
               BUFA,                 Input: ->SFPL                     +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------