Sage 100

 View Only
Expand all | Collapse all

We are currently working on setting up a VI import

Chuck Peddy

Chuck Peddy06-03-2015 08:18

  • 1.  We are currently working on setting up a VI import

    Posted 06-03-2015 07:57
    We are currently working on setting up a VI import from a vendor known as Avidpay. They are consolidating bill payment for a customer of ours and they deliver a file that is set up for multiple Sage 100 companies. The information will be imported into the AP Invoice Data Entry files. The raw data files are in CSV format and have one column that represents the Sage company. I know that I can set up a VI script for each company and they can run the file once for each company but I was wondering is there is a way that I can design a script that can be fired off and then import the data to the 2 or 3 different companies without further user intervention. Any ideas?


  • 2.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 07:59
    Doesn't command line let you specify the company ? That would probably mean a separate VI for each Sage company with each VI doing a select based on the company code? I'm sure there's a more elegant solution - including possibly bypassing VI altogether and using scripting.


  • 3.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:00
    Script each one to fire with a dos script. Jim


  • 4.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:04
    I was in the process of setting up a different script for each company. I have put buttons and links for DOS command lines on the Sage menu before but never one that calls a pvx command line. Is that possible? Or would you get an error about PVX already running?


  • 5.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:08
    Create a text file called avidpay.bat. have a line in the file that fires off a VI job for each company. An example where the company codes are ABC and XYZ respectively would be: c: cd \ cd \mas90 cd home PVXWIN32.EXE ..\launcher\sota.ini ..\soa\mas90 -ARG VIWI0C W 0 DIRECT AUTO ABC PVXWIN32.EXE ..\launcher\sota.ini ..\soa\mas90 -ARG VIWI0C W 0 DIRECT AUTO XYZ


  • 6.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:11
    No errors, @ChuckPeddy . You will be able to launch the script from a button in Sage, no problem.


  • 7.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:16
    One of the issues with this solution that has been reported in the past is that the input file is locked during execution of the VI job and the locking may not get released prior to the next VI job executing. If this happens, you could create multiple copies of the input file. For example, you may add some lines to the beginning of the .bat file such as: copy avidpay.csv to c:\abc_avid copy avispay.csv to c:\xyz_avid Then, have separate, identical VI job for each company the only difference being the path of the input file.


  • 8.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:18
    Thanks for the suggestions!


  • 9.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:18
    You either need to add a line to have the Script wait or better yet just create one import for each company


  • 10.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:20
    http://wiki.dsdinc.com/@api/deki/pages/3434/pdf/VI%2bimport%2bthat%2bcan%2bbe%2bautomated%2bin%2bwindow%2bscheduler.pdf?origin=mt-web&deep=false&showtoc=false


  • 11.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:20
    Here is an example of a wait and a file rename based on the date


  • 12.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:24
    @JimWoodhead That links to the DSD Wiki and I don't have a login.


  • 13.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:25
    Oops try this link. Vi script https://www.evernote.com/shard/s79/sh/ba0c26fa-448e-4b11-ba39-826834bd7dcc/ac5403ba4edaca78bbb105c3f708afed


  • 14.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:30
    @ChuckPeddy why not just go with the separate but equal imports for each company? It's quick easy and there's no waiting necessary. The jobs can run at the same time.


  • 15.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:49
    If you do what Brett is suggesting you'll also need to make a duplicate of each file because VI lock the file while it's importing but it's pretty easy to make copy's via script


  • 16.  RE: We are currently working on setting up a VI import

    Posted 06-03-2015 08:56
    Yeah, Jim's right, i did lose track that it's one source file. If it was me, i'd have the script created a separate copy of the original source file. One for each company.