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!

Need aspect script to automatically transfer files.

Status
Not open for further replies.

rajco

Vendor
Apr 8, 2003
3
US
I need to update for procomm plus 4.8, a script that works with DOS procomm, and I have a working pcplus .asp version. I dont know how so I need someone to do it for me.
A copy of the script follows, but basically, here is what it does...

Automated logon to procomm plus v4.8 host - user name and password

Check for and delete (on host) a possible existing file c:\pcplus\clm\bcsclm.dat (this may not be necessary with zmodem)

Upload file c:\bcs\bcsclm.zip to host - c:\pcplus\bcsclm.zip

Shell and Run SECUREID.EXE on host (exists in the c:\pcplus directory)

Download file c:\host\rsp\bcsrsp.zip

Logoff, hangup, and exit.

Thanks for your help...



; BCS.ASP - Customer script file for sending claims to BCS HOST
;
; To compile this script, while in the \PCPLUS directory type "ASPCOMP BCS.ASP"
; at the DOS prompt. The generated run-time script file is named BCS.ASX.
;
; - - - - - - - - - - - - - - - - - - - - - - -
;
PROC MAIN
;
ASSIGN S5 "Error Sending Claims file - ABORTING..."
ASSIGN S6 "Error Receiving Response file - ABORTING..."
;
; - - - - - - - - - - - - - - - - - - - - - - -
;
;<< dial, connect, and loggon to Host
CLEAR
DIAL &quot;1&quot; ;Dial BCS Host
WAITFOR &quot;First name:&quot;
PAUSE 1
TRANSMIT &quot;SAM^M&quot; ;send first name
WAITFOR &quot;Last name:&quot;
PAUSE 1
TRANSMIT &quot;KORNEY^M&quot; ;send last name
WAITFOR &quot;Correct (Y/N)?&quot;
PAUSE 1
TRANSMIT &quot;Y&quot; ;send Y - Yes
WAITFOR &quot;Password:&quot;
PAUSE 1
TRANSMIT &quot;MENOT^M&quot; ;send password
PAUSE 1
;
;<< Delete possible existing BCSCLM.ZIP file from previous bad comm session
CLEAR
TRANSMIT &quot;S&quot; ;send S - DOS Shell
PAUSE 1
TRANSMIT &quot;IF EXIST C:\PCPLUS\CLM\BCSCLM.ZIP DEL C:\PCPLUS\CLM\BCSCLM.ZIP^M&quot; ;delete batch zip file
PAUSE 1
TRANSMIT &quot;EXIT^M&quot; ;exit DOS shell
PAUSE 1
;
;<< Send Zip'd file containing Claim file & ID file
CLEAR
TRANSMIT &quot;U&quot; ;send U - Upload
WAITFOR &quot;choice?&quot;
PAUSE 1
TRANSMIT &quot;Z&quot; ;send Z - ZMODEM protocol
WAITFOR &quot;File name?&quot;
PAUSE 1
TRANSMIT &quot;BCSCLM.ZIP^M&quot; ;claims/id filename
WAITFOR &quot;Description:&quot;
PAUSE 1
TRANSMIT &quot;CLAIM FILE^M&quot; ;description
PAUSE 1
CLEAR
SENDFILE ZMODEM &quot;BCSCLM.ZIP&quot; ;send claims/id file
IF NOT SUCCESS ;if un-successful, display msg, try again
CLEAR
MESSAGE S5
GOTO ABORT
ENDIF
;
;<< Use DOS shell to determine who customer is, process batch zip file
CLEAR
PAUSE 1
TRANSMIT &quot;S&quot; ;send S - DOS Shell
PAUSE 1
TRANSMIT &quot;SECUREID^M&quot; ;identify customer, rename clm/rsp files
PAUSE 6 ;allow time for SECUREID.EXE to finish
TRANSMIT &quot;EXIT^M&quot; ;exit DOS Shell
PAUSE 1
;
;<< Receive Zip'd file containing response file
CLEAR
TRANSMIT &quot;D&quot; ;receive D - Download
WAITFOR &quot;choice?&quot;
PAUSE 1
TRANSMIT &quot;Z&quot; ;receive Z - ZMODEM protocol
WAITFOR &quot;File name?&quot;
PAUSE 1
TRANSMIT &quot;\PCPLUS\RSP\BCSRSP.ZIP^M&quot; ;Response Filename
PAUSE 1
CLEAR
GETFILE ZMODEM ;receive Response zip file
IF NOT SUCCESS ;if un-successful, display mssg
CLEAR
MESSAGE S6
GOTO ABORT
ENDIF
;
;<< Logoff, hangup, and exit
ABORT:
PAUSE 2
TRANSMIT &quot;G&quot; ;send G - logoff
PAUSE 1
HANGUP ;hangup the phone
PAUSE 1
HANGUP ;hangup again to be sure!
QUIT ;Exit PCPLUS
;
ENDPROC

 
I have made a few subtle changes to the above script and was able to compile it with PW V4.8. Don't know if it will work as I cannot test it. The changes were as follows;
[ol]
[li]Removed ASSIGN statements and used Global string variables[/li]
[li]Changed Dial &quot;1&quot; to the following
DIALNUMBER DATA &quot;12345678&quot;
WHILE $DIALING
YIELD
ENDWHILE[/li]
[li]Changed IF NOT SUCCESS statements to IF FAILURE statements[/li]
[li]Changed MESSAGE statements to USERMSG statements[/li]
[/ol]

