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.
I'm not really a dedicated focus programmer but am responsible for new reports for my department. We use Focus 7.2.2 on MVS so quite old fashioned programming.
I've been tasked with using some crtforms to ask for a few variables which then help to dynamically create some mainframe datasets.
One of the variables will appear in the middle of a dataset but potentially the variable could have trailling spaces.
Can anyone tell me if there is an easy way to lose the trailling spaces in the variable as it will go from a length of 8 characters when input into the crtform to a variable length when creating the dataset name?
Brian, When you create your dataset, I assume that you will first create the complete &-variable that will contain the complete filename. In that assigment you can use strong concatenation, ie the double pipe symbol (||) which will remove any trailing blanks from the first variable. Example:
Of course, this example deals with PC-style filenames, but the principle of using the || stays the same. Give it a try and let us know if this answers your problem.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
All functions in Dialogue Manager require the output length of the string, so you have to determine the ARGLEN and use that as the output length, as in this example using SUBSTR (substring):
There another way, maybe a bit "expensive", which is writing the variable to a file and then reading it back (I assume that a file called SAVE is allocated):
Brian, are you taking this variable new from a crtform or does it exist in a database already? I'm not understanding 'will appear in the middle of a dataset ' I ask because there's a difference between working on an &variable (taken from a CRTFORM) and editing an existing field with a DEFINE, when taken from a database. Clarify, would you?
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
It sounds to me like Brian is trying to construct an MVS dataset name and is trying to use the variable as one of the middle nodes. I think that the earlier post showing strong concatenation should do what he wants.
Blimey so many responses and so many ways of doing it.
I tried the simplest method first which was the strong concatenation which was unsuccesful but the truncate function worked perfectly so went with that.
Thanks everyone for you suggestions and now that I've found this excellent forum no doubt I'll be writing on here often.
Be sure to read the posts daily, I've been doing FOCUS/WebFocus for 18 years and I learn enough from the Forum to make it worth my time to check them every day.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
I'm with Waz and PB. I've been coding FOCUS and WebFOCUS since PC FOCUS 1.5, about 24 years and I have this site email me all the updated posts every day and I review them every day. Those that have something I need or think I may need get saved in my IE Favorites under a group name WebFOCUS Solutions. The list is quite large and someday I'm going to have to figure out a way to create categories under WebFOCUS Solutions.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Not only do I learn something new everyday, I enjoy being able to help others learn and even when I have nothing to add I feel like I've been chatting with friends.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007