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: 

Doubts on DATASET OPEN statments

Former Member
0 Kudos

Hi,

I have one question. In one program the statement

OPEN DATASET filename IN TEXT MODE FOR INPUT ENCODING DEFAULT.

is using to open the file. with out closing the file and one statement

OPEN DATASET filename IN TEXT MODE FOR INPUT ENCODING DEFAULT

is again opening the same file and it is giving the error "DATASET reopen".

But before the unicode conversion the code was running fine after the system to unicode environment it is giving error.

So my question is : can we use two open statement on one file with out closing the first open statement on the file in UNICODE environment.

can u please help me.

Thanks,

Venkatesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi Venkatesh,

Earlier if you have opened the dataset with one statement and used another open dataset statement and then use the close dataset statment it was working fine because the close dataset statement used in the last will close all the previous open dataset statment ..but after the unicode conversion it will not support the same and you have to close the previous dataset that is open and then proceed..

Regards,

Santosh

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Why are you trying to open it twice. Just open it once.

REgards,

Rich Heilman

Former Member
0 Kudos

hi,

if you want a open file that is already in open state then you have to closed it first and then open that file...

Former Member
0 Kudos

hi Venkatesh,

Earlier if you have opened the dataset with one statement and used another open dataset statement and then use the close dataset statment it was working fine because the close dataset statement used in the last will close all the previous open dataset statment ..but after the unicode conversion it will not support the same and you have to close the previous dataset that is open and then proceed..

Regards,

Santosh

0 Kudos

Thanks santosh..

Former Member
0 Kudos

comment out 2nd open dataset statement.its not required to open file more than once.

regards

srikanth

Message was edited by: Srikanth Kidambi

abdul_hakim
Active Contributor
0 Kudos

hi

why are opening twice..itz not advisable and required..

Cheers,

Abdul Hakim