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 have a routine that calculates many generic dates (beginning of current month, beginning of current year, end of current month, and on and on.) I put the values into a HOLD file, and then convert them all to amper variables via -READFILE. One of these translates the date of the beginning of the current month to the three-character name of the month, via the format Mt. If the field goes to Excel format, is shows Oct for the current month. After the -READFILE the field with format Mt has a numeric value. I created an additional field with format A3 whose value is determined with FPRINT which solved that issue. I've been using the numeric value for another function, but today the value is 0 instead of the 10 that I expected. I found that computing another field with format I3, and setting it to the field with format Mt will give me the 10 I was looking for. My question: is this behaving as expected?
The code:
TABLE FILE F59YRDAY
PRINT
COMPUTE RPT_MTH_BEG/A8MDYY = '10012012' ;
COMPUTE RM_BOM_CY/MDYY = RPT_MTH_BEG;
COMPUTE CM_ABV_NAME1/Mt = RM_BOM_CY;
COMPUTE CM_ABV_NAME2/I3 = CM_ABV_NAME1 ;
COMPUTE CM_ABV_NAME/A3 = FPRINT(CM_ABV_NAME1, 'Mt', 'A3');
WEEK_DAY
WHERE DATE EQ '&MDYY';
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLD01 FORMAT ALPHA
END
-RUN
-*********************************
-READFILE HOLD01
-*********************************
-TYPE RPT_MTH_BEG &RPT_MTH_BEG
-TYPE RM_BOM_CY &RM_BOM_CY
-TYPE CM_ABV_NAME1 &CM_ABV_NAME1
-TYPE CM_ABV_NAME2 &CM_ABV_NAME2
-TYPE CM_ABV_NAME &CM_ABV_NAME
-TYPE WEEK_DAY &WEEK_DAY
Clearly the value 10 in CM_ABV_NAME2 came from an internal value representing October in CM_ABV_NAME1. Looks like the COMPUTEs work correctly, but -READFILE has a bug when interpreting a format Mt column.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
George - after the -READ the value of the field with format MONtr has leading zeroes. Of the two, I prefer the one with format I3, it's just cleaner for me. Thank you for your suggestion.
8009 Windows, HTML, AHTML, Excel In FOCUS since 1983