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     [SOLVED] Getting multiple fields using -READFILE not working

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Getting multiple fields using -READFILE not working
 Login/Join
 
Platinum Member
posted
I feel certain this worked before, but it isn't now (Note, the table only holds one row):

TABLE FILE MAINT_REPORTING_DATES
PRINT BEGINNING_OF_YEAR
CURR_REPORTING_MTH_BEGINNING
BY CURR_REPORTING_MTH_END
ON TABLE HOLD AS HOLD_DATES
END
-RUN
-READFILE HOLD_DATES
-DEFAULTH &ME_DATE = '';
-DEFAULTH &CURR_REPORTING_MTH_END = '';
-DEFAULTH &BEGINNING_OF_YEAR = '';
-DEFAULTH &CURR_REPORTING_MTH_BEGINNING= '';
-SET &ME_DATE = EDIT(&CURR_REPORTING_MTH_END,'99/99/9999');
-SET &MB_DATE = EDIT(&CURR_REPORTING_MTH_BEGINNING,'99/99/9999');
-SET &YB_DATE = EDIT(&BEGINNING_OF_YEAR,'99/99/9999');
-SET &HMONTH = FPRINT(&ME_DATE,'Mtr','A9');

In fact, when I run this, I get a "hard kill" error. What is amiss?

Thanks in advance for your help!

This message has been edited. Last edited by: DWaybright,


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 183 | Location: Indiana | Registered: December 05, 2017Report This Post
Virtuoso
posted Hide Post
What's the format of the fields you're holding? Could you first show us what the &variables contain with a -TYPE before you edit them in the -SETs? Let's make sure your data looks right first.

This message has been edited. Last edited by: BabakNYC,


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Gold member
posted Hide Post
Hi,
I am not sure why do you need FPRINT, but that is causing the issue.
Remove the last line of your code and it should work.
as BabakNYC said print your values with Type to see if you are able to read them properly or not and then use functions.


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Report This Post
Platinum Member
posted Hide Post
Addy, you're a genius! I removed only the FPRINT statement and it worked. Is there a better way to get the month name and year into an amper variable?
THANKS!


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 183 | Location: Indiana | Registered: December 05, 2017Report This Post
Virtuoso
posted Hide Post
If you do the Month name translation in a Define before you hold the data, you'll get a text in the hold file that'll require no Dialogue Manager editing.

  
DEFINE FILE retail_samples/wf_retail
 Month/Mtr=WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_DATE_DAY_COMPONENT ;
 YearMonth/YYM=WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_DATE_DAY_COMPONENT ;
END

TABLE FILE retail_samples/wf_retail
BY Month
BY YearMonth
ON TABLE HOLD
END
-RUN
-DEFAULTH &Month='';
-DEFAULTH &YearMonth='';
-READFILE HOLD
-TYPE &Month &YearMonth 


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
You could also try the function CHGDAT
  
-SET &ME_DATE = &DATEMDYY;
-TYPE &ME_DATE
-SET &HMONTH = CHGDAT('MDYY', 'MX', &ME_DATE, 'A20V');
-TYPE &HMONTH


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Platinum Member
posted Hide Post
Thanks for all the help!


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 183 | Location: Indiana | Registered: December 05, 2017Report 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     [SOLVED] Getting multiple fields using -READFILE not working

Copyright © 1996-2020 Information Builders