12-31-2007 11:18 AM
Hi Group!
I am trying to write an error file into UNIX directory using 'OPEN DATASET ERRFILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT'. But unfortunately i am getting a dump as it is giving the subrc 8 and dumping with CX_SY_FILE_OPEN_MODE.
The path looks like /sap/DE1/batch/data/SCM_YM/partfiles/HGMEH011.20071001150344
Is there any special command or way to write the file into UNIX?
Quick response would be of great help.
Suresh
12-31-2007 11:36 AM
Hi Suresh,
Check if you are not using OPEN DATASET twice. It will throw error if file is already open.
Thanks,
Mohaiyuddin
12-31-2007 11:52 AM
No Mohaiyuddin,
I am not using the statement twice,
It happens only once.. the thing is i am just trying to create a new file (with time stamp for every run) with the given name into UNIX.
As per the keyword a new file should be created if it is not there.
the INPUT mode is working perfectly, the problem is with OUTPUT mode only.
Suresh
12-31-2007 7:38 PM
Hi,
Check with your basis if you hav eauthorization to write files in the app.server.
Regards,
Subramanian
01-07-2008 10:03 AM
you can try checking with basis as suggested by Subramanian. But I think in that case error should be CX_SY_FILE_AUTHORITY.
Suresh : Can you try Update Mode just to check if that works.
Regards,
Mohaiyuddin
01-07-2008 3:39 PM
The detailed error is
The file '&FILENAME&' was not opened, or was opened in the wrong mode.
Can you please try to create a new file that does not exist.
then we can check whether you have authorization or not.
OPEN DATASET to a file already opened - in the same internal mode - triggers the exception.
THtas why you just create a file with some rough name ( may be ur name) intially and then check.
bye sasi