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.
DEFINE FILE CAR VAR1/A10 WITH CAR ='0'; VAR2/D10L=ATODBL(VAR1,10,'D10'); VAR3/A10=FTOA(VAR2,'(D10Lc)',VAR3); END TABLE FILE CAR PRINT CAR VAR1 VAR2 VAR3 END
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
convert the alpha field to integer and then back to alpha and the EDIT will pack it out with leading zeroes, whether you want it to or not. DEFINE FILE CAR MYALPHAFIELD/A8=EDIT(SALES); temp/I8=EDIT(MYALPHAFIELD); RESULT/A8=EDIT(temp); END
another way , maybe more direct, is to use CTRAN which translates all instances of character in an alpha string to another character in this case a blank (32) to a zero(48) DEFINE FILE ... NEWFIELD/A20= CTRAN ( 20, fieldname , 32 , 48, 'A20'); END (example for a field of length 20)
i find either of these ways easier than the ibi suggested hoops to jump thru. The CTRAN way would work even if some freaky alpha character snuck its way in to your input field. You might even want to RJUST your input field before you CTRAN it, just to make sure there's no freaky extra blank at the end, entered by mistake. Look at the 4th manual in the basic set, "Using Functions"
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003