      subroutine hec_offline
c
c offline mode of hec_adc
c
      implicit none
c
c user datacard values common
c
      include'hec_par.inc'      !shared parameters
      include'hec_datacard.inc' !datacard values
c
c offline initialization
c
      call hec_offline_ini
c
c call system packages main routine
c
      call hec_packages
c
c user global initialization
c
      call user_ini
c
c pass 1 over data set for user
c
      if (n_pass .ge. 1) call hec_pass1
c
c pass 2 over data set for user
c
      if (n_pass .ge. 2) call hec_pass2
c
c pass 3 over data set for user
c
      if (n_pass .ge. 3) call hec_pass3
c
c user termination
c
      call user_ter
c
c offline termination
c
      call hec_offline_ter
c
      end