Following is the modified script. Save it as a &quot;.was&quot; file and compile it using ASPCOMP for PW5.

Code:
; BCS.WAS - Customer script file for sending claims to BCS HOST
;
; To compile this script, while in the Procomm Plus Programs
; directory type &quot;ASPCOMP BCS.WAS&quot; at the DOS prompt. 
; The generated run-time script file is named BCS.WAX.
;
; - - - - - - - - - - - - - - - - - - - - - - - 
;
PROC MAIN
;
S5 = &quot;Error Sending Claims file  -  ABORTING...&quot;
S6 = &quot;Error Receiving Response file  -  ABORTING...&quot;
;
; - - - - - - - - - - - - - - - - - - - - - - - 
;
;<< dial, connect, and loggon to Host
   CLEAR
   DIALNUMBER DATA &quot;12345678&quot;                          ;Dial BCS Host           
   WHILE $DIALING
      YIELD
   ENDWHILE
   WAITFOR &quot;First name:&quot;                  
   PAUSE 1  
   TRANSMIT &quot;SAM^M&quot;              ;send first name
   WAITFOR &quot;Last name:&quot;                  
   PAUSE 1  
   TRANSMIT &quot;KORNEY^M&quot;                ;send last name
   WAITFOR &quot;Correct (Y/N)?&quot;                  
   PAUSE 1  
   TRANSMIT &quot;Y&quot;                      ;send Y - Yes
   WAITFOR &quot;Password:&quot;                  
   PAUSE 1  
   TRANSMIT &quot;MENOT^M&quot;              ;send password
   PAUSE 1  
;
;<< Delete possible existing BCSCLM.ZIP file from previous bad comm session
   CLEAR
   TRANSMIT &quot;S&quot;                      ;send S - DOS Shell
   PAUSE 1  
   TRANSMIT &quot;IF EXIST C:\PCPLUS\CLM\BCSCLM.ZIP DEL C:\PCPLUS\CLM\BCSCLM.ZIP^M&quot;       ;delete batch zip file
   PAUSE 1  
   TRANSMIT &quot;EXIT^M&quot;                 ;exit DOS shell        
   PAUSE 1
;
;<< Send Zip'd file containing Claim file & ID file
   CLEAR
   TRANSMIT &quot;U&quot;                      ;send U - Upload
   WAITFOR &quot;choice?&quot;                  
   PAUSE 1                               
   TRANSMIT &quot;Z&quot;                      ;send Z - ZMODEM protocol
   WAITFOR &quot;File name?&quot;                  
   PAUSE 1                               
   TRANSMIT &quot;BCSCLM.ZIP^M&quot;           ;claims/id filename 
   WAITFOR &quot;Description:&quot;
   PAUSE 1                               
   TRANSMIT &quot;CLAIM FILE^M&quot;           ;description
   PAUSE 1
   CLEAR
   SENDFILE ZMODEM &quot;BCSCLM.ZIP&quot;      ;send claims/id file 
   IF FAILURE                        ;if un-successful, display msg, try again
      CLEAR
      USERMSG S5
      GOTO ABORT
   ENDIF
;
;<< Use DOS shell to determine who customer is, process batch zip file
   CLEAR
   PAUSE 1  
   TRANSMIT &quot;S&quot;                    ;send S - DOS Shell
   PAUSE 1  
  TRANSMIT &quot;SECUREID^M&quot;           ;identify customer, rename clm/rsp files
   PAUSE 6                        ;allow time for SECUREID.EXE to finish
   TRANSMIT &quot;EXIT^M&quot;               ;exit DOS Shell 
   PAUSE 1
;
;<< Receive Zip'd file containing response file                          
   CLEAR
   TRANSMIT &quot;D&quot;                    ;receive D - Download
   WAITFOR &quot;choice?&quot;                  
   PAUSE 1  
   TRANSMIT &quot;Z&quot;                    ;receive Z - ZMODEM protocol
   WAITFOR &quot;File name?&quot;               
   PAUSE 1  
   TRANSMIT &quot;\PCPLUS\RSP\BCSRSP.ZIP^M&quot;         ;Response Filename
   PAUSE 1
   CLEAR
   GETFILE ZMODEM                  ;receive Response zip file            
   IF FAILURE                      ;if un-successful, display mssg
      CLEAR
      USERMSG S6
      GOTO ABORT
   ENDIF
;
;<< Logoff, hangup, and exit                                             
ABORT:
   PAUSE 2
   TRANSMIT &quot;G&quot;                       ;send G - logoff
   PAUSE 1
   HANGUP                             ;hangup the phone
   PAUSE 1
   HANGUP                             ;hangup again to be sure!
   PWEXIT                             ;Exit PCPLUS
;
ENDPROC
 
mrnoisy,

please email me rajco@westxs.net

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top