Skip to Content
author's profile photo Former Member
Former Member

RUNNING PROGRAM IN BACKGRUND

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,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Feb 01, 2005 at 02: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 01, 2005 at 02: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2005 at 02:21 PM

    Is your job running on a different server than your online user? Does the other server have the same directory structure?

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.