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!

Still having a problem ending a old host script at a certain time!!. 1

Status
Not open for further replies.

papollo

Programmer
Oct 19, 2001
71
0
0
US
Here is the situation:

We have the standard Host script (The one supplied by Procomm)
Awaiting a incoming file.
At 7:30am we want to end the Host script and start another script that sends a file after that completes (About 3 minutes) we want to restart the Host script.

This is what I have done with (KNOB) help.

1)
I added the logic to end the Host script at 7:30am.

proc main
string HostPath
integer iYear, iMonth, iDay, iHour, iMin, iSec
while 1
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
if iHour == 07
if iMin == 30
pwexit
endif
endif
fetch ASPECT PATH HostPath ;get current ASPECT path
addfilename HostPath "HOST\_HOST" ;add the file name to the path
execute HostPath ;run the main host script
endwhile
endproc

2)
At 7:31am the window scheduler starts another script that sends a file.

3)
At 7:35am the window scheduler starts the Standard Host script again and this runs until 7:30am

Problem is in the Host Script!!!!

It runs great the first time, but after that it never exits the script.

I have run debug on it and stepped thru and the time variables are working but the pwexit only works once.
I am a real novice with the Aspect language!!!
Why is that???

Thanks.


 
So when the host script is launched the second time it does not close at 7:30 AM the next day? I would not think you would want these lines in the script (or at least inside the while loop) since it will cause additional copies of the host script to launch while the current session is still open.

fetch ASPECT PATH HostPath ;get current ASPECT path
addfilename HostPath "HOST\_HOST" ;add the file name to the path
execute HostPath ;run the main host script

aspect@aspectscripting.com
 
Knob:

You are correct it does not close the second time.

Are you saying, take those lines out of the loop?

If so, I would want to execute those lines first then the while loop that checks for the time.

Thanks
 
Is anyone logged into the host script at 7:30 AM during the second run? I can't think of any reason the script will not exit during the second execution otherwise.

I'm not certain where these three lines are from:

fetch ASPECT PATH HostPath ;get current ASPECT path
addfilename HostPath "HOST\_HOST" ;add the file name to the path
execute HostPath ;run the main host script

as I do not see them in the original host script. If you have the scheduler running the host script, then you should not need these lines I believe.

aspect@aspectscripting.com
 
Knob:

Maybe I am not being clear.

Those three lines are in the original Procomm supplied HOST script the script. I did not put those in the script

Are they not used to set the dir path and execute _HOST script???

These are manual steps we are currently doing.

At 7:30am a co-worker clicks the exist button on the host script.

Once that script has ending.

He clicks on the script pull down arrow and selects the script that was send the file.

Once that is done.

He clicks on the script pull down arrow and restsrts the HOST script again.
 
Is the script you posted the entirety of your script (in other words, you have a separate script instead of a modified host script)? If so, is this the script you run initially to launch the host script?

aspect@aspectscripting.com
 
Yes, the script I displayed in my first post is the script that is intially run and launches the _HOST script.

 
You will need to modify the Host script itself to have it close at 7:30. The script you have written will only close the session of Procomm that it is running under, but it will not close sessions that are launched later.

It looks to me like you modified the host.was files instead of subs.was. Host.was is just the loader for the overall Host script, while you need to make the change in the "guts" of the Host script where it is running most of the time.

You can see how to modify the Host script to do this on the following page:


aspect@aspectscripting.com
 
Knob:

I will make the recommanded changes to the Host script.

Let you know how it went.

Thanks for answering my endless qesutions on this issue.


thank you.
 
Knob:

Ok
1. I backed up the Host Directory
2. I made the changes to the SUBS.WAS script.
3. recompiled the _HOST.WAS

I recieved a compile error:

Error C523 Line 198: Error opening script file: RIPDLT.INC

I searched the C: drive and could not find RIPDLT.INC.
The only reference to RIPDLT.INC in the _Host Script is the following line #198.

#include "RIPDLT.INC" ; HOST's Local RIP rountines

Thanks
 
Do you have version 4.8 of Procomm or an older version?

Send me an email (so I can get your address) and I will send you a copy of the file.


aspect@aspectscripting.com
 
Knob:

I be sending you a email shortly.
My email address is papollonia@hotmail.com
Subject will be:
Still having a problem ending a old host script at a certain time!!.
 
Apparently, it looks like not all of the source files for the host scripts were placed on the CD (I had errors compile _host.was and _hostutl.was from a new install of 4.7). I'll send you the version 4.8 host files later today (I need to perform an install on another computer to make sure I'm sending you the original, unmodified files). For the most part, I expect the version 4.7 and 4.8 host scripts to operate in the same manner with one exception. That difference can be found on the link I previously posted ( ).

aspect@aspectscripting.com
 
Knob:

I look forward to receiving the file.

Thank you very much.
 
Knob:

It works!!!!!!!!!

Thanks again for all your help.

Thank
 
Glad to hear it. In case you're curious about the missing files, version 4.6 and version 4.7 were basically the same product, but 4.6 was a subset to 4.7 (no web browser, no email or new client, no remote control app, maybe a couple other thigns as well). The host scripts were modified so that the non-4.6 functionality was not referenced (this was mostly the graphical Ripset screens), and some files were not needed in that version any longer. What must of happened then is that those files were also deleted from the version 4.7 install.

aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top