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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I can not get Script to execute sendfile after the number is dialed..

Status
Not open for further replies.

KKUB

Programmer
Feb 6, 2004
14
0
0
US

I am unable to get the procomm software to upload file after it connects to the number. The script just stops.

Below is the code I used. Help . . .

;* CHASE.WAS *
;* Copyright (C) 2000 - 2010 Ametek Aerospace. *
;* All rights reserved. *
;* *
;* This program will trasmitt PP file to Chase Manhatten Bank *
;* *
;*****************************************************************************
;*****************************************************************************
;* *
;*****************************************************************************
proc main
dial DATA "Chase"
while $DIALING
yield
endwhile
if $CARRIER
;perform operations here once connected...
waitfor "rocomm Plus Ready!^M^J"
transmit "^M"
waitfor "Hoót Náíe:  "
transmit "UserID^M"
waitfor "Enter logon id: "
transmit "Password^M"
waitfor "Enter password: "
transmit "^M"
waitfor "The current File Transfer Protocol is ZMODEM."
transmit "013004TranF.txt^M"
transmit "u"
transmit "z"
transmit "013004TranF.txt^M"
pause 2
sendfile ZMODEM "013004TranF.txt"
while $XFERSTATUS
yield
endwhile
endif
 
Do you see the Zmodem file transfer dialog appear? Do all of the prompts from the remote system appear as expected? Since you have four transmit statements in a row, you may be sending commands faster than the system can handle. You might try adding a small pause or a waitfor command after each transmit statement to make sure the script and the remote system are in sync. You might also try adding this code to your script for the sendfile (you'll need to declare the integer variable iStatus at the beginning of your script):

sendfile ZMODEM
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

aspect@aspectscripting.com
 
No, the Zmodem transfer dialog box doesn't appear. The program just pauses.
 
The script works only stoping after [waitfor "The current File Transfer Protocol is ZMODEM."] line in the code. Afterward no other line of code works.
 
Try shortening the string the waitfor command is to something shorter, such as "Protocol is ZMODEM." However, the waitfor command in your existing script should timeout after 30 seconds and move on to the next command, transmitting "013004TranF.txt^M"


aspect@aspectscripting.com
 
[;Chase Bank Transmit P.P. File Script for Procomm Plus
;*****************************************************************************
;* *
;* CHASE.WAS *
;* Copyright (C) 2000 - 2010 Ametek Aerospace. *
;* All rights reserved. *
;* *
;* This program will trasmitt PP file to Chase Manhatten Bank *
;* *
;*****************************************************************************
;*****************************************************************************
;* *
;*****************************************************************************
#define NOTRANSFER 0
#define TRANSFERRING 1
#define TRANSFEROK 2
#define TRANSFERNOTOK 3
proc main
integer iXFer
dial DATA "Chase"
while $DIALING
yield
endwhile
if $CARRIER
;perform operations here once connected...
waitfor "Procomm Plus Ready!^M^J"
transmit "^M"
waitfor "Hoót Náíe:  "
transmit "USERID^M"
waitfor "Enter logon id: "
transmit "PASSWORD"
waitfor "Enter password: "
transmit "^M"
waitfor "The current File Transfer"
pause 2
; transmit "u^M"
; pause 1
; transmit "z"
; pause 1
transmit "013004TranF.txt^M"
sendfile ZMODEM "013004TranF.txt"
pause 2
iXFer = $XFERSTATUS
while iXFer==TRANSFERRING ; Pause script while transferring.
iXFer = $XFERSTATUS ; Reads the current status and resets $XFERSTATUS to real-time transfer position
yield ; Yield processing
endwhile
endif

endproc]

I made the changes you suggested and the script still stops running after line [ waitfor "The current File Transfer" ]
The Script run iCON (RUNNING MAN) Stops completely.
 
Does the script stop immediately at the waitfor command? Try inserting the line:

usermsg "test"

just before and after the waitfor line in question. You should get two popup messages if all is working well.

I just noticed in your script that you are sending the userid and password before the prompts for those values. Is the machine logging in successfully?


aspect@aspectscripting.com
 
[;Chase Bank Transmit P.P. File Script for Procomm Plus
;*****************************************************************************
;* *
;* CHASE.WAS *
;* Copyright (C) 2000 - 2010 Ametek Aerospace. *
;* All rights reserved. *
;* *
;* This program will trasmitt PP file to Chase Manhatten Bank *
;* *
;*****************************************************************************
;*****************************************************************************
;* *
;*****************************************************************************
#define NOTRANSFER 0
#define TRANSFERRING 1
#define TRANSFEROK 2
#define TRANSFERNOTOK 3
proc main
integer iXFer
dial DATA "Chase"
while $DIALING
yield
endwhile
if $CARRIER
;perform operations here once connected...
waitfor "Procomm Plus Ready!^M^J"
transmit "^M"
waitfor "Hoót Náíe:  "
transmit "USERID^M"
waitfor "Enter logon id: "
transmit "PASSWORD"
waitfor "Enter password: "
transmit "^M"
waitfor "The current File Transfer"
pause 2
; transmit "u^M"
; pause 1
; transmit "z"
; pause 1
transmit "013004TranF.txt^M"
sendfile ZMODEM "013004TranF.txt"
pause 2
iXFer = $XFERSTATUS
while iXFer==TRANSFERRING ; Pause script while transferring.
iXFer = $XFERSTATUS ; Reads the current status and resets $XFERSTATUS to real-time transfer position
yield ; Yield processing
endwhile
endif

endproc]

I made the changes you suggested and the script still stops running after line [ waitfor "The current File Transfer" ]
The Script run iCON (RUNNING MAN) Stops completely.
 
I tested with the usermsg"test" and the message did display
I moved the user message down in the code to
[sendfile ZMODEM "013004TranF.txt] and still the message displayed. Help. . .
 
What is the directory the file referenced in the sendfile command is located in? Since there is no path information, the script will look in the download directory specified in Procomm's Setup dialog. If the file is not located there, then you will need to put the fully-qualified path to the file in the argument of the sendfile command.


aspect@aspectscripting.com
 
I beleive there was a crupt dll in the program. I uninstalled , then re-installed and now it works great.
Thanks for All your help. KKUB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top