× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Booth,

> Does anyone have a simple idea how to keep this unwanted
>CRLF off our target records?

A couple of ideas:

 - Try record structure mode by using the subcommand STRUCT R (if
scripting from the PC, you may need to use QUOTE STRUCT R if the PC
client does not recognize the STRUCT command).  This will retain the
record sturcture (including trailing blanks) and delimit the records
by a x'FF01' instead of a CR/LF.  If your PC software doesn't hiccup
on the x'FF01', you just need to put this in your script prior to the
GET or PUT subcommands.

 - Pass the PC file with the CR/LF through a filter to strip out the
CR/LF sequence after the FTP completes.  The PC program to do this
would be trivial using something like AWK or Perl.  In fact, here is
the source to do it in AWK:

{ printf( "%s",$0 ) }

This sets up an automatic loop to read each "line" of text into
variable $0, then perform a formatted print where the format is a
simple string.  Using a formatted print suppresses the addition of a
CR/LF on output, so the net effect is repeating the input but without
the CR/LF.  In a batch file, you'd use this with redirection of stdout
so the "print" was to another file.  (EG,  "StripCRLF input.txt >
output.txt")

I can compile the source above and send it to you as either a DOS
executable or Win32 executable.  One caveat: the source above will
retain trailing blanks if they existed, but your input file would need
to have fixed length records or your output would be garbage.  I can
pad or truncate lines to a predetermined standard width if you want
just by adding the size to the format string above.  Or I can accept a
command line argument to set a fixed width for the output.  But then
it is no longer a 1-lliner. 

If STRUCTure Record doesn't do it for you, and nobody else has a
better suggestion, tell me if you need the output width adjusted or
just a simple strip of the CRLF, and I'll send you a program to do it.

Doug
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.