Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Closed] Is Value of Field with format Mt via -READ as Expected?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed] Is Value of Field with format Mt via -READ as Expected?
 Login/Join
 
Silver Member
posted
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
 


The output:
 RPT_MTH_BEG 10012012
RM_BOM_CY 10012012
CM_ABV_NAME1 0
CM_ABV_NAME2    10
CM_ABV_NAME Oct
WEEK_DAY 5
 

This message has been edited. Last edited by: Joni Campbell - Europa Sports,


8009
Windows, HTML, AHTML, Excel
In FOCUS since 1983
 
Posts: 41 | Location: Charlotte, NC | Registered: January 06, 2012Report This Post
Virtuoso
posted Hide Post
quote:

COMPUTE CM_ABV_NAME1/Mt = RM_BOM_CY;
COMPUTE CM_ABV_NAME2/I3 = CM_ABV_NAME1 ;
. . .
CM_ABV_NAME1 0
CM_ABV_NAME2 10

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, 2005Report This Post
Master
posted Hide Post
I was using /Mt for years and then suddenly it broke in 7703. In a given year it would always miss February and give me two Decembers.

I now use /MONtr which works well.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Silver Member
posted Hide Post
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
 
Posts: 41 | Location: Charlotte, NC | Registered: January 06, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Closed] Is Value of Field with format Mt via -READ as Expected?

Copyright © 1996-2020 Information Builders