At 07:44 PM 2/12/2015, [email protected] wrote:
Is there a way to count the characters within a text variable? Or better yet, is there a way to have R:Mail split an email after a set number of characters? Using R:Mail with most recent version of R:Base 9.5 (32) to send emails to text and need to limit each one to stay within character limits of wireless carriers.
David, The R:BASE (SLEN(.varname)) is the typical function to count characters. -- Example 01 SET VAR vText TEXT = 'The Next BIG Version of R:BASE!' SET VAR vLength INTEGER = (SLEN(.vText)) The resulting value should be 31 -- Example 02 SET VAR vText TEXT = 'The Next BIG News for R:BASE Technologies, Inc.' SET VAR vLength INTEGER = (SLEN(.vText)) The resulting value should be 47 Keeping that simple exercise in mind, you should be able to implement such logic in your specific circumstances. Once you know the exact length of a given TEXT/NOTE/VARCHAR string, you may use the (SGET(text,nchar,pos)) function to split the text string, if you wish. For more details and examples: HELP SLEN HELP SGET Very Best R:egards, Razzak.

