× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have started a new thread since my original topic with the subject
"free-format move *USA date value to 6-digit numeric in YMD format" has
drifted into an opinion "discussion".  Please keep all opinion discussion
out of this thread.  (I understand what you all are saying about what IBM
has done wrong or right, and I have my frustrations with it as well, but I
would like to move forward to resolve the problem we are having.)

I have a workaround, using an intermediate non-array date variable, and it
is working.  However, I would like to know how to research to identify an
APAR and/or PTF to fix the problem.  Earlier attempts to do so turned up
nothing.  FWIW, the first screen of a plain DSPPTF shows TL03252 with a
Permanently Applied status.  IIRC, this should put the last cume applied on
this system dated around two years ago; it was applied in December 2003.

For those who may have already abandoned the original thread due to "drift",
the latest scenario is as follows:

There are two working test snippets of code below.  On my v5r2 box, TEST1
works, and TEST2 doesn't.  TEST2 issues RNQ0114 "The year portion of a Date
or Timestamp value is not in the correct range (C G D F)" for the statement
doing the %int(%char.  The dump shows DATEUSA(1) set to '12/25/2005' and
YYMMDD60 = *zeros.

At least two responders to the original thread tried to duplicate the error,
but could not.  At least one of them was using v5r2.

Program TEST1:
  d DateUSA         s               d   DatFmt( *usa ) Inz
  d YYMMDD60        s              6  0
   /free
        DateUSA = d'2005-12-25' ;
        YYMMDD60 = %int(%char(DateUSA:*YMD0 ));
        *inLR = *On ;
        DUMP(a) ;
   /end-free

Program TEST2:
  d DateUSA         s               d   DatFmt(*usa) Inz Dim(32)
  d YYMMDD60        s              6  0
   /free
        DateUSA(1) = d'2005-12-25' ;
        YYMMDD60 = %int(%char(DateUSA(1):*YMD0 ));
        *inLR = *On ;
        DUMP(a) ;
   /end-free

TIA,
Dan

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.