× 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.



Out at the testcase FTP site (
ftp://testcase.boulder.ibm.com/as400/fromibm/ApiSamples/ )
are a couple of programs that may do you you need

FixEOL.exe           A 32-bit Windows console application to correct text
                        files which are missing carriage returns (CR) and
have
                        only line feed (LF) characters at the end of the PC
                        file records.  Client Access (and other) file
transfer
                        programs are coded to require both CR and LF
characters
                        to mark the end of a text file record.  This
program
                        will detect if a given input file is missing the CR
                        before the LF.  Optionally the program can create a
new
                        output file with CR/LF pairs.
                        FixEOL will also report statistics for the input
file,
                        the length of the longest line and the total number
of
                        lines will be displayed on the screen.
                        Command line format to scan file only is:
                           FixEOL inputfile
                        Command line format to create an output file is:
                           FixEOL inputfile outputfile [/y]
                               /y indicates to overwrite existing output
file.
                        Errorlevels returned to the OS are:
                            0 - indicates the input file is OK
                           10 - indicates input file is missing CR's
                           20 - fatal error such as a file wasn't found
Convert.zip          VB 5.0 application that can insert CR LF to
                        a "flat" PC file at the specified byte count.
                        (Useful for formating files to work with
                        Client Access Data Transfer)

FixCSV.exe           A 32-bit Windows console application to correct
                        text files which are missing a carriage return and
                        line feed following the last row of data.  This
                        program may be used to circumvent problems
encountered
                        with the Client Access Data Transfer when
attempting
                        to transfer CSV (Comma Separated Variable) format
                        files to the AS/400.  (If the CSV file is missing
the
                        carriage return and line feed after the last row of
                        data, Data Transfer will not transfer the data.
Some
                        PC spreadsheet applications generate CSV files
without
                        the final carriage return and line feed.)

   FindNull.exe         Scans a PC file for embedded Nulls, locates
                        the nulls and optionally replaces them with the
                        specified character.  (Useful for cleaning
                        up PC files for use with Client Access Data
                        Transfer)

-------------------------
 Bryan Dietz
3X Corporation
==========================================================

If you have some flavor of Basic available (including QBasic or Excel
macro language), you might also be able open the file with it and then
loop through the data looking for the LFs and outputting to a new file.
Depending on what the file looks like this isn't always possible, but I've
done it a number of times and when it works it's great.

I'll be happy to provide more info if you like. . . .

midrange-l@midrange.com writes:
>Yeah, that's what I'm attempting to do.  This turned into low priority, so
>it may be a few days before I tackle it again.  Thanks to all who pitched
>in!
>
>- Dan Bale




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.