Troy,
Here is a VBScript that will work as well:
'Useage: WhateverFileNameYouUse.VBS "FullyQualifiedFileNameToStrip"
'Note: The Source File is also the Target File, so only pass a copy to be
processed
Dim WSH 'Script Host Object
Dim FSO 'File System Object
Dim TS 'TextStream
Dim s
Dim regEx 'Regular Expression Object
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Const TristateUseDefault = -2
Const TristateTrue = -1
Const TristateFalse = 0
if WScript.Arguments.count < 1 then
wscript.Quit(1)
end if
Set FSO = CreateObject("Scripting.FileSystemObject")
if FSO.FileExists(WScript.Arguments(0)) = True then
FileIn = WScript.Arguments(0)
else
wscript.Quit(1)
end if
Set regEx = New RegExp ' Create regular expression.
With regEx
.Pattern = vbCrLf ' Set pattern of CR/LF pairs
.IgnoreCase = True
.Global = True 'replace all items found
End With
Set TS = FSO.OpenTextFile(FileIn, ForReading, False, TristateFalse)
With TS
While Not .AtEndOfStream
s = regEx.Replace(TS.ReadAll, s)
Wend
End With
TS.Close
Set TS = FSO.OpenTextFile(FileIn, ForWriting, True)
TS.WriteLine s
TS.Close
Set FSO = Nothing
Set regEx = Nothing
wscript.quit(0)
----- Original Message -----
From: "Troy Sosamon" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Saturday, May 14, 2005 3:17 PM
Subject: [RBASE-L] - RE: Cr/Lf in Dos Report
>I have written a Command Line EXE to strip all of the Cr/Lf characters out
> of a file.
> If anyone needs it, I will be happy to give them a copy. E-mail me
> privately.
>
> Troy
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Troy Sosamon
> Sent: Saturday, May 14, 2005 12:27 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - RE: Cr/Lf in Dos Report
>
> That is correct.
>
> I need a fixed length record padded w/ spaces. I have been doing NACHA
> files for years, and no one ever had a problem w/ the cr/lf, now an existing
> client that is currently doing ACH submissions w/ the same bank is opening a
> new account, and the bank wants them taken out on the new account.
>
> It will only take me a couple of hours to write a VB program to strip them
> off, so it is not a big deal.
>
> Thanks,
>
> Troy
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Bentley
> Sent: Friday, May 13, 2005 2:45 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - RE: Cr/Lf in Dos Report
>
> Troy,
>
> I can't think of a way to do this in RBase itself.
>
> Am I correct in assuming that you wish to create something equivalent to an
> IBM mainframe fixed lenth record. By this I mean that each record (line) is
> the same length ssay 85 characters and that the record is padded with blanks
> to the length of 85 when the last character is < 85.
>
> My favorite text editor "Kedit" from Mansfield Software Group www.kedit.com
> using the proper options can create the file you need.
> --
> Sincerely,
> Jim Bentley
> American Celiac Society
> 266 Midway Dr
> River Ridge LA 70123
> email: [EMAIL PROTECTED]
> Phone: 504-738-6165
>
>
>
>
> -----Original Message-----
> From: Troy Sosamon <[EMAIL PROTECTED]>
> Sent: Mon, 9 May 2005 18:47:53 -0600
> To: [email protected] (RBASE-L Mailing List)
> Subject: [RBASE-L] - Cr/Lf in Dos Report
>
>
> In R:base for Dos 6.5, I need to remove the Cr/Lf that the report writer
> puts at the end of every line of a report.
>
> Is there an easy way to do this?
>
> Thanks,
>
> Troy
>
>