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     CTRAN Subroutine, What's the decimal value of a Comma?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
CTRAN Subroutine, What's the decimal value of a Comma?
 Login/Join
 
<matty@time>
posted
Hello,

Trying to use this CTRAN Subroutine to translate a comma into a space, but I dont know the deciaml value of a comma:

CTRAN( inlen, infield, decfrm, decto, output )

decfrm is the "decimal value of the character to be traslated"

Any ideas? Thanks!
 
Report This Post
<Claudia Holanda>
posted
Hello!

You can look at the code page table to get the decimal value of a character. However, since most of us don't have this table handy (or don't even know which code page you may be using) the best way to get this information is:

1. In Windows, open the Character Map tool (Start Menu->Programs->Accessories->System Tools->Character Map)
2. Select or move the mouse over the comma character and you'll see the HEX representation (2C)
3. Open the Calculator and change the view to Scientific format
4. Click on the Hex radio button, type in 2C and then click on the Dec radial button. You will get 44. And that's your answer! Cool

Hope this helps!
 
Report This Post
<matty@time>
posted
Thanks Claudia,

Also had this table emailed to me from Russel Bonner in IBI Support:

http://www.legacyj.com/cobol/ascii.html

Comma - 44
Space - 32

Thanks!
Matthew
 
Report This Post
<Claudia Holanda>
posted
For those characters above 7F or 127 not listed in the ASCII table, you may use the following:

Microsoft: http://www.microsoft.com/globaldev/reference/wincp.mspx

IBM:
http://www-1.ibm.com/servers/eserver/iseries/software/g...ation/codepages.html
 
Report This Post
<Grzegorz>
posted
Another method, for getting decimal value, of a character:

-* GETDECIMAL.FEX:
-DEFAULT &CHAR=',';
-SET &VALUE=BYTVAL('&CHAR','I3');
-TYPE Decimal code of '&CHAR' is &VALUE
-*-------------------------------------

Regards
Grzegorz
 
Report This Post
Expert
posted Hide Post
and remember the decimal values are different on the mainframe [EBCIDIC] from what they are on your server [ASCII]..so run your BYTVAL routine up on your mainframe to make yourself a little table of the values of the characters you commonly strip out of strings, and then lather,rinse, and repeat on your wintel box... Wink
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
And those tables are available in the Legacy Focus Keysheet - decimal, ebcdic, ascii, octal, and hex - all the equivalences.

Vivian Perlmutter
Aviter, Inc.
www.aviter.com
PO 50724
Henderson, NV 89016
 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
Expert
posted Hide Post
While digging around on the forum for BYTVAL, I found this old posting regarding CTRAN.

I learned (I'm sure it was from the forum, though I can't find the posting) that if you incorporate BYTVAL in the CTRAN function, you don't have to worry about ASCII and EBCIDIC code values.

For example:

-*-- Replace dash by space
COMPUTE NAMEA/A50 = CTRAN(50, NAME, BYTVAL('-','I3'), BYTVAL(' ','I3'), 'A50'); NOPRINT
-*-- Replace ampersand by space
COMPUTE NAMEB/A50 = CTRAN(50, NAMEA, BYTVAL('&','I3'), BYTVAL(' ','I3'), 'A50'); NOPRINT
-*-- Replace apostrophe by space
COMPUTE NAMEC/A50 = CTRAN(50, NAMEB, BYTVAL('''','I3'), BYTVAL(' ','I3'), 'A50'); NOPRINT

Just thought you'd like to know.

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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     CTRAN Subroutine, What's the decimal value of a Comma?

Copyright © 1996-2020 Information Builders