CAUTION: Sage support can't assist with third-party products, hardware, report customizations, or state and federal tax questions. Refer to our Scope of Support for more info. Contact your Sage business partner, network administrator, or accountant for assistance.
How to create a short-cut or Windows batch file to run a Visual Integrator import job, export job, or other Sage 100 task outside the program
*** Sage 100 Advanced and Premium only, or Sage MAS 200 versions 4.40.0.4 and higher ***
The Sage 100 Application Server must be used to run the Visual Integrator jobs (or other such tasks) externally from a workstation client using a batch (.bat) file so that the ODBC path to the Sage 100 server is not modified, causing Sage 100 to fail to launch certain tasks.
First there is information needed from Import or Export Job Maintenance to create the Shortcut, Batch or new APP item properly later in thes instructions
- Open Import Job Maintenance or Export Job Maintenance depending on the job that will be used for this new shortcut or batch file
- Select the Job Name or create a new Job Name for this VI Job
- Note the Job Name given
- Proceed with opening the Import or Export Job
- Look to the upper right corner of the Import or Export Job Maintenance screen where it says Compiled File Name
- Note the Compiled File Name given (VI Program Name) i.e. VIW###
After completing steps below to add to APPS tab of Application Server Configuration is will be necessary for all users to exit Sage 100 to complete the creation of the APP. Application Server Configuration can be used to stop the program if running as an application on the Server tab then restarted. If running Sage 100 as a Service then use Windows Services to stop the service and restart.
Next the APPS tab in Application Server Configuration will be used to create a new link to the Job to be ran. This in conjunction with the Batch or Shortcut that will be used together when executing the job.
How to create the new item on the APPS tab of Application Server Configuration program on the Server
How to create Batch command string or Shortcut command string. Pathing used in the string will be based on the user's Workstation installation path not the server's
<s
There are 3 lines in the batch file. Use the following steps to create the batch file:
Open Notepad in Windows
Right-click Sage 100 ERP shortcut on workstation and select Properties
Copy the entire path from the Start in directory and paste into Notepad. This will be Line 2
Insert CD followed by a space at the beginning of Line 2 so it looks similar to this:
CD "C:\Sage\MAS 200 Client\Version4\MAS90\HOME"
For Line 1 - Enter the Drive letter followed by a colon that is found in Line 2. Our first 2 lines should look similar to this:
C:
CD "C:\Sage\MAS 200 Client\Version4\MAS90\HOME
To create the 3rd line, copy the entire path in the Target folder. It should look similar to this:
"C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.exe" ../launcher/sota.ini *Client -ARG "SERVER1" "10000" "MAS 200"
Make the following adjustment to Line 3: insert -hd after pvxwin32.EXE". Line 3 should now look similar to this:
"C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.exe" -hd ../launcher/sota.ini *Client -ARG "SERVER1" "10000" "MAS 200"
Replace the Application name with the name used in VI and on the APPS tab of Application Server Configuration. This is listed after the Port number. Line 3 should now look similar to this:
"C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.EXE" -hd ../launcher/sota.ini *Client -ARG "SERVER1" "10000" "VIIMPORTJOBNAME"
The remainder of Line 3 needs the following:
-ARG= DIRECT UION UserLogon Password Company VIWxxx AUTO.
No Spaces are used here -ARG=DIRECT
VIWxxx=compliled VI name found in upper right corner of job in Maintenance
UserLogon=Sage 100 user logon that has permissions to run VI Job
Company= Company Code to be used for VI Job
Line 3 should now look similar to this:
"C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.EXE" -hd ../launcher/sota.ini *Client -ARG "Server Name" "Port" "App Name" -ARG= DIRECT UION John Doe ABC VIWI00 AUTO
The batch file should now be complete and look similar to the following:
C:
CD "C:\Sage\MAS 200 Client\Version4\MAS90\HOME"
"C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.EXE" -hd ../launcher/sota.ini *Client -ARG "Server Name" "Port" "App Name"-ARG= DIRECT UION John Doe ABC VIWI00 AUTO
Save the Notepad file with an extension of .bat to create the batch file. Double-click the batch file to execute the file.
Actual Example String:
C:
CD "C:\Sage\Sage 100 Workstation\MAS90\Home\"
"C:\Sage\Sage 100 Workstation\MAS90\Home\pvxwin32.exe" -hd ../launcher/sota.ini *Client -ARG "CAI514866" "10000" "SOINVOICEIMP" -ARG=DIRECT UION admin password ABC VIWI00 AUTO
*** Sage 100 Standard only, or MAS 90 versions 4.00 and higher, or MAS 200 versions 4.00 to 4.40.0.3 ***
Create a command line with the following information:
Note: Enter all text in the case indicated. Some arguments are case sensitive.
..\MAS90\Home\Pvxwin32.exe ..\launcher\sota.Ini ..\SOA\Startup.M4P -ARG DIRECT (UI State) (User Logon) (Password) (CompanyCode) (Program Name) (Program Argument)
Example:
..\MAS90\Home\Pvxwin32.exe .. \Launcher\Sota.Ini ..\SOA\Startup.M4P -ARG DIRECT UION user1 password01 ABC VIWI00 AUTO
Notes:
Additional information
When running a Visual Integrator job, the source file (name and location) is designated in Import Job Maintenance. It is not possible to specify the source file in the shortcut.