[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

322.0. "Need example for Subroutine CTRAN" by WIENER::SCHOELLER (see you later emulator) Fri Mar 09 1990 05:18

    I'm tryin to convert the Blanks (only) in an Alphafield (A20) to
    Underscores, using the Subroutine CTRAN.
    
    Lacking an example and the 'Subroutine Library Users Manual', is 
    tried as follows:
	
    SYNTAX: CTRAN (inlen,infield,incode,outcode,outfield)
    
    I used: CUST_NAME/A20=CTRAN(20,AK_CUS_FN,' ','_',CUST_NAME);
    
    In the resulting File, I still got the original Fieldcontant (blanks
    instead of underscores).
    
    Any help is appriciated.
    
    Reinhard
    
    
T.RTitleUserPersonal
Name
DateLines
322.1Need DECIMAL EquivalentPLOP::COYLEFri Mar 09 1990 14:1217

    Reinhard,

      What you need in the function call is the DECIMAL equivalent of the
character you want to convert and the character you want to appear.

In your case a space is 32, and an underscore is 95.

Therefore your syntax would be:

    CUST_NAME/A20=CTRAN(20,AK_CUS_FN,32,95,CUST_NAME);




                                        KC