As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
-* FocalPoint: create where "date" statement for limited output
-SET &TODAYIS = &YYMD ;
-* Test with different date values that are in the report as 'HIREDATE20'
-SET &TODAYIS = 20090329 ;
-SET &TODAYIS = 20090529 ;
-TYPE REPORT FROM BOQ TO &TODAYIS
-* -TYPEs are option
-* CONVERT TODAYS DATE FOR DATE MATH, IN TO: &CURDATE
-SET &CURDATE = DATECVT(&TODAYIS,'I8YYMD','YYMD');
-* Use &CURDATE to get the Beg Of Qtr (BOQ)
-SET &BEGTQTY0 = DATEMOV(&CURDATE, 'BOQ');
-* Convert the BOQ to a useable date in the WHERE statement
-* Legend for variable, use the Capital letters: BEG This Quarter This Year
-SET &BEGTQTY = DATECVT(&BEGTQTY0,'YYMD','A8YYMD');
DEFINE FILE EMPDATA
-* Convert the YY/MM/DD to an I8 for date calcs
HIREDATEI8/I8 = HIREDATE ;
-* Add 20 YEARS to the HIREDATE to bring these dates current (just for testing)
HIREDATE20X/I8 = DATEADD(HIREDATEI8, 'Y', +20);
HIREDATE20/I8 = DATECVT(HIREDATE20X,'YYMD','I8YYMD');
-* GET THE BOQ (BEGINNING OF THE QUARTER) FOR THE HIREDATE. (SEE WHAT QTR IT'S IN)
BEGTQTY0/I8 = DATEMOV(HIREDATEI8, 'BOQ');
-* CONVERT IT TO A YYYYMMDD FORMAT
BEGTQTY/I8 = DATECVT(BEGTQTY0,'YYMD','I8YYMD');
TABLE FILE EMPDATA
"Report for hire dates from &BEGTQTY to &TODAYIS"
PRINT HIREDATE20 AS 'HireDate' FIRSTNAME AS 'First Name' LASTNAME AS 'Last Name'
-* Use the next line to verify without using the WHERE statement.
COMPUTE InThisQTR/A1 = IF HIREDATE20 FROM '&BEGTQTY' TO '&TODAYIS' THEN 'Y' ELSE '-' ; AS '?'
-* Select only dates from BOQ to &TODAYIS (there's only one as of 10/22/2010)
-* Use the next line to limit these records.
-*WHERE HIREDATE20B FROM '&BEGTQTY' TO '&TODAYIS'
ON TABLE SET PAGE OFF
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005