Openedge 在现有文本文件的开头添加文本
Openedge add text at the beginning of an existing text file
在 xml 文件末尾的追加文本中发现了一些知识库
https://knowledgebase.progress.com/articles/Article/P8379
OUTPUT TO VALUE ("cust.xml") APPEND.
/* Append a new line character to the end of the file */
PUT UNFORMATTED "~n ".
/* Append some text after the new line character */
PUT UNFORMATTED "this is the appended text".
OUTPUT CLOSE.
有没有类似的在开头添加文字的解决方案?或者我必须求助于导入文件并将其重写为新文件?
谢谢
您将不得不阅读并重写它。这是一种方法:
define variable fileBody as longchar no-undo.
copy-lob from file "test" to fileBody.
fileBody = "new first line~n" + fileBody.
copy-lob from fileBody to file "test".
在 xml 文件末尾的追加文本中发现了一些知识库
https://knowledgebase.progress.com/articles/Article/P8379
OUTPUT TO VALUE ("cust.xml") APPEND.
/* Append a new line character to the end of the file */
PUT UNFORMATTED "~n ".
/* Append some text after the new line character */
PUT UNFORMATTED "this is the appended text".
OUTPUT CLOSE.
有没有类似的在开头添加文字的解决方案?或者我必须求助于导入文件并将其重写为新文件?
谢谢
您将不得不阅读并重写它。这是一种方法:
define variable fileBody as longchar no-undo.
copy-lob from file "test" to fileBody.
fileBody = "new first line~n" + fileBody.
copy-lob from fileBody to file "test".