This documentation supports the 20.02 version of Remedy Action Request (AR) System.

To view an earlier version, select the version from the Product version menu.


Exporting data by using the AR Export command-line utility

Use the BMC Remedy AR Export command-line utility to export the contents of a BMC Remedy AR System server form to an .arx file. You can extract data from more than one AR System server form and consolidate the data in a single .arx file. You can also exclude the data of certain fields from being exported to the .arx file. The AR Export utility also supports Unicode data.

Note

The AR Export utility does not export the contents of an AR System server form to a CSV file or to an XML file.

The utility can extract all the data from an AR System server form. The utility can also extract data from a form based on the string that defines the qualification criteria. If the form contains an attachment, the attachment data is extracted to a folder whose name is the same as that of the .arx file. By default, the utility adds a time stamp to the folder containing the attachment data.

Running the utility

You can run this utility from a command prompt using a batch file (arexport.bat) on Microsoft Windows platform or a script (arexport.sh) on UNIX platform. The utility is installed as part of the BMC Remedy AR System server installation. The arexport.bat file is located in the <ARServerInstallationDirectory>\artools folder in Windows and the arexport.sh file is located in the <ARServerInstallationDirectory>/artools folder in UNIX.

Use the following command to run the export utility and enter qualification criteria. Parameters enclosed in square brackets are optional.


arexport.bat -u <userName> -x <serverName> -p <password> -t <TCPPortNumber>
-form <formName>  -datafile <outputFile>

[ -delim <delimiter>
  -a <authenticationString>
  -T <transactionSize>
  -L <logfilePath>
  -e <exclusionFieldList>
  -q <qualificationString>
  -o <overwriteOption>
  -timestamp <timeStamp>
  -timeout <timeoutValue>
]

The following table describes the arexport command options, which can be used in any order in the command:

Option

Description

-u

Specify the user name that identifies the user account for the AR System server.

-p

Specify the password for the user account. If the user account has no password, use -p "".

-a

Specify the name of the external authentication string or Windows NT domain. This is related to the Login window's Authentication field. See Authentication String Alias introduction.

-x

Specify the name of the server to connect to.

-t

Specify the TCP port number to connect to. If the port number is unknown, use -t 0.

-O

Use this option to overwrite existing attachments and data file. The following values are valid for this option:

1 - Overwrite existing attachments and data file.
0 - Do not overwrite existing attachments and data file.

The default value is 0.

-form

Specify the name of the form from which you want to export data. To export data from multiple forms, use a comma-separated list of form names in the following format:
 
-form "form1, form2, form3"

If the -form option is not specified, an error message is logged in the artools.log file and the utility stops running.

-datafile

Specify the name and path of the file in which to store the data. If you do not specify the file extension, the utility adds the .arx extension to the data file.

-e

Specify the field IDs for which you do not want to export data. You can use a comma-separated list in the following format:

-e "3, 7"

-T

Specify the size of the transaction. The default size is 100 records.

-L

Specify the log file path. To specify a log file path, use the following format:

-L c:\ARExport\exportlog.log

Note

Ensure that the log file path exists and that the file extension is included in your command.

When you specify the -L option, logs are not generated in the default artools.log file located in the <ARServerInstallationDirectory>\Arserver\Db folder. For information about the logging for the AR Export command, see Logging for the arexport command.

-q

Specify a string that qualifies the search criteria. Use an escape character if the qualification string contains double quotes (for example, if the qualification string is 'RequestID' = "000000011"').
Use the following format:
"'1' = \"000000011\""

where 1 is the field ID.

Note

Do not use a field label as the qualification string. You must use a field name or a field ID as the qualification string.

-delim

Specify the delimiting character to use when you specify multiple values to an option. By default, a comma is the delimiting character. Use the -delim option with the -form and -e options that take multiple values as input. After you specify a delimiter, you must use the same delimiter for all the options that take multiple values as input. Not using the same delimiter might cause incorrect data extraction.

For example, if you enter the following command, the AR Export utility ignores the field IDs (4, 6) listed in the -e option and includes the data for all the fields:

arexport.bat -u <userName> -p <password> -x <serverName> -delim ";" -form "form1;form2" -e 4,6

The following command successfully extracts the data by excluding the data of the fields with IDs 4 and 6.

arexport.bat -u <userName> -p <password> -x <serverName> -delim ";" -form "form1;form2" -e 4;6


Use the -delim option if the form name itself contains a comma. For example, use the following format to specify a semicolon as the delimiter if the form name contains a comma:

arexport.bat -u <userName> -p <password> -x <serverName> -form "Test,form1;form2" -datafile <dataFilePath> -delim ";"

Note

Test,form1 is the name of the form containing a comma.

-timestamp

Use this option to add a time stamp to the folder containing form attachment data. This option has the following values:

1 - Do not add a time stamp.
0 - Add a time stamp.

The default value is 0.

-timeout

Specify the timeout period for connecting to the server. You can specify Normal, Long, and XLong seconds after which the timeout occurs. Use the following format to specify the timeout values:

-timeout Normal:Long:XLong

The default timeout values for Normal:Long:XLong are 120:300:1800.

Note

You must specify all three values even if you want to set one timeout value.
For example, if you want to set the Long timeout value to 400 seconds, use -timeout 120:400:1800.


Example

Consider a situation in which a user with the user name Demo needs to export data from a form named Form1 into the data file c:\ARExport\data.arx, using a qualification string such as 'RequestID'="000000001123" with transaction size 50, and needs to exclude data for fields with IDs 8 and 5. The arexport command would look like the following:

Windows

arexport.bat -u Demo -x myServer -p "abc" -form "Form1" -datafile "c:\ARExport\data.arx" -T 50 -e "8, 5" -q "'1' = \"000000001123\""

UNIX

arexport.sh -u Demo -x myServer -p "abc" -form "Form1" -datafile "/ARExport/data.arx" -T 50 -e "8, 5" -q "'1' = \"000000001123\""

Consider a situation where you want to add an additional qualification:

arexport -u Demo -p Asimil89@ -x localhost -form User -datafile "C:\testexp.arx" -q "'101' = \"Demo\" && '109' = 1"
arexport -u Demo -p Asimil89@ -x localhost -form User -datafile "C:\testexp.arx" -q "'101' = \"Demo\" AND '109' = 1"

Logging for the arexport command

If an exception occurs when the form data is being exported, the exported records of that form are rolled back and removed from the .arx file and the details are logged in the artools.log file.

On Windows, the artools.log file is located in the <ARServerInstallationDirectory>\Arserver\Db folder.

On UNIX, the artools.log file is located in the <ARServerInstallationDirectory>\db folder.

Was this page helpful? Yes No Submitting... Thank you

Comments