BPX1RFM (recvfrom) example

The following code issues a recv from a socket. SOCKDESC was returned from a previous call, either BPX1SOC or BPX1ACP. For the callable service, see recvfrom (BPX1RFM, BPX4RFM) — Receive data from a socket and store it in a buffer. For the data structures, see BPXYSOCK — Map SOCKADDR structure and constants and BPXYMSGF — Map the message flags. AMODE 64 callers use BPX4RFM (recvfrom) example.
                                              
         SPACE ,                                                        
         MVC   MSG_FLAGS4,MSG_PEEK                                      
         CALL  BPX1RFM,              Read from a socket                +
               (SOCKDESC,            Input: Socket Descriptor          +
               =A(L'BUFFERA),        Input: Length of the input buffer +
               BUFFERA,              Input: Address of the input buffer+
               PRIMARYALET,          Input: Alet of the input buffer   +
               MSG_FLAGS,            Input: Flags                      +
               =A(L'SOCKADDR),       Input: Length of the socket addr  +
               SOCKADDR,             Input: The socket address         +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------