BPX1GMN (w_getmntent) example

The following code gets the mount entries for the caller. For the callable service, see w_getmntent (BPX1GMN, BPX4GMN) — Get information on mounted file systems. For the data structure, see BPXYMNTE — Map response and element structure of w_getmntent. AMODE 64 callers use BPX4GMN (w_getmntent) example.

If BPXYMNTE is assembled with MNTE2=YES, fields MNTEHID and MNTEHBLEN must be initialized.
                                              
         LA    R14,MNTEH             R14->MNTEH and MNTE                
         L     R15,MNTEL             R15 = Length of MNTEH and MNTE     
         XR    R0,R0                 Dummy 2nd operand                  
         XR    R1,R1                 Pad=null, length=0                 
         MVCL  R14,R0                Null out MNTEH and MNTE            
         MVC   MNTEHID,=CL4'MNT2'          Version indicator            
         MVC   MNTEHBLEN,=A(MNTE#LENGTH)   Length of MNTE               
         CALL  BPX1GMN,              Get mount entries                 +
               (MNTEL,               Input: Length BPXYMNTE + MNTEH    +
               MNTEH,                Header in BPXYMNTH                +
               RETVAL,               Return value: -1 or mount entries +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------