August 12, 2004, 08:52 PM
<kj>Problem with DATECVT after migrating to wf 5.2.6 from 5.2.1
Has any one experienced this problem when migrated from webfocus 5.2.1 to 5.2.6 on Win 2k. This is working fine in 5.2.1 and not in 5.2.6.
I am getting an error
(FOC36355) INVALID TYPE OF ARGUMENT #2 FOR USER FUNCTION DATECVT
when it is run in 5.2.1. Is there a change in how the date functions are executed?
DEFINE FILE CAR
GMTNOW/HMDYYI = HGETC(8,'HMDYYI');
GMTNOWA8/A8 = HCNVRT(GMTNOW, '(H17)', 17, 'A8');
GMTNOWI8/I8 = EDIT(GMTNOWA8);
GMTNOWYYMD/YYMD = DATECVT(GMTNOWI8,'I8YYMD','YYMD');
END
TABLE FILE CAR
PRINT CAR MODEL SEATS GMTNOWYYMD
BY COUNTRY
END
thanks,
kj
August 13, 2004, 12:55 PM
BIGBMNExactly. There is new functionality that checks arguments when calling subroutines.
To turn it off
SET USERFCHK=OFF.
To fix the original problem change the format of
GMTNOWI8/I8 = EDIT(GMTNOWA8);
to
GMTNOWI8/I8YYMD = EDIT(GMTNOWA8);
August 13, 2004, 02:05 PM
<kj>Thanks BIGBMN. That worked.
Also if there is no ELSE for IF, it throws up an error. Does any one has experienced with any other problems while migrating to 5.2.6?
kj