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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
STRIP function
 Login/Join
 
Member
posted
I am getting an error when trying to use this function. The error is:
(FOC36355) INVALID TYPE OF ARGUMENT #2 FOR USER FUNCTION STRIP - here is the function as I have it:

COMPUTE Aptdate/A8 = STRIP(10, APPT_DATE, '/', 'A8');

I am using Report Painter and am brand new to this product so any help would be much appreciated.


Brenda
WebFocus/Report Painter 7.6.4
Linux/MVS DB2
 
Posts: 10 | Location: Plano, Texas | Registered: September 24, 2007Report This Post
Virtuoso
posted Hide Post
Welcome
Please update your Signature on the Profile page as to what version of WebFocus you are using.

What is the Format of APPT_DATE?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Guru
posted Hide Post
Try it on DEFINE.

This might help you
https://forums.informationbuilders.com/eve/forums/a/tpc/...1057331/m/2911016742


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
Brenda, it is possible that APPT_DATE is not an alpha field but a date field and so cannot be used in the STRIP function. depending on the format of APPT_DATE, you probably don't need to use the STRIP function to remove the slashes.

If APPT_DATE has format YYMD, do the following:

DATE2/A8YYMD = APPT_DATE;
Aptdate/A8 = DATE2;


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
COMPUTE APPT_DATE1/A8DMYY = APPT_DATE; NOPRINT
COMPUTE Aptdate/A8 = STRIP(10, APPT_DATE1, '/', 'A8');

Should do the job



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
John, no stripping necessary when going from A8YYMD to A8.

Cheers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
As you say you are new to Report Painter, why do you need to remove the '/'. As all have said if it is a smart date, the '/' are how it displays, you have to convert to an alpha field to get no '/' to display.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
Brenda

It depends on why you want to remove the '/'.
If you want to do some calculations, use only the year or month part, change the format from YYMD to DMY or whatever, there are 1001 (or more) ways to do it.
For a starter sometimes a bit confusing.

We can help if we know a bit more, so please update your signature.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Member
posted Hide Post
Thanks for all of your replies. I did not realize that you couldn't do the Strip function on a date field. I used a compute with the format YY|M|D to eliminate the '/' and that seems to have taken care of the problem. I had to remove the slashes in order to compare this date to another and didn't realize that there were so many date 'functions' available. Like I said, I'm brand new to this so just getting my feet wet. Thanks again to all! I'm moving on to a really complicated issue next and I may have to come back for some real help... Smiler


Brenda
WebFocus/Report Painter 7.6.4
Linux/MVS DB2
 
Posts: 10 | Location: Plano, Texas | Registered: September 24, 2007Report This Post
Master
posted Hide Post
Good point Francis.

Brenda we can help you better if you show your webfocus release as part of your signature.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders