
                               					20-May-1983 10:28:06	VAX-11 FORTRAN V3.2-37              Page   1
								13-Dec-1982 18:40:41	CAD$VOLSET:[GARY.STATS.SOURCE]KEY2DATE.FOR;9

0001    !
0002    !			  COPYRIGHT (c) 1982 BY
0003    !	      MOSTEK CORPORATION, CARROLLTON TX
0004    !
0005    ! This software is furnished under a license and may be used and  copied
0006    ! only  in  accordance  with  the  terms  of  such  license and with the
0007    ! inclusion of the above copyright notice.  This software or  any  other
0008    ! copies  thereof may not be provided or otherwise made available to any
0009    ! other person.  No title to and ownership of  the  software  is  hereby
0010    ! transferred.
0011    !
0012    ! The information in this software is subject to change  without  notice
0013    ! and  should  not  be  construed  as  a commitment by MOSTEK
0014    ! CORPORATION.
0015    !
0016    ! MOSTEK assumes no responsibility for the use or  reliability  of  its
0017    ! software on equipment which is not supplied by MOSTEK.
0018    !
0019     
0020    !++
0021    ! FACILITY:
0022    !   MOSTEK CORPORATION
0023    !
0024    ! ABSTRACT: Turn a character representation of the system representation
0025    !           of the time into human readable form
0026    !   
0027    !
0028    ! ENVIRONMENT: VAX VMS unpriv
0029    !   
0030    !
0031    ! AUTHOR:Gary Smith , CREATION DATE: 9/8/1982
0032    !
0033    ! MODIFIED BY:
0034    !
0035    !--
0036    !
0037    ! TABLE OF CONTENTS:
0038    !
0039    !
0040    ! INCLUDE FILES: none
0041    !
0042    !
0043    ! MACROS: none
0044    !
0045    !
0046    ! EQUATED SYMBOLS: none
0047    !
0048    !
0049    ! EXTERNAL REFERENCES: SYS$ASCTIM
0050    !
0051     
0052    !++
0053    ! FUNCTIONAL DESCRIPTION: KEY_TO_DATE turns a character representation of the
0054    !                         system time into a human readable time of day
0055    !
0056    !
0057    !

                               					20-May-1983 10:28:06	VAX-11 FORTRAN V3.2-37              Page   2
								13-Dec-1982 18:40:41	CAD$VOLSET:[GARY.STATS.SOURCE]KEY2DATE.FOR;9

0058    ! FORMAL PARAMETERS: key_time -> the time to be converted
0059    !
0060    !
0061    !
0062    ! IMPLICIT INPUTS: none
0063    !
0064    !
0065    !
0066    ! IMPLICIT OUTPUTS: the day date and time in system format
0067    !
0068    !
0069    !
0070    ! ROUTINE VALUE and
0071    ! COMPLETION CODES: none
0072    !
0073    !
0074    !
0075    ! SIDE EFFECTS: none to date
0076    !
0077    !
0078    !
0079    !--
0080              CHARACTER * 23 FUNCTION key_to_date( key_time )
0081     
0082              character * 23 asc_tim
0083              character * 16 key_time
0084     
0085              integer  time(2)
0086              integer  temp, status
0087     
0088              integer  SYS$ASCTIM
0089     
0090              external SYS$ASCTIM
0091     
0092    !++
0093    ! turn the time in chars into binary
0094    !--
0095     
0096              decode( 16, 100, key_time, err=999 ) time
0097    100       format( 2Z8 )
0098     
0099    !++
0100    ! put into funny DEC format
0101    !--
0102              temp = time(2)
0103              time(2) = time(1)
0104              time(1) = temp
0105     
0106    !++
0107    ! make the change
0108    !--
0109              status = SYS$ASCTIM( , asc_tim, time,  )
0110     
0111              key_to_date = asc_tim
0112     
0113              return 
0114     

KEY_TO_DATE                    					20-May-1983 10:28:06	VAX-11 FORTRAN V3.2-37              Page   3
								13-Dec-1982 18:40:41	CAD$VOLSET:[GARY.STATS.SOURCE]KEY2DATE.FOR;9

0115    !++
0116    ! input time was not capable of being converted, make blank
0117    !--
0118     
0119    999       continue
0120     
0121              key_to_date = ' '
0122              return
0123              end




PROGRAM SECTIONS

    Name				 Bytes   Attributes

  0 $CODE                                  106   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG
  1 $PDATA                                   5   PIC CON REL LCL   SHR NOEXE   RD NOWRT LONG
  2 $LOCAL                                 116   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG

    Total Space Allocated                  227


ENTRY POINTS

    Address  Type  Name                      References

  0-00000000  CHAR KEY_TO_DATE                  80       111=      121=    


VARIABLES

    Address  Type  Name          Attributes  References

  2-00000008  CHAR ASC_TIM                      82       109A      111     
 AP-00000008@ CHAR KEY_TIME                     80        83        96     
  2-00000024  I*4  STATUS                       86       109=    
  2-00000020  I*4  TEMP                         86       102=      104     


ARRAYS

    Address  Type  Name          Attributes        Bytes  Dimensions       References

  2-00000000  I*4  TIME                               8  (2)                  85        96=      102       103(2)=   104=    
									     109A    


LABELS

    Address   Label                          References

  1-00000000  100'                              96        97#    
  0-00000062  999                               96       119#    

KEY_TO_DATE                    					20-May-1983 10:28:06	VAX-11 FORTRAN V3.2-37              Page   4
								13-Dec-1982 18:40:41	CAD$VOLSET:[GARY.STATS.SOURCE]KEY2DATE.FOR;9

FUNCTIONS AND SUBROUTINES REFERENCED

  Type  Name                                 References

   I*4  SYS$ASCTIM                              88        90       109     


  +----------------------------------------------+
  |           KEY TO REFERENCE FLAGS             |
  |   =   - Value Modified                       |
  |   #   - Defining Reference                   |
  |   A   - Actual Argument, possibly modified   |
  |   D   - Data Initialization                  |
  |  (n)  - Number of occurrences on line        |
  +----------------------------------------------+



COMMAND QUALIFIERS

  FORTRAN /DEBUG/OBJECT=OBJ:KEY2DATE/LIST=LIS:KEY2DATE/CONT=99/CROSS/NOOPT SRC:KEY2DATE

  /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW)
  /DEBUG=(SYMBOLS,TRACEBACK)
  /STANDARD=(NOSYNTAX,NOSOURCE_FORM)
  /SHOW=(NOPREPROCESSOR,NOINCLUDE,MAP)
  /F77  /NOG_FLOATING  /I4  /NOOPTIMIZE  /WARNINGS  /NOD_LINES  /CROSS_REFERENCE  /NOMACHINE_CODE  /CONTINUATIONS=99


COMPILATION STATISTICS

  Run Time:           0.95 seconds
  Elapsed Time:       2.86 seconds
  Page Faults:        360
  Dynamic Memory:     805 pages
