Sage 100

 View Only
Expand all | Collapse all

I have a customer on Sage Advanced 2015. We would

Jane Cavanaugh

Jane Cavanaugh04-20-2017 14:38

Jeff Schwenk

Jeff Schwenk04-20-2017 15:05

  • 1.  I have a customer on Sage Advanced 2015. We would

    Posted 04-18-2017 10:25
      |   view attached
    I have a customer on Sage Advanced 2015. We would like to create a batch file to run a VI export job nightly. According to the attached article, we have to use the Application Server to run the batch file. Is that true?

    Attachment(s)

    pdf
    How_to_create.pdf   543 KB 1 version


  • 2.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-18-2017 10:29
    Yes and No? I have used Task Scheduler to run a basic batch file. The problem you run into there is the pvxwin32 session gets stranded and uses a license, and after so many days, all the licenses are used up and no one can log in. So the work around is to create a batch file to kill any open pvx tasks shortly after the VI Job is done, mine is set for 1 hour after the VI Job (also.. using it as a service so as not to kill the actual application server). I have not ever been able to get the application server instructions you attached to run a batch to work reliably, but I haven't put too much effort into it either.


  • 3.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-18-2017 10:33
    Those steps have worked for Advanced for me. I've had some stuck sessions like @MichelleForsey mentioned, but it's been very rare.


  • 4.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-18-2017 11:21
    I've never used the Sage 100 Appl Serv for this. I've always just created a .bat file and then used Windows Task Scheduler. If however you can upgrade them, you can leverage the Sage 100 Task Scheduler in L/M to schedule VI Jobs - although I haven't had the opp to use it myself as of yet.


  • 5.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-18-2017 13:10
    @BrettZimmerman, did the batch file look like the examples in the document? I keep getting an Error 12, File in use error.


  • 6.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-18-2017 15:49
    For Advanced / Premium, we set up the service to have an import program (as in the KB instructions), and use that for scheduled import batch files (instead of doing the imports MAS90 style, without referencing the port #...). Windows Task Scheduler to run the batch files... usually including a check for a missing input file first (because that will lock up the job).


  • 7.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-18-2017 16:53
    @MichelleForsey I've used the Task Scheduler method and then set the job to stop automatically after a specific amount of time, like 1-2 hours, depending on the job. Wouldn't that 'kill' the process and release the user license?


  • 8.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-19-2017 07:35
    or you can write the batch file to ship the import if the source file does not exist.


  • 9.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-19-2017 07:42
    Re: your error 12, do you maybe need quotes ("" "") around any pathing that has spaces? Although in some cases the quotes shouldn't be used, as is evident below. Here's a sample .bat I last used for a VI Export: d: cd \ cd D:\Sage\Sage 100 Advanced ERP\MAS90\home pvxwin32.exe ..\launcher\sota.ini ..\soa\startup.M4P -ARG DIRECT UIOFF user password Z99 viwx07 AUTO And prior to that I believe I did not use an actual .bat file. I'm pretty sure I just did it all within Windows Task Scheduler, but that might have been due to the nature of the task we needed to perform - e.g.: Program/script: ""E:\ERP\Sage\Sage 100 Advanced ERP\MAS90\home\pvxwin32.exe"" Arguments: -hd../launcher/sota.ini ""E:\ERP\Sage\Sage 100 Advanced ERP\MAS90\FX\FX_GetCurrencyRates.M4P"" Start in directory: ""E:\ERP\Sage\Sage 100 Advanced ERP\MAS90\home"" -Due to ""directory name is invalid"" error when trying to run the job (http://matthewcevans.com/blog/2010/08/11/windows-task-scheduler-the-directory-name-is-invalid-0x8007010b/), had to set as E:\ERP\Sage\Sage 100 Advanced ERP\MAS90\home\


  • 10.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-19-2017 08:26
    I was wondering if the error 12 was due to missing the server info in the batch file and maybe it should look like this: 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 But your batch file works and it doesn't have the server name or port info. Tried both with quotes and without. I may have this backwards, but with quotes opens a box that looks like it is going to launch Sage and then doesn't and without quotes gives the error 12. I will use your sample.bat and see what happens.


  • 11.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-19-2017 08:51
    Note: we only use VI for imports. Visual Cut is much more reliable for querying and formatting export data on a schedule.


  • 12.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-19-2017 08:53
    @MoiraGoggin I've not tried that, I will on my next one and see! Good Idea!


  • 13.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-20-2017 14:38
    Success! Thanks everyone.


  • 14.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-20-2017 15:05
    What was the secret to your success????


  • 15.  RE: I have a customer on Sage Advanced 2015. We would

    Posted 04-20-2017 15:13
    I followed Brett's example to the letter. I think I had an extra carriage return in my original file and that threw the error 12.