10-18-2007 4:43 AM
Can anybody give the differences between Text and Binary modes that are used with Datasets??
10-18-2007 4:45 AM
For Binary Mode
The contents of the file are not structured in lines in the READ DATASET or TRANSFER operations. Instead, they are input or output as a stream. You do not have to specify the IN BINARY MODE addition explicitly.
For Text Mode
If you use this addition, the contents of the file are structured in lines. Each time you use the READ DATASET or TRANSFER statement, the system reads or writes a single line. If the data object to which you are transferring the data is too big, it is padded with spaces. If it is too small, the data record is truncated.
Hope this helps.
ashish
10-18-2007 4:50 AM
Hi
Text Mode means that the records in the file have a carriage return marking the end of each record.
Binary Mode means the file is a string of data.
You can't read a text file in BINARY MODE, or a binary file in TEXT MODE.
<b>Reward if usefull</b>
10-18-2007 7:56 AM
Hi,
<b>Binary mode.</b>in binary mode it opens the file as binary file.Both while reading a binary file
or writing to a binary file,the content transfered is in unchanged form.
it is same both in unicode and in non-unicode programs.
TEXTMODE:
for Text mode, it opens the file as text file. "Encoding " addition is specified
to define how the characters are represented in the txt file.if data type is char and flat, trailing blanks are removed.if datatype si stirng, trailing blanksa are not removed.
in unicode programs, only the content in char type data objects can be read or write into text file and encoding addition must be specified.
we can omit encoding addition for non unicode programs.
TExt mdoe encoding [line feed].
regards,
Sandhya.
rewards points if useful.