"Unable to create a session object" error during VI job run from command line?

SOLVED

Hello,
I'm receiving the following error message when I attempt to run a VI job from command line..

"Unable to create a session object.  The workstation may have been corrupted.  Re-Install Workstation Setup"

1.  I've uninstalled, restarted and reinstalled workstation multiple times.

2. here's my batch file..

Z:
CD Z:\Home
Pvxwin32.exe z:\Launcher\Sota.Ini z:\SOA\Startup.M4P -ARG DIRECT UION <user> <password> SB1 VIWI04 AUTO

Here are some comments..

1. this is my first attempt at running a vi job from command line so i haven't had access with other vi jobs
2. the Z location is the server so each of these references are on the server but i'm running this from a workstation

Some questions

1. Should the user be entered as the "user logon" or "user code"
2. How do i get around this "create a session object" error

Thanks!

Mike

  • 0

    i tried switching UION to UIOFF and the error message went away and the batch completed but the data doesn't appear to be imported.  I'm guessing there are other errors that are there but are being suppressed with UIOFF.

  • 0
    verified answer

    I followed the instructions for setting up a command line job for version 4.40.04 and higher and this worked for me..

    Sage MAS 200 only, 4.40.0.4 and higher

    The MAS 200 Application Server must be used to run the VI jobs (or other such tasks) externally from a workstation client using a batch (.bat) file so that the ODBC path to the MAS 200 server is not modified, thus causing MAS 200 to fail to launch certain tasks.

    All users must exit and the Application Server or Service must be stopped

    Add the Job to Menu by clicking the ‘Menu’ button in ‘Import Job Maintenance’ for the Job and follow the Wizard.

    Select Programs / Sage Software / Application Server Configuration.

    Click the Apps tab > click the New button.  The screen New - App Props for Server: "SAGE" will open

    Enter a name for the application under App Name (for this example “Import”)

    Note: The 'App Name' will be referenced in the batch file to execute the VI Job or similar task.

    Enter the following values

    ProvideX EXE: leave <Default> Server INI: Enter ..\Launcher\Sota.ini

    Lead Program: Enter StartUp.M4P

    Leave the Extra CMD Options and Arguments fields blank Start-In Directory: Enter the path to the ..\MAS90\Home folder from the MAS 200 server's perspective. (Ex.  C:\Sage Software\MAS 200\Version4\MAS90\Home)

    Init Window: Select Hidden

    In the Options section, ‘only Allow Client Arguments’ must be checked, the rest of the options must be unchecked.

    Click ‘Ok’ to close the New - App Props for Server: "SAGE" screen

    Press Apply button to save the new Application Name settings in Application Server Configuration.

    Warning:  If there are users in the system they must exit, Applying the settings will disconnect all sessions.

    The following format must be used to run the VI Job or External task from the workstation, using the Application Server Application.

    C:\<MAS 200 Workstations Path>\Home\Pvxwin32.exe -hd ..\launcher\sota.ini *Client -ARG "Server" "Port" "App Name" -ARG= DIRECT UION User Password CompanyCode JobName DISPLAY Batch file example:

    Example: "C:\Sage Software\MAS 200 Client\Version4\MAS90\Home\Pvxwin32.exe" -hd ..\launcher\sota.ini *Client -ARG "ACCTSERVER" "10000" "IMPORT" -ARG= DIRECT UION JohnDoe MyPass ABC VIWI00 DISPLAY

    Note: When creating a Windows shortcut the "Start  In" directory is the client "Home" directory

    Example: "C:\Sage Software\MAS 200 Client\Version4\MAS90\Home"

    Note: When creating a batch file or script the command line must be preceeded by a change directory to Home.

    Example: CD "C:\Sage Software\MAS 200 Client\Version4\MAS90\Home"