      PROGRAM FILE_SIZE
      INCLUDE '($FABDEF)'
      INCLUDE '($XABDEF)'
      INCLUDE '($XABFHCDEF)'
      INTEGER*4 STAT
      INTEGER*4 SIZE
      CHARACTER*255 FNM
      RECORD /FABDEF/FABBLK
      STRUCTURE /MYXABDEF/
        UNION
          MAP
            RECORD /XABDEF/XABBLK
          END MAP
          MAP
            RECORD /XABFHCDEF/XABFHCBLK
          END MAP
        END UNION
      END STRUCTURE
      RECORD /MYXABDEF/XAB
      INTEGER*4 SYS$OPEN,SYS$CLOSE
      FNM='Z.DAT'
      FABBLK.FAB$B_BID=FAB$C_BID
      FABBLK.FAB$B_BLN=FAB$C_BLN
      FABBLK.FAB$B_FAC=FAB$M_PUT
      FABBLK.FAB$L_FNA=%LOC(FNM)
      FABBLK.FAB$B_FNS=INDEX(FNM,' ')-1
      FABBLK.FAB$L_XAB=%LOC(XAB)
      XAB.XABBLK.XAB$B_COD=XAB$C_FHC
      XAB.XABBLK.XAB$B_BLN=XAB$C_FHCLEN
      STAT=SYS$OPEN(FABBLK,,)
      WRITE(*,*) 'STAT=',STAT
      SIZE=XAB.XABFHCBLK.XAB$L_EBK
      IF(XAB.XABFHCBLK.XAB$W_FFB.EQ.0) SIZE=SIZE-1
      WRITE(*,*) 'SIZE=',SIZE
      STAT=SYS$CLOSE(FABBLK,,)
      WRITE(*,*) 'STAT=',STAT
      END
