Thanks Jim,

The thing is that there are already hundreds of existing programs
that work correctly because of the "bug" in Universe and if there was a way
to make jBASE bug compatible with UV in this case it would be the perfect
solution.

The files do come into the Unix environment in different ways (not
necessarily ftp). Even then, some of the ftp'ed files have checksums that
would not match unless they were transmitted byte for byte from the source
system. The idea is that third party systems and procedures must be left as
they are as much as possible otherwise the testing would become a much much
bigger effort.

Adding a tr -d for every channel still means there are several different
places to change.

On 29 March 2010 19:12, Jim Idle <[email protected]> wrote:

>
>
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On Behalf
> > Of MarcoM
> > Sent: Monday, March 29, 2010 4:50 AM
> > To: jBASE
> > Subject: READSEQ and CR/LF on Unix
> >
> > Is there a way to tell jBASE to discard the CR (CHAR(13)) at the end
> > of the line if the file being processed was ftp'ed from DOS in binary
> > mode?
>
> Well, err, don't ftp a text file in binary mode?
>
> >
> > I have hundreds of programs to migrate from UV to jBASE with
> > constructs like this:
> >
> > LOOP WHILE READSEQ LINE FROM FILE
> > *  do something with the LINE
> > REPEAT
> >
> > Im changing in jBASE to this:
> >
> > CR = CHAR(13)
> > LOOP
> >    READSEQ LINE FROM FILE ELSE BREAK
> >    CHANGE CR TO "" IN LINE
> > *  do something with the LINE
> > REPEAT
> >
> > UV will give the same output regardless of whether the file is
> > terminated with LF or CRLF and Im wondering if jBASE has a switch
> > (perhaps an environment variable or some IOCTL option) to achieve the
> > same.
>
> Well, do you have to do it like this?
> Firstly, why send text files to UNIX with a CRLF terminator?
> Secondly, if you cannot fix this (which is your real problem), then fix the
> line endings after the files are received, all at once with the tr -d
> command.
> Thirdly, if you feel you need to change the programs, then just wrote a
> bash script to find all the programs with OPENSEQ and insert the IOCTL
> directly after it with sed. UNIX is essentially a text manipulation system
> you know - it behooves you to know how to use it. Personally, I would
> probably use awk to 'fix' those programs if I was not able to fix the actual
> problem at source, which is the transmission.
>
> The other _actual_ problem is that UniVerse is wrong to behave like that of
> course; that isn't what UNIX does with text. ;-) Perhaps though, jBASE
> should be bug compatible with UniVerse if that is the emulation that is
> configured.
>
> Finally, please read the posting guidelines and remember to include
> information about your operating systems and versions of jBASE and so on.
>
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
>
>
> Jim
>
>
>
> --
> Please read the posting guidelines at:
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
>
> IMPORTANT: Type T24: at the start of the subject line for questions
> specific to Globus/T24
>
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>
> To unsubscribe from this group, send email to jbase+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

-- 
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

To unsubscribe from this group, send email to jbase+unsubscribegooglegroups.com 
or reply to this email with the words "REMOVE ME" as the subject.

Reply via email to