FOR lnX = 1 TO lnBitLength
lnPC = lnx / lnBitLength * 100
* --- Hard carriage return counter.
lnCRcounter = lnCRcounter + 1
lcCurChar = SUBSTR(lcDataString, lnX, 1)
lcCurChar2 = SUBSTR(lcDataString, lnX - 1, 1)
* --- This is going to perform a step-by-step full rewrite
* --- of the entire string one character at a time.
IF BETWEEN(ASC(lcCurChar), lnAscLow, lnAscHigh) && Is upper/lower alphas or numeric.
lcGoodInfo = lcGoodInfo + lcCurChar
* --- Pattern regoginzer to only add 1 space in between character information.
IF ASC(lcCurChar) = 32 .and. ASC(lcCurChar) <> 32
lcGoodInfo = lcGoodInfo + " "
* --- Calculated string length per record at 216 characters long.
* --- The only way to find the below record string length is to
* --- parse a test run of say 4,000 bits and physically count
* --- the total number of character encompassing one record.
IF lnCRcounter = 216
lcGoodInfo = lcGoodInfo + CHR(13) + CHR(10)
lnCRcounter = 0
* --- Increment the % counter.
lnPCcounter = lnPCcounter + 1
* --- Show % status.
lcPC = ALLTRIM(STR(lnPC,12,4))
SET MESSAGE TO "Percent conversion currently at : " + lcPC
* --- lcGoodInfo = lcGoodInfo + " "