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.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I'd like to create a date field which I'd put into a WHERE statement to print only the fields from July 2010 to the previous month (current_month - 1).
-* 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');
-TYPE &CURDATE
-* Use &CURDATE to get the Beg Of Qtr (BOQ)
-SET &BEGTQTY0 = DATEMOV(&CURDATE, 'BOQ');
-TYPE &BEGTQTY0
-* 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');
-TYPE &BEGTQTY
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');
END
TABLE FILE EMPDATA
HEADING
"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 '?'
BY HIREDATE
-* 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
END
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