      subroutine pcdat (systim,time$,date$)                             PCDA001
c -----------------------------------------------------                 PCDA002
c     returns datestring, timestring, system time (sec)                 PCDA003
c     generic XLIB (C) version                                          PCDA004
c -----------------------------------------------------                 PCDA005
      character time$*8,date$*11                                        PCDA006
      integer*2 ihr,imin,isec,ihun,iyr,imon,iday                        PCDA007
                                                                        PCDA008
c --- compute seconds --                                                PCDA009
      call gettim(ihr,imin,isec,ihun)                                   PCDA010
      systim=(100*(ihr*3600+60*imin+isec)+ihun)/100.0                   PCDA011
                                                                        PCDA012
c --- create timestring ---                                             PCDA013
      if (imin.ge.10.and.isec.lt.10) then                               PCDA014
         write(time$,'(i2,a1,i2,a2,i1)') ihr,':',imin,':0',isec         PCDA015
      else if (imin.ge.10.and.isec.ge.10) then                          PCDA016
         write(time$,'(i2,a1,i2,a1,i2)') ihr,':',imin,':',isec          PCDA017
      else if (imin.lt.10.and.isec.ge.10) then                          PCDA018
         write(time$,'(i2,a2,i1,a1,i2)') ihr,':0',imin,':',isec         PCDA019
      else if (imin.lt.10.and.isec.lt.10) then                          PCDA020
         write(time$,'(i2,a2,i1,a2,i1)') ihr,':0',imin,':0',isec        PCDA021
      end if                                                            PCDA022
c      write(*,*) ' Time is ' , time$                                   PCDA023
                                                                        PCDA024
c --- create datestring ---                                             PCDA025
      call getdat(iyr,imon,iday)                                        PCDA026
      if (iday.ge.10.and.imon.lt.10) then                               PCDA027
         write(date$,'(a1,i1,a1,i2,a1,i4)') '0',imon,'/',iday,'/',iyr   PCDA028
      else if (iday.ge.10.and.imon.ge.10) then                          PCDA029
         write(date$,'(i2,a1,i2,a1,i4)') imon,'/',iday,'/',iyr          PCDA030
      else if (iday.lt.10.and.imon.ge.10) then                          PCDA031
         write(date$,'(i2,a2,i1,a1,i4)') imon,'/0',iday,'/',iyr         PCDA032
      else if (iday.lt.10.and.imon.lt.10) then                          PCDA033
         write(date$,'(a1,i1,a2,i1,a1,i4)') '0',imon,'/0',iday,'/',iyr  PCDA034
      end if                                                            PCDA035
c      write(*,*) ' Date is ' , date$                                   PCDA036
      return                                                            PCDA037
      end                                                               PCDA038
