2007 Dec 27 7:32 AM
Hi,
What is difference between TEXT mode and BINARY mode? In TEXT mode what is "ENCODING DEFAULT".
OPEN DATASET wl_filename FOR INPUT
IN TEXT MODE ENCODING DEFAULT.
OPEN DATASET wl_filename FOR INPUT
IN BINARY MODE .
2007 Dec 27 7:53 AM
Hi vishnu,
1. files like .TXT files are considered to be text,
and other files like .EXE . DOC etc are binary files.
2. In text files, after each line, there are two
internal binary characters
one for line feed and another one for newline.
3. But, we don't have any meaning for it,
when we view such files in notepad, for eg.
Hence, to only get the understandable content,
we should open such TXT files, in text mode.
(we can also open them in binary mode,
but we will get two extra characters after each line,
and such two extra characters are meaningless
for interpreting the text)
4. In binary mode, each byte by byte is considered,
without any meaning.
regards,
amit m.
2007 Dec 27 8:28 AM
Hi Amit,
For the text mode we use encoding default that is it supports all languages.
since in binary mode it need not support any other languages
so we need not use encoding default ...
Regards.
Sana.
2007 Dec 27 8:39 AM
hi,
1. text mode means the output will come as line by line.
2. binary mode means , output will come as character by characer and in this we can create spaces, commas, symbols also