Sage 100 - How To Run Visual Integrator from the Command Line

Have you ever wondered about how to automate the process of entering Accounts Receivable invoices into Sage 100? How about uploading Sales Order data while you sleep at night, ready to process by the time you arrive in the morning?

With the Sage 100 Visual Integrator (VI) module, users can automate the import of Accounts Receivable, Sales Order, or other types of data, by running a VI job from the command line. A Visual Integrator job or any other Sage 100 program can run independent of Sage 100, with a Windows task, a batch file, or similar method. This allows a user to run the job after business hours, or several times a day, without anyone having to log in to Sage 100.

Please review the details below for examples and notes regarding the command line structure:

Version 4.xx and above

The following information must be included in the command line:

..\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 myuser mypassword ABC VIWI00 AUTO

Notes:

  • If an argument has no value (for example: if the User Logon has no password), use quotation marks (“”) to hold the arguments in place.
  • The User Logon above refers to the Sage 100 user logon setup in User Maintenance (not the User Code field in User Maintenance).
  • UIState—Set this argument to either UION or UIOFF. This setting specifies if a User Interface exists (for example: a user could receive notification of errors in a message box.)
  • Set the Program Argument to Auto or Manual. The Manual option forces the import job interface to launch, and requires the user to click Accept. Use the Manual option to test your procedure, then use the Auto option once you have verified that the job launches correctly in the Manual option.
  • For batch file command lines, use this example as a model:

F:
CD F:\Version4\Mas90\Home
Pvxwin32.exe .. \Launcher\Sota.Ini ..\SOA\Startup.M4P -ARG DIRECT UION myuser mypassword ABC VIWI00 MANUAL
REM Note we set the current directory to Home first
REM Note we set the program argument to MANUAL initially

  • Any program run with a command line on version 4.0+ must exist as a Task within the Sage 100 Role-based security system. You must add Visual Integrator “legacy” jobs (jobs not using a Business Framework Table as the Primary Table) to the Jobs Menu before running the job with a command line. Jobs using a 4.0+ Table as the Primary Table are automatically added to the Jobs Menu (for example General Ledger jobs).
  • After you add the task to the system tasks files, use Role Maintenance to grant access to the new menu for the Visual Integrator Jobs menu. The user logon specified on the command line above must belong to a role that has access to this new task or menu item.

Version 3.x

Note: For more information, see the Visual Integrator Help screens within Sage 100 (formally known as MAS 90 or MAS 200).

Create a Shortcut Icon on the Windows Desktop with the following command line in the Target field (Note: Do not include parentheses):

X:\XXX\MAS90\HOME\PVXWIN32.EXE ..\LAUNCHER\SOTA.INI ..\SOA\MAS90 -ARG (Program Name) W 0 DIRECT (Run Mode) (Company Code)

Example:
X:\XXX\MAS90\HOME\PVXWIN32.EXE ..\LAUNCHER\SOTA.INI ..\SOA\MAS90 -ARG VIWI01 W 0 DIRECT AUTO ABC

Notes:

  • Replace X:\XXX with the actual path to the Sage 100 directory. For Sage 100 Advanced (MAS 200), this corresponds to the Sage 100 directory of the Sage 100 Advanced Server Installation, not the Sage 100 directory on the workstation.
  • Replace (Program Name) with the file name of the Sage 100 Program or VI job that you are running. The program name of a VI job is found in the upper right corner of the ‘Import Job Maintenance’ or ‘Export Job Maintenance’ screen.
  • Replace (Run Mode) with MANUAL, AUTO or DISPLAY. See the VI Help screens for details regarding each mode.
  • Replace (Company Code) with the Sage 100 Company Code you are importing to or exporting from.
  • Enter the command line in upper case as in the example above. Some switches, such as Run Mode, fail to execute if entered in lower case.

Sage 100 Advanced (Sage MAS 200):

For Sage 100 Advanced the path to the Sage 100 directory used in the shortcut properties corresponds to the Sage 100 directory of the Sage 100 Advanced Server Installation, not the Sage 100 directory on the workstation.

In the VI job, enter the path to the Import File/Export File as it appears from the WORKSTATION, and uncheck the ‘On Host’ option.