The Sleep Feature has been added to correct an issue in which the PC Distance Server (SRV32.exe) does not reliably reconnect to the AS/400 after an IPL or power down.

To activate the Sleep Feature, you need to send a message to the PC mileage server (SRV32.exe).

Included in your ALKWIN Library is a CL program called “queue”. For queue to work you must have alkwin in your library list. You may have to compile the queue if you do not have the program – use the command WRKOBJPDM, with 12 on QCLSRC and 14 on queue.

The syntax for queue is

Queue<space>(’SP60’) where 60 is the number of seconds that you want the mileage server to sleep for.  (NOTE: Queue is case sensitive; the SP has to be in caps.)

To put the mileage server to sleep for a 3-hour period before an IPL 

Run this command (with ALKWIN in your library list):

Call alkwin/queue<space>(‘SP10800’)

Test the Sleep Feature

  1. On your mileage server, set up your screen so you can watch the mileage server’s Server Log (SRV32.exe). To bring up the Server Log, click on the Bart’s Windows pull-down menu, or press ALT-W and choose Display server Log.                                                                                                               
  2. From a green screen, run PC*MILER and run a route from 10001 to 90009 to make sure that it is working. Watch the PC*MILER-AS/400 Server’s server log. You should see those ZIP codes show up in a line that starts out “input=…” This test is to ensure that you are working with the correct mileage server, and that it is working properly.                                                                                                                                                                   
  3. Exit the green screen PC*MILER and send a 60-second sleep command: Call queue<space>(‘SP60’)   press <ENTER>.                                                
  4. Watch the server log to see that it catches the sleep message. Finally, the mileage server should wake up and reconnect with the mileage server.                                                     
  5. Go back to the green screen PC*MILER and send another mileage request to test that the re-established connection is working properly. If it is working now, you can use this feature before your IPLs or power downs.                                                                                                                             

You can use the Work with Job Schedule Entries (WRKJOBSCDE) command to set up an automatic process.

Be sure to put it to sleep for a long enough period of time. If Bart (srv32.exe) wakes up too early (before the AS/400 is back up) it won’t be able to connect. Also be sure to leave enough time between sending the sleep command and starting the IPL or power down.