Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

open data set from Text mode to Binary mode

Former Member
0 Kudos

Hello All,

In a program i am using the command

    OPEN DATASET file FOR OUTPUT IN TEXT MODE
    ENCODING NON-UNICODE IGNORING CONVERSION ERRORS.

Now i want to change this open data set to binary mode. I mean to change the command like below.

OPEN DATASET file FOR OUTPUT IN BINARY MODE.

when i do this. the output in the file is totally changing. I mean previously i have some text now i have some diffrent characters.

How can i use this command with out change in the output as previous output. Please tell me the changes and why i have to do.

 OPEN DATASET file FOR OUTPUT IN BINARY MODE.

Regards,

Lisa.

Message was edited by:

Lisa Roy

2 REPLIES 2

Former Member
0 Kudos

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.

If you are changing the mode, then you must be supplied with a file in the new mode.

Former Member
0 Kudos

Just to close