AGRIS Customer Documentation

Command Line Options for Automating AGRIS Report Streams

A report stream can be launched via a command line for automation purposes.  For example, a batch file could be created to launch AGRIS and fire off a report stream, then a task scheduling utility could be used to trigger the batch file to the run at a regular interval.  Here are some examples of command lines that could be created using the supported command line parameters for AGRIS.  

Basic command line to launch AGRIS, sign into dataset 005 as the NAM user with a password of p4ssw0rd, set location as 200 and run report stream 01:

C:\AGRIS\packages\sys\SysMenu.exe /D005 /UNAM /Pp4ssw0rd /L200 /R01
 

The command line above breaks down as follows: 
path to AGRIS executable = C:\AGRIS\packages\sys\SysMenu.exe*
dataset = 005
username = NAM
password = p4ssw0rd
location = 200
report stream = 01
*NOTE:  The path to the executable varies.  Common locations of SysMenu.exe are C:\AGRIS\packages\sys\SysMenu.exe, C:\AGRIS\bin\SysMenu.exe, C:\APPS\AGRIS\packages\sys\SysMenu.exe, C:\APPS\AGRIS\bin\SysMenu.exe

 

The following example shows a more advanced command line where additional parameters have been incorporated to provide a password for the report stream and also use an alternate AGRIS.ini file to point to alternate dataset, userprog, component servers, etc.  Note that we don’t have to provide a password for the report stream itself in a command line unless we have configured the report stream itself to require a password.  In this case RSPWD is the password for the report stream and we’re using an alternate AGRIS.ini file that resides at c:\apps\agris\ALTagris.ini.  For most batch files, these additional parameters are generally not used.  

C:\AGRIS\packages\sys\SysMenu.exe /D005 /UNAM /Pp4ssw0rd /L200 /R01 RSPWD /Ic:\apps\agris\ALTagris.ini
 

The command line above breaks down as follows: 
path to AGRIS executable = C:\AGRIS\packages\sys\SysMenu.exe*
dataset = 005
username = NAM
password = p4ssw0rd
location = 200
report stream = 01
password for report stream = RSPWD
path\name of alternate agris.ini file = c:\apps\agris\ALTagris.ini
*NOTE:  The path to the executable varies.  Common locations of SysMenu.exe are C:\AGRIS\packages\sys\SysMenu.exe, C:\AGRIS\bin\SysMenu.exe, C:\APPS\AGRIS\packages\sys\SysMenu.exe, C:\APPS\AGRIS\bin\SysMenu.exe

One other switch that is sometimes required the command to work through a scheduler is the /TR switch.  The /TR switch allows the command to run as a background process instead of a foreground process that shows on the screen. This is typically used when the Scheduled Task fails to work correctly due to the server not being logged in or the screen being locked. /D002/U999/Ppassword/LV17/R1/TR

3820 Mansell Road, Suite 350 ✦ Alpharetta, GA 30022 ✦ www.GreenstoneSystems.com
© 2011 - 2024 Cultura Technologies LLC. All Rights Reserved Worldwide.  Products and company names mentioned herein may be trademarks or registered trademarks of their respective owners.