Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Procomm Plus issues. "Transfer Aborted: Initialization Failed"

Status
Not open for further replies.

walnuts312

Programmer
Nov 2, 2007
6
US
I'm having an issue with our procomm plus 4.8.

We use Magic Runtime and Procomm Plus to send our orders here at the store. The computer that we use for ordering had crashed, so I've had the task of bringing it back up.

Everything is running properly except procomm. When I send an order, magic creates files that procomm is to send to the warehouse. When procomm sends the order, it dials in, begins the file transfer, but nothing ever transmits. I see an error message at the bottom of the screen that states:
"Transfer Aborted: Initialization Failed"

Any Input would be appreciated.

-Walnuts
 
Check that you'r using the right transmition protocol
for file transfer. X-modem, Z-modem are some of the more
common protocols.
It must be the same as the receiving part is using...

HTH
 
I have gone and checked all of that. We have it set up identical to our other store. Z-modem with ANSI BBS, ect.

I do have an update as well. When running the script to send my order. It starts sending the order, the order does the same thing as before, where it gets to the file transfer and sits on zero percent until it times out the connection. But if I cancel it before it times out, send the file again, cancel it, then start and stop the script, it will send the order through. And I recieve my conformation #. I think I'm getting closer.

Thanks
-Walnuts
 
Here is the aspect script file. I think the issue is in the part titled "Transmit the order using zmodem". It dials up as coded, but I never see it transmit the z^m part until i start doing it manually. I don't know if its just coded slightly wrong, or what. It does seem like its waiting for the ">" like its told to, but it never gets displayed and the dial-up connection times out.

Well, thats what I have for now
Thanks
-Paul

;
;************************************************************
;*** PROCOM PLUS FOR WINDOWS ASPECT SCRIPT FOR RS6000.ASP ***
;************************************************************
;
;This script interfaces with the order system to allow multiple
;files to be sent to the RICS/6000 using Procomm Plus for Win95/NT.
;
;

;************************************************************
;* GLOBAL VARIABLES *
;************************************************************
string DataPath = "c:\pcplus\data\"
string szFileName = "c:\pcplus\data\aceordr.ord" ; File to transmit
string Cmd
string C2
string Display1
string FileName = "confirm.oms"
;************************************************************

proc main
chdir DataPath
set dnldpath DataPath
set upldpath DataPath

;*****************************************************
;* Delete the old confirmation files
;*****************************************************
Cmd = "del c:\pcplus\data\*.oms"
DOS Cmd

;*****************************************************
;* Select the order you want to transmit
;*****************************************************

;. if sdlgfopen "File View" "c:\pcplus\data\*.ord*" SINGLE szFileName
if not isfile szFileName ; Make sure file exists
errormsg "File doesn't exist!"
endif
;. endif

if FAILURE
usermsg "Your order was not transmitted!"
goto DONE
endif
;*****************************************************
;* Transmit the order using Zmodem
;*****************************************************

commandmode on ; Enter command mode
transmit "AT^M" ; The modem dial command
waitfor ">"
transmit "z^M" ; For Zmodem
waitfor ">"
transmit "z^M" ; For Zmodem
waitfor "Please transmit your order"
sendfile zmodem szFileName ; Send order to system
waitfor "Press any key to log off immediately.^M^J"
transmit " "

;*****************************************************
;* Display the confirmation screen
;*****************************************************

Display1 = "copy c:\pcplus\data\*.oms c:\pcplus\data\confirm.oms"
DOS Display1
waitfor "Goodbye."
pause 7
fileview FileName
C2 = "move /Y c:\pcplus\data\aceordr.ord C:\pcplus\back\aceordr.ord"
DOS C2
DONE:
pwexit
endproc
 
When you say you see "Transfer Aborted: Initialization Failed" at the bottom of the screen, is this in the blue area of the Procomm window or the status bar?

I would try adding the below commands just after the sendfile command so that your script is paused during the Zmodem transfer and doesn't jump ahead to the next commands to soon:

iStatus = $XFERSTATUS
while iStatus == 1
iStatus = $XFERSTATUS
endwhile
if iStatus == 2
;Transfer successful, continue with script execution
elseif iStatus == 3
;Transfer failed, perform error handling
endif

 
Yes, the error message is in the status bar.

Hey, thanks for the code. Should help a bunch.

The program still stalls out just after it dials the modem.
It dials the modem right after the program starts up, then I see it display "Procomm Plus Ready" 2 times. Then it does nothing. So maybe it is in the code for selecting the order, or maybe its because the selecting the order is written before it is coded to transmit the order (which contains the commands to dial up the modem, and transmit.)
I'm going to tinker around with the way it selects the order.

Oh, and thanks for that website. Very helpful

Thanks
-Paul
 
I'm not clear on this part of the script:

commandmode on ; Enter command mode
transmit "AT^M" ; The modem dial command
waitfor ">"
transmit "z^M" ; For Zmodem
waitfor ">"
transmit "z^M" ; For Zmodem


Commandmode indicates you are dialing manually instead of through Procomm, but no worries. However, the next line doesn't seem complete unless you stripped the phone number out to not publish it here (just wanted to confirm that). Also, you have transmit "z^M" twice when I would expect that only once, but I am not familiar with the system you are dialing.

 
This is exactly how it was written. It was originally written by the old computer tech we had (he has since been arrested on fraud. long story. he deserved it.) Its very possible these statements he has written are incomplete. He liked to take shortcuts on everything. It seems to me that it never gets to execute the z^m unless i do it manually and then stop and restart the script. It just sits there waiting for > to be written by procomm before it will complete.

Thanks
-Paul
 
You might try running the steps manually with Procomm's Script Recorder on and see if it comes up with a different script sequence you can put into your existing script. Here is some more information on that feature:

If you are trying to create a script that automates communications with a remote system and the text is relatively constant, you can make the task easier by using the Script Recorder to create your script. To enable the Script Recorder, select the Tools | Scripts | Start Recorder menu item. Procomm Plus will now monitor all incoming data and your outgoing responses to that data. Start performing the tasks (keyboard-based only!) that you want Procomm Plus to record. Once done, select the Tools | Scripts | Stop Recorder menu item. You will be prompted to save your recorded script; some editing of the script may be necessary. Be aware that if you dialed an entry from the Connection Directory, then your recorded script will be attached to that entry unless you change the value at the bottom of the Save As dialog. When you view your script, you will see that it is composed of waitfor/transmit commands. If all looks well, compile your script and see if it executes as expected. To make a recorded script more extensible, you can take a recorded script and replace some of the recorded strings with variables so that a more general script can be created.

 
I can't use the recorder to code my own. I need to run magic first, then magic runs procomm. It autostarts the script for sending the order throught procomm. If I don't go through magic, then magic never creates the files to send, and the script is aborted. And If I don't have those files, I don't think it would record correctly. (i could be wrong. I'm new to aspect.)

And I realized why I can get the script to execute properly if I click the send file button, Then stop the "non transfering" transfer, and then Stop and start the script.

When I finally stop and start it, I have a > cursor on my screen left over from the above process (transmitted to me from the computer I'm communicating with.) So I guess my new question is, is there a way to send some sort of wake up signal to the other computer that might cause it to send me the > like its supposed to upon establishing connection?

Thanks
-Paul
 
On the waitfor ">" commands in your script, does it take a bit for those to show up? I'm wondering if your waitfor commands are timing out (the default timeout value is 30 seconds) and then continuing on before the system is where the script thinks it is. Perhaps try increasing the timeout value by doing something like this:

waitfor ">" 120

which will give you up to two minutes for the system to finish processing the last command the script issued.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top