khmerboi83
Technical User
Hello everyone, I'm a rookie to aspect scripting. I have been reading a lot of the help content and I think I have some basic knowelge on how procom works. I have been given this project to work on for a couple weeks now. We are trying to get all of our Medicare and Medicaid connection automated for upload and download. every morning I create a batch file and upload my claims to Medicare and also download reports. I got the script to have it look in a directory if there are file to upload if not goto next step to look for download file. Now I can't get the downloading part to work. What command do I use when waiting for more than one system prompt message. Here's the script I wrote. Can anyone help.........
proc main
;VARIABLES DECLARED BELOW
string absolutepath
;BEGINS LOGIN TO MEDICARE RR
waitfor "lease Login:^M^J" FOREVER
transmit "123^M"
waitfor "Password?" FOREVER
transmit "ABC^M"
waitfor "Press <RETURN> to continue ->"
transmit "^M"
;AT MAIN MENU
;UPLOADING CLAIMS
absolutepath="L:\RCSYSTEM\Claims\RRMed\Claims\claims.dat"
waitfor "Selection:"
if findfirst "L:\RCSYSTEM\Claims RRMed\Claims\*.dat"
while findfirst "L:\RCSYSTEM\Claims RRMed\Claims\*.dat"
transmit "2^M"
waitfor "**** Select Protocol:" forever
transmit "z"
pause 1
rename $FILESPEC absolutepath
sendfile ZMODEM absolutepath
waitfor "Press <RETURN> to continue" forever
delfile absolutepath
endwhile
endif
;DOWNLOADING CLAIMS
transmit "1^M"
pause 5
waitfor "**** Select Protocol:"
transmit "z"
waitfor "Press Y/N to continue or q to quit"
transmit "y^M"
;IF THERE ARE FILE TO DOWNLOAD IT WILL START HERE
;THEN SYSTEM PROMPT THIS MESSAGE
waitfor "Press <RETURN> to continue"
transmit "^M"
;IF THERE ARE NO FILE TO DOWNLOAD
;SYSTEM PROMPT THIS MESSAGE
waitfor "**** Press q to quit"
transmit "q^M"
;SCRIPT ENDS HERE
;BEGIN TO DAIL UP MEDICARE RR REMITS
DIAL DATA "Medicare RR Remits"
;Waits for successful connection
while $DIALING
endwhile
endproc
proc main
;VARIABLES DECLARED BELOW
string absolutepath
;BEGINS LOGIN TO MEDICARE RR
waitfor "lease Login:^M^J" FOREVER
transmit "123^M"
waitfor "Password?" FOREVER
transmit "ABC^M"
waitfor "Press <RETURN> to continue ->"
transmit "^M"
;AT MAIN MENU
;UPLOADING CLAIMS
absolutepath="L:\RCSYSTEM\Claims\RRMed\Claims\claims.dat"
waitfor "Selection:"
if findfirst "L:\RCSYSTEM\Claims RRMed\Claims\*.dat"
while findfirst "L:\RCSYSTEM\Claims RRMed\Claims\*.dat"
transmit "2^M"
waitfor "**** Select Protocol:" forever
transmit "z"
pause 1
rename $FILESPEC absolutepath
sendfile ZMODEM absolutepath
waitfor "Press <RETURN> to continue" forever
delfile absolutepath
endwhile
endif
;DOWNLOADING CLAIMS
transmit "1^M"
pause 5
waitfor "**** Select Protocol:"
transmit "z"
waitfor "Press Y/N to continue or q to quit"
transmit "y^M"
;IF THERE ARE FILE TO DOWNLOAD IT WILL START HERE
;THEN SYSTEM PROMPT THIS MESSAGE
waitfor "Press <RETURN> to continue"
transmit "^M"
;IF THERE ARE NO FILE TO DOWNLOAD
;SYSTEM PROMPT THIS MESSAGE
waitfor "**** Press q to quit"
transmit "q^M"
;SCRIPT ENDS HERE
;BEGIN TO DAIL UP MEDICARE RR REMITS
DIAL DATA "Medicare RR Remits"
;Waits for successful connection
while $DIALING
endwhile
endproc