Multiple OS-COMMAND calls from procedure are conflicting

Status
Not open for further replies.
Z

zarose

Guest
I have a procedure which is writing a file, emailing it using mail_files, and then an OS-DELETE statement to delete the file after it is sent. The call to the external procedure which calls mail_files or the actual OS-COMMAND itself are asynchronous. The OS is AIX 6 and the version of Progress is 102B. Here's an example below:

Here is the main procedure:

DEFINE STREAM outStr.
OUTPUT STREAM outStr TO foo.txt.

FOR EACH customer NO-LOCK:
EXPORT STREAM outStr customer.
END.
RUN sendmail.p.
OS-DELETE foo.txt.


Here is sendmail.p:

DEFINE STREAM stMail.
OUTPUT STREAM stMail THROUGH
"mail_files -f foo@bar.com -t me@here.com -s\"subject\" -b~\foo.txt\").
PUT STREAM stMail "Email body".
OUTPUT STREAM stMail CLOSE.


In testing it on my own, I can't replicate the error. Is Progress trying to "optimize" something here? Is there anything to cleanly make it do what I want without hard-coding a pause?

Continue reading...
 
Status
Not open for further replies.
Top