on 10-04-2005 12:16 PM
Hi all,
I have inbound file that has to be moved to another directory path in the unix server once data can be loaded using open data set.
How is the way to move a file from one directory path to another ?
My inbound file in \usr\in\original\data.txt, wanna move the file data.txt to \usr\in\backup\data.txt.
thanks alots.
alia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA: v_filepht LIKE FILENAME-FILEINTERN, "Physical file for p_fnam2
* Open the file in application server
OPEN DATASET v_filepht FOR OUTPUT IN TEXT MODE.
IF sy-subrc <> 0.
MESSAGE s185 WITH v_filepht. " File opening error
LEAVE LIST-PROCESSING.
ENDIF.
LOOP AT i_logfile INTO w_logfile.
TRANSFER w_logfile TO v_filepht.
CLEAR w_logfile.
ENDLOOP.
IF sy-subrc = 0.
WRITE:/ text-055, v_filepht, text-056. " File successfully created
ELSE.
WRITE:/ text-057, v_filepht. " Error creating file
ENDIF.
* Closing the file
CLOSE DATASET v_filepht.
Try this one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.