StarQuest Technical Documents

Cash (Client Access Shell) Date Fix

Last Update: August 13, 1999
Product: Client Access for UNIX
Version: 1.0.4.1 and later
Operating System: ALL
Article ID: SQV00CA005

Abstract

There is a known problem when using caftp, xcaftp, or cash to download an AS/400 file containing dates outside the range 1940-2039. A patch is available to resolve this problem when using older versions of CAUNIX; please contact StarQuest Support. This fix is now included in current versions of CAUNIX.

Solution

  1. If you have not already done so, install and license CAUNIX.
  2. If CAUNIX is running, stop any programs associated with it.
  3. Download or copy the appropriate "cash" patch for your UNIX system
  4. Copy the file "cash" to $CAUNIX/bin/cash

Background

The AS/400 uses a parameter "Date Format" (DATEFMT) to affect how dates are displayed. The default value (*MDY) as well as other similar values (*JUL, *DMY, and *YMD) can only represent dates in the range 1940 through 2039.

cash (which provides the file transfer engine for both caftp and xcaftp) was using the default value of *MDY.

With the patch applied, cash now uses the CA400 API call cwbDB_SetDateFormat() to set the Date Format to *ISO.

In addition, there is a new environment variable "CA400_DB_DATE_FMT" that can be used to influence the behavior of cash in cases where you would prefer to use a different date format.

Values of CA400_DB_DATE_FMT are:

  • CWBDB_DATE_FMT_JUL
  • CWBDB_DATE_FMT_MDY
  • CWBDB_DATE_FMT_DMY
  • CWBDB_DATE_FMT_YMD
  • CWBDB_DATE_FMT_USA
  • CWBDB_DATE_FMT_JIS
  • CWBDB_DATE_FMT_EUR

Example

CA400_DB_DATE_FMT=CWBDB_DATE_FMT_EUR; export CA400_DB_DATE_FMT

Hint to developers

The cwbDB_SetDateFormat() API call is not documented in the CA/UNIX API reference manual, but is available in the CA/UNIX libraries and in the header file $CA400/include/cwbdb.h. For latest API information, refer to: Client Access for Windows 95/NT API and Technical Reference SC41-351

 


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.