CFPRIME DATEXX                                                          DATEXX      1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*        Extended Transient-Midterm Stability Program (ETMSP)         *RIGHTE      3
C*        ====================================================         *RIGHTE      4
C*                                                                     *RIGHTE      5
C*       Copyright (C) (1993) Electric Power Research Institute        *RIGHTE      6
C*                                                                     *RIGHTE      7
C* EPRI reserves all rights in the software and associated             *RIGHTE      8
C* documentation as delivered. The software and its associated         *RIGHTE      9
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     10
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     11
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     12
C* of any changes or modifications to the software within two (2)      *RIGHTE     13
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     14
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     15
C* new designation sufficiently different from its then current        *RIGHTE     16
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     17
C* the current software as changed or modified.                        *RIGHTE     18
C*                                                                     *RIGHTE     19
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     20
C* directly from EPRI.                                                 *RIGHTE     21
C*                                                                     *RIGHTE     22
C* This program and supporting materials may be independently available*RIGHTE     23
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     24
C* distribution fee. The EPSC is a service of                          *RIGHTE     25
C*                                                                     *RIGHTE     26
C*                    Power Computing Company                          *RIGHTE     27
C*                    1930 Hi Line                                     *RIGHTE     28
C*                    Dallas, Tx 75207                                 *RIGHTE     29
C*                                                                     *RIGHTE     30
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     31
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     32
C*                                                                     *RIGHTE     33
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     34
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     35
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     36
C*    DOCUMENTATION; OR                                                *RIGHTE     37
C*                                                                     *RIGHTE     38
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     39
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     40
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     41
C*                                                                     *RIGHTE     42
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     43
C* THEREOF.                                                            *RIGHTE     44
C*                                                                     *RIGHTE     45
C***********************************************************************RIGHTE     46
*IF DWSUN                                                               DATEXX      3
*ENDIF                                                                  DATEXX     12
*IF DWVAX                                                               DATEXX     13
*ENDIF                                                                  DATEXX     19
*IF DMVAX                                                               DATEXX     20
*ENDIF                                                                  DATEXX     42
*IF DPRIME                                                              DATEXX     43
*ENDIF                                                                  DATEXX     52
*IF DMIBM                                                               DATEXX     53
*ENDIF                                                                  DATEXX     67
*IF DWIBM                                                               DATEXX     68
      SUBROUTINE DATEXX (VDATE)                                         DATEXX     69
      CHARACTER*9 VDATE                                                 DATEXX     70
      CHARACTER*3 MON(12)                                               DATEXX     71
      MON(1)='Jan'                                                      DATEXX     72
      MON(2)='Feb'                                                      DATEXX     73
      MON(3)='Mar'                                                      DATEXX     74
      MON(4)='Apr'                                                      DATEXX     75
      MON(5)='May'                                                      DATEXX     76
      MON(6)='Jun'                                                      DATEXX     77
      MON(7)='Jul'                                                      DATEXX     78
      MON(8)='Aug'                                                      DATEXX     79
      MON(9)='Sep'                                                      DATEXX     80
      MON(10)='Oct'                                                     DATEXX     81
      MON(11)='Nov'                                                     DATEXX     82
      MON(12)='Dec'                                                     DATEXX     83
      CALL DATE(IMON,IDAY,IYR,ISEC,IMIN,IHR)                            DATEXX     84
      WRITE(VDATE,100) MON(IMON),IDAY,IYR                               DATEXX     85
 100  FORMAT(A3,I3,1X,I2)                                               DATEXX     86
      RETURN                                                            DATEXX     87
      END                                                               DATEXX     88
      SUBROUTINE DATE(IMON,IDAY,IYR,ISEC,IMIN,IHR)                      DATEXX     89
C                                                                       DATEXX     90
C The following are XLF subroutines which will get date and time, CPU   DATEXX     91
C times, and allocate memory (the subroutines TIME, LOCALTIME, TIMES, anDATEXX     92
C MALLOC are in the c library - use cc rather than ld to link):         DATEXX     93
C                                                                       DATEXX     94
*                                                                       DATEXX     95
*     GETS DATE AND TIME                                                DATEXX     96
*                                                                       DATEXX     97
*     IT(1)-IT(3) : SECONDS (0-59), MINUTES (0-59), HOURS (0-23)        DATEXX     98
*     IT(4)-IT(6) : DAY OF MONTH (1-31), MONTH (0-11), YEAR-1900        DATEXX     99
*     IT(7)-IT(8) : DAY OF WEEK (0-6), DAY OF YEAR (0-365)              DATEXX    100
*     IT(9)       : DST INDICATOR (NON ZERO IF DAYLIGHT SAVINGS)        DATEXX    101
*                                                                       DATEXX    102
      INTEGER*4 IT(9)                                                   DATEXX    103
      IRET=TIME(ICLOCK)                                                 DATEXX    104
      CALL MOVEDT(%VAL(LOCALTIME(ICLOCK)),IT)                           DATEXX    105
      IMON=IT(5)+1                                                      DATEXX    106
      IDAY=IT(4)                                                        DATEXX    107
      IYR=IT(6)                                                         DATEXX    108
      ISEC=IT(1)                                                        DATEXX    109
      IMIN=IT(2)                                                        DATEXX    110
      IHR=IT(3)                                                         DATEXX    111
      RETURN                                                            DATEXX    112
      END                                                               DATEXX    113
      SUBROUTINE MOVEDT(X,Y)                                            DATEXX    114
      CHARACTER*36 X,Y                                                  DATEXX    115
      Y=X                                                               DATEXX    116
      RETURN                                                            DATEXX    117
      END                                                               DATEXX    118
*ENDIF                                                                  DATEXX    119
*IF DAPOLO                                                              DATEXX    120
*ENDIF                                                                  DATEXX    143
*IF DMSDOS                                                              DATEXX    144
*ENDIF                                                                  DATEXX    166
