Hi All:
I don't believe I've submitted this before. Apologies, if I did.
In converting raw data from clients, in this particular case -- ATM
data, there sometimes appears control characters which are misinterpreted
by printers as control codes. This routine replaces those with asterisks.
*!*******************************************************************
*! Procedure.........: TrashOut()
*! Author............: David Lee Powell
*! Project...........: Data Environment Management System
*! Created...........: 09-Sep-1994
*! Copyright.........: (c) 1994 Data-Train Microcomputing, but permission
*! : to use granted as long as credit is given me.
*) Description.......: Replaces control codes which would mess up Reports
*) : with mild-mannered asterisks.
*! Syntax............: m.variable = TrashOut( m.variable )
*! Parameter list....: lcString - the string to do replacement on
*! Major change list.: None
*! Called by.........: Any
*! Calls.............: None
*!*******************************************************************
FUNC TrashOut
PARA lcString
PRIV ALL LIKE j*
FOR ji = 1 TO LEN( lcString )
IF SUBS( lcString, ji, 1 ) < CHR(32)
lcString = STUF( lcString, ji, 1, "*" )
ENDI
NEXT
RELE ALL LIKE j*
RETU lcString && EOF: TrashOut()
The FPLib() lives! I wish you all well.
David in Dallas (again).
--- Maximus/2 3.01
---------------
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 972-250-4479 * (1:124/1208)
|