Page 2 of 2

Posted: Mon Jul 10, 2006 3:50 am
by ArndW
The error cannot, as Ray has already stated, be caused in that line. Unless you are using one of the two argument variables as parameters to some routine which returns them as a file pointer or a subroutine indirection variable. Are you 100% certain that your source and object are in Sync?

Posted: Mon Jul 10, 2006 8:15 am
by Krazykoolrohit
Hey try this code to eliminate the CR characters

Trim(Ereplace(input.Link, Char(13): Char(10) ,"",-1,0))

and change your delimiter to a value that is not expected in your input file stream. the windows character map can be of your help. Its in programs -> Accesories -> system tools. choose something thats nevere gonna come in your input stream.

Guru,
Please point out isssues with my approach if any. I have used this approach in my job.

Posted: Mon Jul 10, 2006 8:45 am
by kris007
Krazykoolrohit wrote:

Trim(Ereplace(input.Link, Char(13): Char(10) ,"",-1,0))
The problem with this derivation is it removes all the CRLF characters in a string. Which inturn, converts any string with 2 or more lines into a single line which I don't want to happen. I only want to trim those extra CRLF's at the end of the string. Ken's solution worked beautifully. I have already tested it. I was just wondering why Ray's solution didn't work and looking into it.

Posted: Tue Jul 11, 2006 1:46 pm
by NBALA
Hi Krish,

Seems you are retrieve from SQL server and the output data is stored in sequential ie flat file and you are tranfering (via FTP?) to the unix server.

When tranfering (FTP?) set the transfer mode as ASCII, then you won't get the <CR><LF> character.( You can view this by opening the file using vi editor , at the end of each line ^M will be there if the file is transfered using Binary mode).

Hope this may help.

Regards
-NB

Posted: Tue Jul 11, 2006 1:53 pm
by kris007
I am on Windows :wink:

And I am loading the data into an Oracle table. Not FTP'ing.

Posted: Tue Jul 11, 2006 2:05 pm
by kcbland
Folks, the issue is that a text block contains trailing CR/LF that the poster wishs "trimmed". It has nothing to do with anything other than prettying up a column.

As a piece of etiquette, it probably behooves anyone responding to a poster to read every reply, not just the last one. Then, replies will not side-track the discussion. This entire post is a lesson on how not reading the original problem can generate a lot of replies that muddy the waters.

Posted: Tue Jul 11, 2006 2:26 pm
by kris007
I totally agree with Ken. :)