IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Calendar control parameter
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
Issue :
Using a calendar control select a date in mm/dd/yyyy format. Default the date to current date. Pass the parameter in to a DEFINE subtracting 3 business days. Select all master file records whose AS_OF _DATE is within the date range (original input parameter date thru parameter date less 3 business days.

Report code:

-SET ECHO=ON;
-SET BUSDAYS = _MTWTF_;
-SET &INDATE = &INDATE;
-*
-RUN

DEFINE FILE FUND_DYNAMIC
-*Set up master date for compare date time stamp
DATE/HMDYY=AS_OF_DATE;
DATE_TEST1/HYYMD = AS_OF_DATE;
DATE_TEST/YYMD = HDATE(AS_OF_DATE, 'YYMD');
-*redefine date parameter to yymd form at for subtraction and comaprison
INDATE_REDEF/MDYY = &INDATE;
INDATE_CVT/YYMD = DATECVT(INDATE_REDEF,'MDYY','YYMD');
INDATE_LESS3/YYMD = DATEADD(INDATE_CVT,'BD',-3);
END

TABLE FILE FUND_DYNAMIC

PRINT
INDATE_REDEF AND INDATE_CVT AND INDATE_LESS3 AND AS_OF_DATE AND DATE_TEST AND DATE_TEST1 AND DATE
IF READLIMIT EQ 1
END


Problems:
In the value property of the calendar control what returns the current date
When I set the value property to 07282008 as the calendar control does not show the date as 07/28/2008 but as 07282008. The defines produce the desired result:



PAGE 1

INDATE_REDEF INDATE_CVT INDATE_LESS3 AS_OF_DATE DATE_TEST DATE_TEST1 DATE
07/28/2008 2008/07/28 2008/07/23 2004/05/06 00:00:00.000 2004/05/06 2004/05/06 05/06/2004


When I set the value property to 07/28/2008 as the calendar control does show the date as 07/28/2008 but the defines do not produce the desired result: The parameter is accepted.
DEFINE FILE FUND_DYNAMIC
DATE/HMDYY=AS_OF_DATE;
DATE_TEST1/HYYMD = AS_OF_DATE;
DATE_TEST/YYMD = HDATE(AS_OF_DATE, 'YYMD');
INDATE_REDEF/MDYY = 07/28/2008;
INDATE_CVT/YYMD = DATECVT(INDATE_REDEF,'MDYY','YYMD');
INDATE_LESS3/YYMD = DATEADD(INDATE_CVT,'BD',-3);
END
TABLE FILE FUND_DYNAMIC
PRINT
INDATE_REDEF AND INDATE_CVT AND INDATE_LESS3 AND AS_OF_DATE AND DATE_TEST AND DATE_TEST1 AND DATE
IF READLIMI EQ 1
END
0 ERROR AT OR NEAR LINE 27 IN PROCEDURE junk FOCEXEC *
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: READLIMI
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT


PAGE 1

INDATE_REDEF INDATE_CVT INDATE_LESS3 AS_OF_DATE DATE_TEST DATE_TEST1 DATE
1900/12/26 2004/05/06 00:00:00.000 2004/05/06 2004/05/06 05/06/2004
 
Posts: 1 | Registered: July 28, 2008Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
READLIMI???

I would try READLIMIT....
That might help.




Frank

prod: WF 7.6.5 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.5 on the same platform and databases,IE7

 
Posts: 1565 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
quote:
INDATE_REDEF/MDYY = 07/28/2008;


You will need steps to edit out the slashes.


Pat
WF 5.3.2 AIX, NT, AS/400, Focus AS/400, AIX, Oracle, JDE, DB2, Lotus Notes
 
Posts: 495 | Location: TX | Registered: September 25, 2007Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Calendar control parameter

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.