BPX4UNA (uname) example

The following code obtains information about the system on which the invoker is running. For the callable service, see uname (BPX1UNA, BPX4UNA) — Obtain the name of the current operating system. For the data structure, see BPXYUTSN — Map the response structure for uname. AMODE 31 callers use BPX1UNA (uname) example.
                                              
         LA    R15,UTSN                                                 
         STG   R15,UTSNA                                                
         SPACE ,                                                        
         CALL  BPX4UNA,              Identify system                   +
               (UTSNL,               Input: Length of required buffer  +
               UTSNA,                Output: ->UTSN           BPXYUTSN +
               RETVAL,               Return value: -1 or >-1           +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------