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.
New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.
What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.
During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.
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