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.
Does anyone know if there is some way to check the contents of a field in MVS Focus to see whether the contents are numeric or not? In COBOL, it would be IF FIELD IS NUMERIC, but I know of no way to accomplish this in Focus. Can anyone help? Thanks. Sandy
I don't run MVS Focus but here is some code I use to check amper variables in DM. -SET &TST1 = 'HI'; -SET &TST2 = 1; -SET &VAL1 = IF &TST1.TYPE EQ 'A' THEN 'TEXT' ELSE 'NUM'; -SET &VAL2 = IF &TST2.TYPE EQ 'A' THEN 'TEXT' ELSE 'NUM';
The .TYPE is what knows if the value is text or numerical.
I hope this helps.
Posts: 406 | Location: Canada | Registered: May 31, 2004
Curtis, thank you so much for your tip. Please forgive my dumb questions, but I am beginner Focus programmer.
Will your code example work for a field that is more than one digit? For example, if a field were supposed to have a valid numeric date in it, could your example check to see if it was numeric or not? Thank you again.
For a 'beginner', as you describe yourself, you ask really good questions. If your incoming field is a date as you suggest, or is supposed to be a date, if you convert it to a SmartDate (a focus term here), focus will brilliantly NOT transform anything that isn't a date. For example, in my legacy databases I have a date field in alpha '20040231'; When i translate that to a SmartDate, it will translate as 0, because of course there IS NO 31st of February. This is a very handy thing, i can produce an exception report, for example, from my legacy db, to tell the data entry folks what they have to fix; So if your question really is about dates, read the chapters in the manual about SmartDates and you'll be a happy camper. Otherwise check out Chapter 11 in the manual "using functions" ;
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Hi, Could you please tell me how can find the Usage type of a field in the table. Because in my reports all the parameters will be passed as string. Like as follows -set &parm1 = 'where country_id eq ''12'''; Actually in my table the country id is a numeric field.so it is throwing error if I include the above parameter in the WHERE section. Following is the error i am getting "COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED" My table request looks as follows.
TABLE FILE COUNTRY PRINT * &PARM1 END
And the &Parm will be dynamic and it can be of any data type sometime i may use country_name as parm1. Can anyone of you help me how to figure out columns usage type before comparing it.