I have a automated process that daily starts Procomm and then uses an Aspect script, using the Zmodem protocol to transfer a file elsewhere. Unfortunately the process during that transfer isn't always reliable and I'm hoping someone can help me out as I am very new to Procomm scripting.
While the Zmodem is tranferring the file, the Zmodem UI is displayed with the progress bar and other stats. One of these items says "Transfer Status:" and on occasion it suddenly adds "Aborted" after that in the UI and then jumps back to Procomm where the terminal window displays the string: "500 [232] CDataBuffer::Read Success, Buffer Empty". Then the remote machine sends the original prompt that indicated the system ready for Zmodem to start transfer -- this is always displayed after a transfer is stopped.
My script does this:
while $XFERSTATUS == 1
yield
endwhile
if $XFERSTATUS == 2
;return successful transfer string
else
;return error string
Even if I get that odd "CDataBuffer..." string and the Zmodem states the transfer was aborted, my script always seems to return a success string ($XFERSTATUS == 2). Therefore the remote machine only gets part of the file transferred with an error, but I get success messages from the automated process.
The remote party sees this information:
"Message: FAILURE CODE 034
Description: The Connection was cancelled before conpletion by the remote site. CONNECT:Mailbox received a Function
Management Header (FMH) with codes set to Abort Data Set
(ADS), so the batch is treated as an incomplete batch."
If I have the process re-send that exact file, it eventually transfers just fine, so there isn't anything in the file itself that is causing this.
Do you have any suggestions as to how to capture the "Transfer Aborted" status from the Zmodem and the string "CDataBuffer..." in the Procomm terminal display with my script so I can program this into the script as an error?
While the Zmodem is tranferring the file, the Zmodem UI is displayed with the progress bar and other stats. One of these items says "Transfer Status:" and on occasion it suddenly adds "Aborted" after that in the UI and then jumps back to Procomm where the terminal window displays the string: "500 [232] CDataBuffer::Read Success, Buffer Empty". Then the remote machine sends the original prompt that indicated the system ready for Zmodem to start transfer -- this is always displayed after a transfer is stopped.
My script does this:
while $XFERSTATUS == 1
yield
endwhile
if $XFERSTATUS == 2
;return successful transfer string
else
;return error string
Even if I get that odd "CDataBuffer..." string and the Zmodem states the transfer was aborted, my script always seems to return a success string ($XFERSTATUS == 2). Therefore the remote machine only gets part of the file transferred with an error, but I get success messages from the automated process.
The remote party sees this information:
"Message: FAILURE CODE 034
Description: The Connection was cancelled before conpletion by the remote site. CONNECT:Mailbox received a Function
Management Header (FMH) with codes set to Abort Data Set
(ADS), so the batch is treated as an incomplete batch."
If I have the process re-send that exact file, it eventually transfers just fine, so there isn't anything in the file itself that is causing this.
Do you have any suggestions as to how to capture the "Transfer Aborted" status from the Zmodem and the string "CDataBuffer..." in the Procomm terminal display with my script so I can program this into the script as an error?