!------------------------------------------------------------------------------
!  ALAD_INIT_Z -- INITIALIZE ALADDIN SYSTEM TO ACCESS NAMED FILE
!
SUBROUTINE ALAD_INIT_Z(LUNALAD,FILALAD,IER)
!
!  INPUT LUNALAD = LUN TO USE FOR FILE I/O
!        FILALAD = NAME OF FILE CONTAINING DATA IN ALADDIN FORMAT
!
!============
! idecl:  explicitize implicit INTEGER declarations:
  use alpcom_mod
  use alcom_mod
  IMPLICIT NONE
  INTEGER ier,lunalad,ioperr
!============
  CHARACTER*(*) FILALAD
!
! OUTPUT IER = COMPLETION CODE, 0= NORMAL
!
!------------------------------------------------------------------------------
!  DMC JUNE 1990
!    SEE SOURCE:ALADDIN.FOR -- COPY OF ALADDIN INTERACTIVE INTERFACE
!  FROM ORNL ATOMIC DATA CENTER (R. PHANEUF ET AL) FEB 1990
!
!------------------------------------------------------------------------------
!
!     INITIALIZE
!
  LUTIN = 5
  LUTOUT = 6
  LUDF = LUNALAD
  DFNAME = FILALAD
  LUOF = 71
  OFNAME = '**NONE**'
  LUQF = 72
  QFNAME = '**NONE**'
  LUEF = 73
  EFNAME = '**NONE**'
!
  NHSL = 0
  NBASL = 0
  NBNSL = 0
!
!------------------------------------------------------------------------------
!
  IER=0
!
!  CLOSE OLD FILE (IF ANY)
!
  CLOSE(UNIT=LUNALAD,ERR=5)
5 CONTINUE
!
!
  OPEN(UNIT=LUDF, FILE=DFNAME, STATUS='OLD', IOSTAT=IOPERR)
!
  IF(IOPERR .NE. 0) THEN
     WRITE(LUTOUT,&
          '('' ALAD_INIT_Z:  ERROR OPENING INPUT DATA FILE:'')' )
     WRITE(LUTOUT,'(1X,A)') DFNAME
     DFNAME = '**NONE**'
     OK = .FALSE.
     IER=1
     RETURN
  ENDIF
!
  OK = .TRUE.
  LESEQN = 0
  EOF = .FALSE.
!
  RETURN
END SUBROUTINE ALAD_INIT_Z
!
!------------------------------------------------------------------------------
! 30Jun2000 fgtok -s r8_precision.sub "r8con.csh conversion"
