.TITLE CDATAD .IDENT /V01/ .ENABLE LC ; ; This module forms part of the suite of Date Routines returning the ; current date in one of the following forms, or converting one form to ; another. ; Form I - Day, Month & Year since 1950 as 3 byte values ; Form A - ASCII DD-MMM-YY ; Form D - Integer*2 days since 1st January 1950 ; Form E - Integer*2 encoded date ; Form W - Weekday Number (0 = Sunday) ; ; Author: V01 30-Jun-80 Phil Stephensen-Payne ; ; Calling Sequence: ; ; This subroutine is called via the standard FORTRAN calling sequence as: ; ; CALL CDATAD (DATE,DAYNO [,STATUS]) ; or ; STATUS = CDATAD (DATE,DAYNO) ; or ; CALL CDATAD from MACRO-11 (with R5=0) ; ; Where: ; DAYNO = Number of days since 1/1/50 (1/1/50 = 1) ; (R1 for MACRO calls) ; DATE = ASCII date in form DD-MMM-YY ; (address in R1 for input,R4 for output for MACRO calls) ; STATUS = Optional error return ; ; Errors returned: ; ; STATUS = 0 if the operation was successful ; = -1 if a parameter error was detected ; = -2 if an invalid input date was specified ; ; External references: ; ; This module calls the subroutines PRMCHK,GETA,PUTD,CDATAI,CDATID ; ; ; CDATAD:: CALL DISP ; Call the dispatcher .WORD GETA ; Get Type A .WORD CDATAI ; Convert to Type I .WORD CDATID ; Convert that to Type D .WORD PUTD ; And store D .END