DATASET_CANT_CLOSE 错误号 32 "Broken Pipe"
DATASET_CANT_CLOSE error number 32 "Broken Pipe"
我在 SAP ABAP 中遇到错误,显示 DATASET_CANT_CLOSE 错误编号 32(管道损坏)。问题是:什么程序触发了这种错误?
据我所知,此错误是由以下原因触发的:
CLOSE DATASET dset
但我无法重现该错误,因为我不知道是什么程序触发了此类错误。
这是我使用的代码:
method GENERATE_TXT_FILE.
DATA :
lwa_data TYPE t_line,
lv_param TYPE sxpgcolist-parameters.
"Upload File to Server
*Open Dataset
OPEN DATASET im_file_name FILTER 'dos2ux'
FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
CLEAR lwa_data.
LOOP AT it_data INTO lwa_data.
CATCH SYSTEM-EXCEPTIONS file_access_errors = 4
OTHERS = 8.
TRANSFER lwa_data-lines TO im_file_name.
ENDCATCH.
IF sy-subrc <> 0.
CLEAR lwa_data.
EXIT.
ENDIF.
CLEAR lwa_data.
ENDLOOP.
*Close Dataset
CLOSE DATASET im_file_name.
正如我通过后台作业日志调查的那样,当前服务器 运行 后台作业似乎尚未映射到文本文件文件夹。解决方案是将服务器重新映射到文本文件夹。
您正在使用 FILTER
extension to OPEN DATASET
- 这可能是一个 巨大的 安全问题,并且会增加可移植性问题的负载,除非您知道自己在做什么,但是这不是问题所在。来自文档:
When the statement OPEN DATASET is executed, a process is started in
the operating system for the specified statement. When the file is
opened for reading, a channel (pipe) is linked with STDOUT of the
process, from which the data is read during file reading. The file
itself is linked with STDIN of the process. When the file is opened
for writing, a channel (pipe) is linked to STDIN of the process, to
which data is passed when writing. The output of the process is
diverted to this file.
在您的情况下,过滤器命令可能决定退出 - 请参阅 this answer。为什么很难调查 - 您可能必须浏览各种系统日志才能找到答案。如果问题确实是一些未映射的网络文件夹,您可以尝试切换到 UNC 路径。
我在 SAP ABAP 中遇到错误,显示 DATASET_CANT_CLOSE 错误编号 32(管道损坏)。问题是:什么程序触发了这种错误?
据我所知,此错误是由以下原因触发的:
CLOSE DATASET dset
但我无法重现该错误,因为我不知道是什么程序触发了此类错误。
这是我使用的代码:
method GENERATE_TXT_FILE.
DATA :
lwa_data TYPE t_line,
lv_param TYPE sxpgcolist-parameters.
"Upload File to Server
*Open Dataset
OPEN DATASET im_file_name FILTER 'dos2ux'
FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
CLEAR lwa_data.
LOOP AT it_data INTO lwa_data.
CATCH SYSTEM-EXCEPTIONS file_access_errors = 4
OTHERS = 8.
TRANSFER lwa_data-lines TO im_file_name.
ENDCATCH.
IF sy-subrc <> 0.
CLEAR lwa_data.
EXIT.
ENDIF.
CLEAR lwa_data.
ENDLOOP.
*Close Dataset
CLOSE DATASET im_file_name.
正如我通过后台作业日志调查的那样,当前服务器 运行 后台作业似乎尚未映射到文本文件文件夹。解决方案是将服务器重新映射到文本文件夹。
您正在使用 FILTER
extension to OPEN DATASET
- 这可能是一个 巨大的 安全问题,并且会增加可移植性问题的负载,除非您知道自己在做什么,但是这不是问题所在。来自文档:
When the statement OPEN DATASET is executed, a process is started in the operating system for the specified statement. When the file is opened for reading, a channel (pipe) is linked with STDOUT of the process, from which the data is read during file reading. The file itself is linked with STDIN of the process. When the file is opened for writing, a channel (pipe) is linked to STDIN of the process, to which data is passed when writing. The output of the process is diverted to this file.
在您的情况下,过滤器命令可能决定退出 - 请参阅 this answer。为什么很难调查 - 您可能必须浏览各种系统日志才能找到答案。如果问题确实是一些未映射的网络文件夹,您可以尝试切换到 UNC 路径。