BPX4GAI (getaddrinfo) example

The following code returns the IP address and other associated information for the specified node name. For the callable service, see getaddrinfo (BPX1GAI, BPX4GAI) — Get the IP address and information for a service name or location. AMODE 31 callers use BPX1GAI (getaddrinfo) example.
                                              
         SPACE ,                                                        
         CALL  BPX4GAI,              Get Addr_info                     +
               (NODE_NAME,           Input: Name of Host being queried +
               NODE_NAME_LENGTH,     Input: Length of host name        +
               SERVICE_NAME,         Input: Service name being queried +
               SERVICE_NAME_LENGTH,  Input: Length of service name     +
               HINTS_PTR,            Input: Ptr to Addr_Info Structure +
               RESULTS_PTR,          Output:Ptr to Addr_Info Structure +
               CANONICAL_LENGTH,     Output: Length canonical name     +
               RETVAL,               Return code                       +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------