REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


REXX and Y2K



The latest FixPaks for OS/2 Warp 3 (FP35 and above) and Warp 4 (FP6 and 
above) contain extensions for REXX to make it "Y2K Tolerant". 
From a recent FixPak's Readme: 


 
   4.1 QUERYING FILE DATES FOR FILES AFTER DEC 31, 1999 IN REXX

      Existing REXX functions return file dates with a two digit year
      only. While these functions are Year 2000 tolerant (i.e. the
      results will be correct for files dated after Dec 31, 1999)
      they require some additional logic in existing programs to
      handle the returned date correctly when they are compared with
      other file dates.

      Since the output format of the exisiting functions could not
      be changed for compatibility reasons, new options have been
      added to the REXX interpreter to return file dates with the
      year formatted with 4 digits. Two functions have been
      extended to support the new format. The syntax to retrieve the
      file date in 4 digit format is as follows:

      /********************************************/
      /* Use STREAM QUERY TIMESTAMP to query file */
      /* date in 4 digit format                   */
      /********************************************/

      Say Stream("C:\CONFIG.SYS", "C", "QUERY TIMESTAMP")

      /***********************************************/
      /* Use option "L" with SysFileTree to return a */
      /* list of files with long date format         */
      /***********************************************/

      Call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
      Call SysLoadFuncs
      Call SysFileTree "C:\*.*", "Files", "L"
      Do i = 1 To Files.0
         Say Files.i
      End /* do */

  

Inf-HTML End Run - Successful