Application Development and Automation 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: 
Read only

Regarding Dataset

Former Member
0 Likes
529

Hi ,

1) Can you please tell me whether we can use DATASET statemnt for checking for a file in background whthether it exists or not.

2) In cae the file does not exixts then how can i create a file and if the file exixts then i want to add some ros in the file.how can i do this?.

3) Is there any way by which i can change the file name using dataset statement

i have to do all the things in background ,nothing is going to be done in fore ground

waiting for your replies

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
504

Everything is possible which you asked here........and this also possible that you are doing R&D on dataset without reading its F1 help.

3 REPLIES 3
Read only

Former Member
0 Likes
505

Everything is possible which you asked here........and this also possible that you are doing R&D on dataset without reading its F1 help.

Read only

0 Likes
504

Can you please let me know the codes b which i can do all this,i have read the help file but i dnt think i got much from it,

if you can please help me ,it will be a great help.

Read only

Former Member
0 Likes
504

Hi Ashish,

1) Can you please tell me whether we can use DATASET statemnt for checking for a file in background whthether it exists or not.

Yes you can use the DATASET statement in background. In fact we use DATASET when we have

problems storing file on the frontend.

You can use OPEN DATASET statement and depending upon the SY-SUBRC value you will understand whether the file exists or not.

2) In cae the file does not exixts then how can i create a file and if the file exixts then i want to add some ros in the file.how can i do this?.

To create a file use OPEN DATASET..... FOR INPUT.

To add lines to the dataset USE OPEN DATASET ..... FOR APPENDING

3) Is there any way by which i can change the file name using dataset statement

I doubt whether you can change the file name. As far as I know the answer is NO.

Regards,

Prakash Pandey