02-01-2005 2:18 PM
I'm running a program that should create a file with 'opendataset for output...' and it create the file.
When I run the same program in background the file is not created.
Same user then same right!
do you have any idea to help me?
regards,
02-01-2005 2:24 PM
Actually this should work....
are you sure that it is the same path and can be reached from the application server (are there more than one application server involved?
For analysis purposes I think there is an option of the open dataset which gives the reason back why a file could not be created (messages if I remember right)
You could add this and see if and why it fails...
You can also restart the job via sm37 in debug mode (by clicking on the job and put JDBG in the ok_code field) if this does not cause to much load on your system.
Christian
02-01-2005 2:21 PM
Is your job running on a different server than your online user? Does the other server have the same directory structure?
02-01-2005 2:25 PM
Hi charles,
Thanks for your answer I was thinking to this problem too...
But let's suppose there are different application server, how should I correct my program...
I'm looking in transaction AL11 the possible directories and maybe the one I'm using is only for one application server.
What do you think about that ?
How then should I solve this ? Use another directory ?
Message was edited by: STEPHAN KAMINSKI
02-01-2005 7:01 PM
Stephan,
If it is a problem with the program running on the wrong server you can correct it by setting up the job in SM36 instead of just executing it from the selection screen. On the first screen you can type in your target server.
Becky
02-01-2005 9:55 PM
Hi Stephen,
Typically in a multi-server environment, load balancing takes care of distributing the background jobs to different application servers. So, there needs to be a file handling strategy in place. Here is how it works.
1. Create a file structure for all your requirements.
2. Mount this file directory struture on all the application and database servers. OS people will be doing this. By doing this, you will remove the dependency on which server program runs. Also, any file can be created/changed/deleted from ABAP, irrespective of which server it is run on.
3. Create logical filenames so that all programs can use them as a standard. This will also help in centralizing the changes to the directory structure. Suppose, you want to point a logical file directory to a different physical directory, you do it in one place not in every program(if you don't use logical files).
Hope this helps,
Srinivas
02-01-2005 2:24 PM
Actually this should work....
are you sure that it is the same path and can be reached from the application server (are there more than one application server involved?
For analysis purposes I think there is an option of the open dataset which gives the reason back why a file could not be created (messages if I remember right)
You could add this and see if and why it fails...
You can also restart the job via sm37 in debug mode (by clicking on the job and put JDBG in the ok_code field) if this does not cause to much load on your system.
Christian
02-01-2005 2:26 PM
Christian,
I tried this in fact!
I planned the job it didn't work! I runned it online (se38) and it did work.
maybe there are different directories!
02-01-2005 2:39 PM
To check if it is a problem with different server
try following:
go to sm51 - click on the server on which the background job was started (and failed). Call se38 and try it again. If it fails in foreground it is a problem of the application server.
Christian
02-01-2005 2:29 PM
Hi,
->pls control sy-subrc
OPEN DATASET dsn FOR output MESSAGE msg.
IF sy-subrc <> 0.
WRITE / msg.
STOP.
ENDIF.
I'll guess it's an auth.-problem
regards Andreas
02-01-2005 2:36 PM