QUESTION CONTINUES ...
So the '010101' is arbitrary in this usage and
I don't need to worry about
it if &BDT1 is going from mmddyy to mmddyyyy?
Well, 010101 is arbitrary, in the sense that ANY
valid date would work.
just want one that WON'T be a value for &BDT1
(you'd get a difference of
and would treat it as invalid).
As for going to MDYY format, I don't believe the
MDY function handles a
digit input. You can use CHGDAT, which will accept
a MDYY format date.
Here's an example:
-PROMPT &VAR
-SET &MSG = IF CHGDAT(MDYY, MDYY, &VAR
| 'X', 'A17') EQ ' '
- THEN ' MESSAGE: ERROR - BEGIN DATE INVALID'
- ELSE ' OK DATE';
-TYPE &MSG
Note that we concatenate an 'X' to the end of
the input date, to prevent
conversion to double precision. If CHGDAT finds
an 'invalid' date, it returns
a 'blank' value, the value for which we test.
Replied By
Art Greenhaus.
There is one hole: MDY also returns 0 when the
two dates are equal, so
a value of 010101 (or whatever you use as the
constant date) will be
rejected. "IF AYMD(&vardate, +0, 'I6') EQ
0" is better in that regard,
and avoids whatever uncertainty may exist about
comparing 6- and 8-digit
date values.
I agree that AYMD would have been better. But,
since the original message
said that the incoming date was format MDYY,
then AYMD wouldn't work.
> CSV003I REQUESTED MODULE CHGDATI NOT FOUND
ERROR AT OR NEAR LINE 7 IN PROCEDURE CIPCCNTSFOCEXEC
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT
RECOGNIZED: (
ERROR AT OR NEAR LINE 22 IN PROCEDURE CIPCCNTSFOCEXEC
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: DATE1
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
Thanks.
NANCY KRUKOW
Reply By Rob Freeman:- ( IBI )
I can see this happening if you don't have an
allocation for the R7.0.8
FUSELIB.LOAD dsn. This dsn contains the new version
of chgdat called
chgdati.
The prior releases of FOCUS didn't have the member
CHGDATI shipped as part
OF FUSELIB.LOAD. The default setting for Y2K
compliance is DATEFNS=ON which
means we will try to load the new version of
these subroutines vs. the old.
This is why it's failing on you. An allocation
for the R7.0.8 FUSELIB
should solve this problem. Also remember that
if you don't want the
Y2K version of the date subroutines you may deactivate
them with,
SET DATEFNS=OFF.
You may have problems with all of the subroutines,
not only CHGDAT,
The missing suboutine, CHGDATI, is a new entry
point to CHGDAT that is
only available in release 7.0.8. This was added
as part of our Y2K
solution. Since you are apparently using the
7.0.5 FUSELIB, CHGDATI
dose not exist and cannot be found.
None of our other clients have reported a problem
with FUSELIB
distributed on the tape. You may want to double
check your
installation, attempt to reload FUSELIB.LOAD
from the tape, or call
customer support to assist in the installation
or send a new tape.
Rob Freeman
There were some excellent articles, with code
examples, in recent
issues of the Focus Systems Journal. The articles
were written by
Allan Doolittle. In the September/October issue
(Volume 10, Number 5),
he included a program called Anytime which addressed
weekends and
could be modified for holidays. Perhaps IBI can,
finally, arrange for
these programs to be made available on their
web site. Otherwise, you
can order a back copy.
The IBI System Journal of last October or so included
a routine called
"ANYTIME" which will allows you to exclude holidays
and/or weekends in a
FOCEXEC TABLE request. It requires you to maintain
a file of "holidays" as
your company dictates.
todayl/mdyy dfc 19 yrt 90 = today('a8') ;
and got the error message
ERROR AT OR NEAR LINE 5 IN PROCEDURE TSTTD FOCEXEC
*
(FOC03681) Syntax Error near column 13.
TODAYL/MDYY DFC 19 yrt 90 = today('a8') ;
This I want to compile the procedure amper variables
are out. I wanted to
use DFC and YRT to get around fact that TODAY()
function does NOT return a
century date which I need. I wanted to avoid
parsing the year out of the
date and then rebuilding it base on year but
will if have to.
REPLY : Using DFC and YRT with Compute in Maintain
You are getting an error because the value returned
by TODAY includes
the '/'. Try the following:
tempday/a8 = today(tempday);
todayl/mdyy dfc 19 yrt 90 = edit(tempday,'99$99$99')
;
REPLY : Using DFC and YRT with Compute in Maintain
As of release 7.08 of Mainframe Focus, Maintain
does still not support
Y2K. There is work being done on it now, and
it should be available
soon. If you need to get a century date with
the TODAY function, do it
as follows:
Compute Today1/a8=TODAY(TODAY1);
Compute Today2/MDY = Today1;
Compute Today3/Mdyy=Today2;
REPLY : YRT & DEFCENT with MAINTAIN
As of Release 7.0.8 you will receive a warning
message saying that YRT
and DFC are not yet supported in MAINTAIN, but
your MAINTAIN
application will continue to run without blowing
up.
We are in the process of coding this fix and expect
to have it
included in Release 7.0.9 due out this summer.
Maria Sanchez
MAINTAIN Product Manager
QUESTION Re: Using DFC and YRT with Compute in Maintain
I was told last week that in 2000, the default
value for defcent changes
to 20 from 19. Is this correct? If so, using
defcent & yrthresh for
the Today function will become a moot point.
Can IBI answer this?
Thanks
REPLY FROM IBI ...
I spoke to a programmer about this. It was a conscious
decision NOT to
change DEFCENT at the turn of the century, for
upward compatibility
reasons. It was felt that the site COULD set
DEFCENT, if that was desired,
but to have FOCUS make the change could have
negative effects on
existing applications.
Continue further there
are more questions in the Next
page and subsequent pages !