delete a line in a UNIX file [RESOLVED]

Question: Hello everybody,

I need to delete a line in a file like this :

OPEN DATASET v_fichierencours
FOR UPDATE IN TEXT MODE ENCODING NON-UNICODE.
DO.
READ DATASET v_fichierencours into l_string.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
IF l_string(5) = '00000'.
* delete the line which is readed ??
endif.
ENDDO.
CLOSE DATASET v_fichierencours.

I need to recreate all the file without the line or there is a way to delete directly the line in the file ?

Kind regards,
MaxFO

Answer:
Hi !
You don't delete the line in the original file (keep it unchanged !), you skip the ones meeting your condition, and you TRANSFER (see F1) the "good" lines to a new file.
Regards,
Eric.

Answer:
Hi !

I have do it.. I copy the data of the file in an internal file, delete the bad line in internal table.
Delete the old file and recreate the new without bad line.

It's seem there is not others ways...

Thanks,

MaxFO
Copyright ?2007 - 2008 www.jt77.com