karlomutschler
Programmer
On a weekly basis we report that is created in an UNIX.txt format.
This file needs to be converted as follows:
1. from UNIX.txt to DOS.txt
2. trailing blank spaces removed.
How could this file be converted (using Clarion code) into a DOS.txt format and the blank spaces removed.
Info:
The difference between the 2 types of txt.formats is: in the DOS.txt format the rows of data are ended by a CR/LF.
For the conversion from UNIX.txt to DOS.txt 3 scenarios need
to be addressed:
1. IF a CR is found without a LF, a LineFeed is added
2. IF a LF is found without a CR, a CarriageReturn is inserted before it
3. IF the signs are switched around (LF/CR), the signs are ordered correctly as CR/LF.
Then the trailing blank spaces from the specified value needs to be removed:
For example "some text " ==>> "some text".
Once this is done, the data is correctly formated and can be used.
Would you be able to help me in this matter ?
TIA and kind regards
Karlo
This file needs to be converted as follows:
1. from UNIX.txt to DOS.txt
2. trailing blank spaces removed.
How could this file be converted (using Clarion code) into a DOS.txt format and the blank spaces removed.
Info:
The difference between the 2 types of txt.formats is: in the DOS.txt format the rows of data are ended by a CR/LF.
For the conversion from UNIX.txt to DOS.txt 3 scenarios need
to be addressed:
1. IF a CR is found without a LF, a LineFeed is added
2. IF a LF is found without a CR, a CarriageReturn is inserted before it
3. IF the signs are switched around (LF/CR), the signs are ordered correctly as CR/LF.
Then the trailing blank spaces from the specified value needs to be removed:
For example "some text " ==>> "some text".
Once this is done, the data is correctly formated and can be used.
Would you be able to help me in this matter ?
TIA and kind regards
Karlo