Sage 100

 View Only
Expand all | Collapse all

Our client is currently using MAS 90 (ERP 100 Stan

  • 1.  Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 08:12
    Our client is currently using MAS 90 (ERP 100 Standard) 4.5. We have created batch files that executes a visual integrator job daily that imports AP entries from their multiple stores using the following command line: PVXWIN32.EXE ..\LAUNCHER\SOTAPGM.INI ..\SOA\STARTUP.M4P -ARG DIRECT UIOFF username password WER VIWI0B AUTO Is there anyway to get a return value on successfully executed jobs or access any other values about the job from the command line such as the import file name? This may be development work. Know anyone good with VI jobs for MAS?


  • 2.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 08:14
    I have an import that renames the import file and moves it to an archive folder. is that what you are thinking about?


  • 3.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 08:16
    @AlnoorCassim is a good resource for this type of thing.


  • 4.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 08:17
    That is exactly what I'm looking to do. If the file is successfully imported into MAS using the VI job, I would like to be able to move that import file to a new folder and rename it. You are right on target Jeff!


  • 5.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 08:24
    I do this all the time. You just create a simple BAT file and add it to the VI job on Job Success. Here is one I recently used. It appilies a time stamp and moves the file. If exist U:\TimeTest.xls rename U:\TimeTest.xls WOTime_%date:~4,2%%date:~7,2%%date:~10,4%.%time:~0,2%%time:~3,2%%time:~6,2%.xls 'for /f ""tokens=1-5 delims=/ "" %%d in (""%date%"") do rename ""U:\TimeTest.xls"" WOTime_%%e-%%f-%%g.xls


  • 6.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 08:40
    @LouisAraiza What does the 'for /f ""tokens=1-5 delims=/ "" %%d in (""%date%"") line do. Can you explain what's happening?


  • 7.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 08:41
    How do you 'add it to the VI job on job success'?


  • 8.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 09:02
    Below is the text from a batch file that I use. The last two lines are the only ones you really need. Steps 1-6 walk you through the process. Run date and time information is added to the file name when it is transferred to the archiver (e.g. glxfer20090214214348.dat). Hope it helps. ! !batch file created to delete Timeslips import file after importing to GL journal entry !Created by Jeff Schwenk 11/01/07 with assistance from SageTalk post !http://support.sagesoftwareonline.com/besttalk/messageview.cfm?catid=59&threadid=28010&FTVAR_MSGDBTABLE= !1. created a folder ""pl"" in the MAS90/VI folder !2. copied the text above into a notepad file, saved with the name ""rename.pl"" in the VI\pl folder (didn't make any changes to the text) !3. created a simple job, tested to be sure it works without the pl !4. on the configuration tab, selected perform !5. selected perform type ""completion"" and changed the command to ..\VI\pl\rename.pl !and assistance from PVXlanguage.pdf file !6. Modified 2/14/09 to move imported file to archive folder and rename by appending system date and time to file name. rename ""..\MAS_BLS\TGBLS\glxfer.dat"" to ""..\MAS_BLS\TGBLS\ARCHIVE\glxfer""+DTE(0:""%Ys%Mz%Dz%Hz%mz%sz"")+"".dat


  • 9.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 09:05
    Actually, this happens whether it was successful or not. Not sure how to condition it this way.


  • 10.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 09:16
    Katrina what the code is doing is first checking to see if the file exist. If it does then add the date and time to the name. So if the file is source.txt then the result would be source08012012113015.txt meaning 08/01/2012 at 11:30 and 15 seconds.


  • 11.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 10:05
    @JeffSchwenk The link above is not working.


  • 12.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 10:12
    Sorry about that. Link is an old one. I am sure it is still out there somewhere but I didn't have an opportunity to locate it.


  • 13.  RE: Our client is currently using MAS 90 (ERP 100 Stan

    Posted 08-01-2012 13:17
    Katrina, We put in some perform-logic to clear the source-file after an import. We could change that to post a log entry when a source-file is updated.