The attached script (generateSapAccounts.pl) Generate account definitions from WLM job parameters.
	
Usage:
	generateSapAccounts.pl  -TEMPLATE  <file name> 
							-CSV <file name>  
							-OUT <file name>
							

Where:		
	-CSV : A file created by the Conversion tool during the data capture stage 
		   located at: <Conversion Tool folder>\workarea\datasources\<project name>\data\JOBPARM.csv
	
	-TEMPLATE: A SAP account definitions file to be used as a template for default account parameters (see below for file creation).	
			
	-OUT: The output sap account file.

	
To use this script:
	1. Prepare input
		a. Open the conversion tool and perform WLM data capture (if not performed already)
		b. Locate the JOBPARM.csv file under '<Conversion Tool folder>\workarea\datasources\<project name>\data'. This file should be used with the '-CSV' argument in step 2.
		c. Define at least on R3 account and one BW account using the Control-M Configuration manager or SAP CM account management tool.
			Defined SAP account will be saved in '<Control-M Agent install dir>/data/sapacc.dat'. This file should be used with the '-TEMPLATE' argument in step 2.
	2. Execute the script by running 'perl generateSapAccounts.pl  -TEMPLATE  <file name> -CSV <file name> -OUT <file name>'
		* A SAP account will be created for each unique combination of SAP conection params found in the input CSV.
		* Created accounts will be named '<JOBUSER>_<SYSNR>'
		* In case of duplicate generated account names for differnet definitions, a unique identifier will be appended to the account name.
	3. To use the generated accounts:
		a. backup the exisitng '<Control-M Agent install dir>/sapacc.dat'.
		b. Rename the script's output file to 'sapacc.dat' and place it under '<Control-M Agent install dir>/data/'
		c. Examine the create accounts.
	
	* Please note: that passwords will not be generated for the created accounts, and should be added manually using the account management tool.

	
Template file creation:
	In order to get the template file create two sap accounts, one of BW type and the other of R3 type.
	After the creation of the accounts, the template file sapacc.dat will located at <Installation path>\BMC Software\Control-M Agent\<Agent name>\DATA.
	If the sapacc.dat file contains more than one account of each BW and R3 types, the first one of each type will be used as template.
	
	
	
	
