‎2008 Nov 18 4:21 AM
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
‎2008 Nov 18 4:26 AM
Everything is possible which you asked here........and this also possible that you are doing R&D on dataset without reading its F1 help.
‎2008 Nov 18 4:26 AM
Everything is possible which you asked here........and this also possible that you are doing R&D on dataset without reading its F1 help.
‎2008 Nov 18 4:33 AM
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.
‎2008 Nov 18 4:33 AM
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