Assembler language subroutines for FUNU
If your site has coded its own dollar functions that obtain the system date or time, you need to modify these functions to work correctly with the APPDATE clocks. Sir2000 User Language Tools provides four entry points to assist you in this conversion effort.
Three of these entry points (SDATE4, SDATE3, and SDATE) are compatible with entry points provided in Model 204 V4R1 for FUNU (DATE4, DATE3, and DATE). In addition, a fourth entry point, SDATEF, lets you obtain the current date and time using any of the datetime formats described in Datetime formats.)
If a datetime argument error occurs during execution of these subroutines, the error handling performed is controlled by T3 in the case of SDATEF, or by the $Sir_Date_Err or APPDATE DATE_ERR settings. The datetime argument errors that can occur are:
- Invalid format, for SDATEF
- Date out of range, for SDATE3 (if you used APPDATE to set your application clock outside the range 1900-2899)
The subroutines are summarized below:
SDATE4 — Datetime routine for FUNU, with 4-digit year. SDATE3 — Datetime routine for FUNU, with 3-digit year. SDATE — Datetime routine for FUNU, with 2-digit year. SDATEF — Datetime routine for FUNU, format specified by argument. All of the SDATE/3/4/F routines obtain the time based on the current active APPDATE clock. Input T1 — Address of area for result T2 — Address of counted format (SDATEF) T3 — Address of error handling string (SDATEF); values may be: CANCEL — Cancel request IGNORE — Return T4=1 REPORT — Issue error message, return T4=1 OFF — $SIR_DATE_ERR and APPDATE DATE_ERR determine error handling action Returns T4 — Month number (1-12) (SDATE/3/4) T4 — 0: format OK, 1 format bad (SDATEF) Output area set to current date & time: SDATE4: YYYY.DDD MON DD HH:MI:SS (26 bytes) SDATE3: CYY.DDD MON DD HH:MI:SS (25 bytes) SDATE: YY.DDD MON DD HH:MI:SS (24 bytes) SDATEF: Counted string datetime, in format requested. T1-T3, T5, R6-R1 preserved.