INPUT FILE IN A MEMPTR. ERROR 140 ** Pipe to subprocess has been broken

rovira

New Member
I have a procedure which tranfer a file from server to local machine.
I do it with a memptr parameter.

DEFINE INPUT PARAMETER myFile AS CHARACTER NO-UNDO.
DEFINE OUTPUT PARAMETER memptrParameter AS MEMPTR NO-UNDO.
DEFINE OUTPUT PARAMETER cError AS CHARACTER NO-UNDO.

FILE-INFO:FILE-NAME = myFile NO-ERROR.
myFile = FILE-INFO:FULL-PATHNAME NO-ERROR.

IF myFile = ? OR myFile = "" THEN
DO:
cError = "Error FILE".
RETURN.
END.

SET-SIZE(memptrParameter) = FILE-INFO:FILE-SIZE.
INPUT FROM VALUE(myFile) BINARY NO-MAP NO-CONVERT.
IMPORT UNFORMATTED memptrParameter.
INPUT CLOSE.

This program usually works fine but it crash when file is so heavy (more than 100MB). Then an error 140 appears in the Appserver log file:

** Pipe to subprocess has been broken. (140)

I have read the KBase ID: P112720 and I hve tried the solution:
Slow the Progress session down by adding, for example, a PAUSE 1 statement after OUTPUT THROUGH.
But it hasn´t work.

Could anyone help me???
Thanks
 

TomBascom

Curmudgeon
I don't think that that kbase really applies to your situation.

What version of Progress is this? Have you considered using a LONGCHAR instead of a MEMPTR?
 

TomBascom

Curmudgeon
9.1D is ancient, obsolete and unsupported. I'll bet you knew that ;) You should upgrade. OpenEdge, obviously, provides LONGCHAR and lots of other advantages. But if, for some unfathomable reason, you feel like you are stuck on v9 then at least get to 9.1E04 which is the very last service pack ever for v9 (it is more than 5 years old now, but v9 itself is more than 10 years old) and which contains many bug fixes and enhancements since 9.1D. I can't say for sure that your issue is addressed there but it is worth a try (and it is painless).
 
Top