c
c
      subroutine dattim
c
c	PROG NAME:			DATTIM.rat
c
c	DATE OF FIRST VERSION:          25-Sep-78
c	DATE OF CURRENT VERSION:        21-Jun-83
c
c	PURPOSE:	Writes file name, current date and time
c			at bottom of plot
c
c	USAGE:	 	call dattim
c
c	PROGRAMMER:	M. Collins / E. Javel / M. Prucka
c
c*********************************************************************
c
c
c	Common block for PLT parameters
c
      real*8prmnam,txtnam,keywrd
      bytexlabel,ylabel,rlabel,xfmt,yfmt,rfmt,msg,filonm(14)
      bytefilinm(40)
      logical*1dataon,pltfnd,msgflg,finflg,modflg,conton,axflg,newpag,
     & ecflg,typerr,dbflg
c
      common /params/xmin,xmax,xint,xcycle,xpct,xlen,xllc,ymin,ymax,
     & yint,ycycle,ypct,ylen,yllc,rmin,rmax,rint,rcycle,rpct,pltype,
     & typlin,pltlin,symnum,sizsym,solid,sizann,wtlnan,xanlab,yanlab,
     & ranlab,yhor,grid,sizlab,wtlnlb,ticmrk,shade,echo,wtlnax,openax,
     & sizmsg,wtlnms,xmsg,ymsg,angmsg,datmsg,sizfac,smooth,header,sort,
     & unused(1)
      common /flags/dataon,pltfnd,msgflg,finflg,modflg,conton,axflg,
     & newpag,ecflg,typerr,dbflg
      common /names/prmnam(50),txtnam(6),keywrd(25),filinm,filonm
      common /text/xlabel(52),ylabel(52),rlabel(52),xfmt(6),yfmt(6),
     & rfmt(6),msg(256)
      common /misc/ifrom,ito,inow,ipage,model,lunin,lunout
c
      common /axes/rxmin,rxmax,rymin,rymax,rxlen,rylen,rxllc,ryllc,
     & pxmin,pxmax,pymin,pymax,pxlen,pylen,pxllc,pyllc
      common /size/tiklen,hitann,hitlab,hitsym,hitmsg,iaxlnw,igrlnw,
     & ianlnw,ilblnw,ipllnw,imslnw,avgaxl
      common /msks/ msk1,msk2,msk3,msk4,msk5
      integerhdrlwt
      bytebpag(10),namdat(80),logo(10)
      external len
      datahdrlwt/1/,bpag/'P','a','g','e',5*' ',0/
c
c---------------------------------------------------------------------
c
      call newpen(1)
c Install logo
      call scopy('|16|',logo)
c Install BTNI,date and time
      call scopy('BTNI   ',namdat)
      call date(namdat(1+len(namdat)))
      call scopy('   ',namdat(1+len(namdat)))
      call time(namdat(1+len(namdat)))
c Install file name
      call scopy('    ',namdat(1+len(namdat)))
      call scopy(filinm,namdat(1+len(namdat)))
c Install current page number
      i=itoc(inow,bpag(6),5)
c Plot this stuff at the bottom of the page
      call newpen(hdrlwt)
      call text(0.1,0.05,0.24,logo,0.,len(logo))
      call text(0.4,0.05,0.08,namdat,0.,len(namdat))
      call text(9.5,0.05,0.08,bpag,0.,len(bpag))
      return
      end
