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

New User: sending files, changing protocols

Status
Not open for further replies.

eclecticNancy

Programmer
May 18, 2007
19
0
0
US
I need to send a logon script using ASCII,
then send a datafile using ZMODEM,
then send a logout script using ASCII.

When doing this manually, I click on the status bar at the bottom of the PCPlus window to change protocols before sending each file.

I've tried to script this using the following (and have also inserted variations of waitfor and pause commands):
sendfile ASCII logon.txt
sendfile ZMODEM datafile.dat
sendfile ASCII logout.txt

The logon.txt file does get sent ok, but the protocol doesn't change to zmodem so nothing further works.

Thanks for any suggestions...
Nancy
 
Try:

Code:
sendfile ASCII logon.txt
while $XFERSTATUS                ; Pause script while transferring.
      yield                         ; Yield processing
   endwhile

sendfile ZMODEM datafile.dat
while $XFERSTATUS                ; Pause script while transferring.
      yield                         ; Yield processing
   endwhile

sendfile ASCII logout.txt
while $XFERSTATUS                ; Pause script while transferring.
      yield                         ; Yield processing
   endwhile
 
Thanks so much for your help! Appears to have worked, will try it out on Tues.
 

Unfortunately, I'm still not getting the zmodem file to send out.

The logon file (ascii) seems to send fine and I get a "Y" reply, then some chars starting with **B start repeating (indicates logon is successful).

Then the zmodem file fails to 'send'

I tried using pause and waitfor to see if that would help... the script definitely waits long enough before trying to send the zmodem file, but "nothing happens"...

Then the logout file is successfully sent and a smooth exit.

Any more ideas on sending that datafile (zmodem)?

 

Thank you... and "oops I think I found the problem" in the GFile variable. (Thank you usermsg - sorry for not checking that earlier.) Will have another chance to try it out on Fri.

sendfile ASCII L1File
while $XFERSTATUS
yield
endwhile

waitfor "Y" forever
waitfor "**B" 10
waitfor "**B" 10


sendfile ZMODEM GFile
while $XFERSTATUS
yield
endwhile

pause 3

sendfile ASCII L2File
while $XFERSTATUS
yield
endwhile

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top