7.x Integrating guide............... 240 Chapter 16-Command-line interface (CLI) Using the BMC Remedy Import CLI This section discusses the BMC Remedy Import CLI. Every cross-platform CLI command opens a separate BMC Remedy Import session, executes the command, and logs out. Therefore, you must log in with every command. If BMC Remedy Import does not find the user name, BMC Remedy Import prints the usage messages and exits. Using the BMC Remedy Import CLI 241 Integrating with Plug-ins and Third-Party Products Note: On Chinese UNIX systems, CSV and ASCII files cannot be imported if they contain Date/Time fields. When using the arimportcmd feature on Japanese UNIX systems, convert the data and .arm mapping files to EUC format before the files are moved to the UNIX server. (The .arx and .xml data files are already in EUC format when they are generated in the client tool, but the .csv file is not. Therefore, the .arm and .csv files must be converted.) Make sure that all of the data file names and a mapping file names are in English. When moving files from Windows to UNIX systems, use FTP to ensure a stable transfer. Running arimportcmd on a UNIX machine When running AR System on UNIX and using arimportcmd, you must add an entry to the library path before running the command. The following examples describe how to set up the path with a Bourne shell: AIX LIBPATH=$LIBPATH:/<ARServer_install_directory>/bin export LIBPATH HP-UX SHLIB_PATH=$SHLIB_PATH:/<ARServer_install_directory>/bin export SHLIB_PATH Solaris LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<ARServer_install_directory>/bin export LD_LIBRARY_PATH Importing with mapping Importing with mapping refers to running the BMC Remedy Import CLI using a mapping created in BMC Remedy Import. The mapping must be created on Windows because that is the only environment BMC Remedy Import runs on interactively, but once created, the mapping can be used on any platform. The -m or -M option in the command line determines this mode. For more information about BMC Remedy Import mapping, see the Configuring guide. 242 Chapter 16-Command-line interface (CLI) BMC Remedy Action Request System 7.0 You can override certain settings saved in the mapping by using additional options. In this way, you can use the data mappings you created for one data file and destination form for imports with a different data file and form combination. Note: You must supply either -M with the fully qualified file name of the parameter, or the combination of -d and -m, where -d is the directory that contains the mapping file and -m is the name of the mapping as contained inside the mapping file, not the name of the mapping file. You cannot supply -M and the combination of -d and -m together. Use the following format in the command line. Enclose arguments that contain blank spaces or symbols in double quotes. The items between square brackets are optional. arimportcmd -u <user_name> [-p <password>] [-x <server_name>] [-w <external_authentication_string>] [-r <rpc_number>] [-a <port_number>] [-l <log_file_path>] [-e <duplicate_field>] [-n <suppress_filters>] [-t <multi_match_option>] [-o <data_file_name>] [-f <destination_form_name>] [-v <force_override>] -M <fully_qualified_mapping_file_name> The following table describes available options. Option Description -u User name-Required login parameter that identifies the user account. Requires a <user_name> argument. -p Password-Optional login parameter that identifies the user account. The -p option requires a <password> argument. Omit the option if the user account has no password. -x Server name-Login parameter that specifies the server to log in to. The -x option requires a <server_name> argument. This option overrides the server specified in the mapping. If this option is not specified, the server name in the mapping is used. -w Authenticator-Specifies the name of an external authentication string or Windows NT domain. This is related to the Login window's Authentication field, which is discussed in the Configuring guide. -r RPC program number-Specifies a private server, for example, if a dedicated import server is available. If not specified, the default is the admin server 390600. Integrating with Plug-ins and Third-Party Products -a TCP port number-Identifies the port number for the server. This value is especially important in a multiple server environment. The option also identifies a TCD specific port, if chosen. -d Mapping directory-Required directory that contains the mapping file being referenced with the -m option. -l Full path name of the log file-Use this option to log details of the import execution. -e Duplicate field-The ID number of the field to check for duplicate data. For example, for the Short Description field, you would enter the value 8. By default, the Request ID field (field ID 1) is used when -e parameter is omitted. -n Suppress filters-When the system is merging entries on forms, this command instructs arimportcmd to suppress the merge filters. -t Multiple match option-Use when more than one entry matches. Enter a value of 3 to affect the first match, and a value of 5 to affect all matches. -o Data file name-Name of the file containing data to import. If specified, this option overrides the data file specified in the mapping. If not specified, the data file specified in the mapping is used. -f Destination form name-Name of the form to import into. If specified, this option overrides the form specified in the mapping. If not specified, the form specified in the mapping is used. -v Forces override-If the user has logged in from a different IP address, this option tells the server to use the new IP address of the BMC Remedy Import client and invalidates the old IP address. -i Supplies a default value. Option Description 244 Chapter 16-Command-line interface (CLI) >From the following options, use either a combination of -m and -d, or -M, to specify the mapping to be used. You cannot use both the combination of -m and -d with -M; they are mutually exclusive. Importing without mapping Importing without using a mapping refers to running the BMC Remedy Import CLI with no mapping definition to instruct how to map fields. This means that all field values will be mapped using matching field IDs. Accordingly, only AR Export (.arx) and AR XML (.xml) file formats are supported because they are the only file formats that include field IDs. Without a mapping, the server name, form name, and data file name must be specified in the command line. Mappings are built by querying the server and the data file. Use the following format in the command line. Enclose arguments that contain blank spaces or symbols in double quotes. The items between square brackets are optional. arimportcmd -u <user_name> [-p <password>] -x <server_name> [-a <port_number>][-f <destination_form_name>] -o <data_file_name> [-e <duplicate_field>] [-n <suppress_filters>] [-t <multi_match_option>][-l <log_file_path>] [-D <duplicate_ID_option>] [-r <rpc_number>] [-v] Enclose arguments that contain blank spaces or symbols in double quotation marks. Option Description -m Mapping name-Required name of the mapping file to be used. You can verify the required name by opening the mapping file and using the string contained in the first line of the file. -d Mapping directory-Required directory that contains the mapping file being referenced with the -m option. -M Full path name of mapping file-The required fully qualified path name of the mapping file to be used. Using the BMC Remedy Import CLI 245 Integrating with Plug-ins and Third-Party Products The following table describes available options. Option Description -u User name-Required login parameter that identifies the user account. Requires a <user_name> argument. -p Password-Optional login parameter that identifies the user account. The -p option requires a <password> argument. Omit the option if the user account has no password. -x Server name-Login parameter that specifies the server to log in to. The -x option requires a <server_name> argument. -a TCP port number-Identifies the port number for the server. This value is especially important in a multiple server environment. The option also identifies a TCD specific port, if chosen. -f Destination form name or pair. A single name indicates that the form name in the source data file matches the form name on the server. To specify a pair of names, separate the form names with an equal sign, without any blank spaces around the equal sign: "<Destination_form>"="<File_form>". The destination form is the form on the server into which data will be imported. The file form is the form specified in the data file. Specifying pairs maps data from one form, specified in the data file, to a different form, identified on the server. Multiple pairs can be specified using this option multiple times, for example: -f "Target_form_a"="File_form_b" -f "Target_form_c"="File_form_d" If the -f option is not specified, BMC Remedy Import will attempt to import all data sets in the source data file. For each data set, if a matching destination form is found on the server, the data will be imported. If no matching form is found, the data set will be ignored. -e Duplicate field-The ID number of the field to check for duplicate data. For example, for the Short Description field, you would enter the value 8. By default, the Request ID field (field ID 1) is used when -e parameter is omitted. -n Suppress filters-When the system is merging entries on forms, this command instructs arimportcmd to suppress the merge filters. 246 Chapter 16-Command-line interface (CLI) BMC Remedy Action Request System 7.0 BMC Remedy Import CLI examples With mapping The following examples show you how you can use arimportcmd with mapping: In the following example, the server name, form name, and data file name are optional because the mapping file contains the information: arimportcmd -u <user_name> -p <password> -m <mapping_name> -d <mapping_file_directory> -l <log_file> -t Multiple match option-Use when more than one entry matches. Enter a value of 3 to affect the first match, and a value of 5 to affect all matches. -l Full path name of the log file-Use this option to log details of the import execution. -o Data file name-Name of the file containing data to import. -D Duplicate ID-Defines how BMC Remedy Import processes records that contain request IDs, which duplicate those already in the form. With this option, you must include one of the following numbers: 0: Generate new ID for all records 1: Reject duplicate records 2: Generate new ID for duplicate records 3: Replace old record with new record (the default) 4: Update old record with new record's data -r RPC program number-Specifies a private server, for example, if a dedicated import server is available. If not specified, the default is the admin server 390600. -v Forces override-If the user has logged in from a different IP address, this option tells the server to use the new IP address of the BMC Remedy Import client and invalidates the old IP address. Note: This option does not apply to users with administrator permissions. -i Supplies a default value. Option Description Integrating with Plug-ins and Third-Party Products In the following example, the server name, form name, and data file name override the names in the mapping file. When you use arimportcmd with mapping, you can override one or more of the three names. arimportcmd -x <server_name> -u <user_name> -p <password> -m <mapping_name> -d <mapping_file_directory> -l <log_file> -o <data_file_path> -f <form_name> Without mapping Without mapping, you must specify the server name and data file name because there is no mapping file to provide such information. The -d and -a options are not shown in the following examples, but if you are working with multiple servers on the same machine, you can use -d for duplicate record handling and -a to specify a port number. The following examples show how you can use arimportcmd without mapping: In the following example, minimal options are used. The data file specifies the data file with path to import. If there are multiple data sets in the same data file, an import is attempted for all forms. arimportcmd -x <server_name> -u <user_name> -p <password> -o <data_file_path> -l <log_file> In the following example, the form name determines which set of data from the data file will be imported to the server. The form name on the server and the data file should match. arimportcmd -x <server_name> -u <user_name> -p <password> -f <form_name> -o <data_file_path> -l <log_file> In the following example, an import is being attempted into the form called A on the server, but the data comes from form B in the data file. arimportcmd -x <server_name> -u <user_name> -p <password> -f "A=B" -o <data_file_path> -l <log_file>
Colin -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Chris Williams Sent: Wednesday, April 18, 2007 4:09 PM To: [email protected] Subject: Re: Using command line import... Joe, I think you can get this by using the Admin Tool (or Import Tool) and hitting the F1 key for help. If you search for "CLI" you should find what you need. I don't have an installation in front of me right now, so can't send a list, unfortunately. HTH Chris. > What are all the switches available when running the import tool via > the command line? > > I'm attempting to analyze the output of a log file during the DSL data > patch, to see what import options the installer is using, so I need to > know the significance of all the switches used. I know its available > on some guide some place but I don't currently have access to it.. > > Joe > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 269.5.2/766 - Release Date: > 4/18/2007 > 7:39 AM > > ______________________________________________________________________ > _________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org > ARSlist:"Where the Answers Are" > ________________________________________________________________________ _______ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are" _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"

