Starting with Version 25, logging has been added to the pcmmv.dll and to the pcmsockxx.exe layers in addition to the existing logging at the AS400.exe (Bart) and pcmsrv32.dll/pcmserve.ini levels.
AS400.exe connects to pcmmv.dll, which connects to the version-specific instances of pcmsockXX.exe, which in turn connect to their version-specific instances of pcmsrv32.dll.
Logging should be used only during troubleshooting as the files can grow quite large.
AS400.exe Logging
Logging is turned on within the PC Distance Server (AS400.exe ((Bart)) by clicking the File drop-down menu and choosing AS400 Control then Log to File and then a choice of Overwrite, Append, or Verbose.
- Overwrite will create a new file called “as400.log” in your ALKMVS or ALKToll folder. Use Overwrite when troubleshooting data is being received on the AS400 side.
- Append will create a new as400.log file or start logging on the bottom of an existing file. Use Append for issues with AS400.exe crashes.
- Verbose will create a new as400.log file or start logging on the bottom of the existing file and will include PC to AS400 communication return codes and low level internal trip information. Use the Verbose setting for troubleshooting PC to AS400 communication failures.
Pcmmv.dll logging is turned on in your pcmmv.ini file. Add the following to your pcmmv.ini in Notepad (Pcmmv.ini is typically found in C:\Alkmvs or C:\Alktoll):
[Logging]
Enable=0 off 1 on
File=C:\temp\Pcmmv.txt <=Folder must exist
Append=1 to append, 0 will overwrite
Use Append=1 for troubleshooting crashes.
Pcmmv.dll only reads pcmmv.ini at startup, you will have to restart your application after making the INI file edits.
PcmsockXX.exe logging is turned on with command line parameters. Make a copy of your StartMVS.bat file, then rename the file “StartLogging.bat”.
Edit StartLogging.bat in Notepad as follows:
Change V25’s line from:
Start Pcmsock25.exe PC_MILER 8250
to:
Start Pcmsock25.exe PC_MILER 8250 LOG_BASIC .\V25log.txt
or
Start Pcmsock25.exe PC_MILER 8250 LOG_BASIC C:\PcmLogs\V25log.txt <=Folder must exist
Other options are:
- Add a fourth parameter of ‘Append’ to be used to troubleshoot crashes: Start Pcmsock25.exe PC_MILER 8250 LOG_BASIC C:\PcmLogs\V25log.txt APPEND
- Include communications and not just routing and distance information, using LOG_ADVANCED instead of LOG_BASIC: Start Pcmsock25.exe PC_MILER 8250 LOG_ADVANCED C:\PcmLogs\V25log.txt APPEND
To run on logging for older versions, you will need to copy …\pmw250\tcpip\pcmtcp.dll, listex.dll, and pcmsock25.exe to the older PmwXXX\Tcpip folders. After copying Pcmsock25.exe, rename the copy to PCMSockXX.exe to match the version you are replacing. For example, if you are copying pcmsock25.exe to …\pmw220\tcpip, rename this copy of pcmsock25.exe to pcmsock22.exe.
You will need to close the existing instances of PcmsockXX.exe before starting them in logging mode. Failure to close the existing instances will result in ‘bind failed’ errors.
Pcmsrv32.dll logging is turned on in your pcmserve.ini files.
[Logging]
Enable=0 off 1 on
File=C:\temp\V25log.txt <=Folder must exist
Append=1 to append, 0 will overwrite
Use Append=1 for troubleshooting crashes.
Pcmsrv32.dll only reads pcmserve.ini at startup, you will need to restart pcmsockXX.exe after making the INI file edits.