Configuring UNIX Environment

When you want to execute the Admin Client Utility command as part of a file transfer request in UNIX environment, you must create a new script that is tailored for the UNIX environment.

When the Admin Client Utility client (CFAdmin) is installed on a UNIX computer, a file called cfcc.sh is created.

The following example uses a copy of the cfcc.sh file called cfccmf.sh. It is the base program with some additional parameters set in it.

#!/usr/bin/ksh
cd /cfcc
# Set the PATH to include the Java JRE
export PATH=./:/usr/AppServer/java/bin:$PATH
# Set the Java environment variables (copied from setutilcp.sh)
export CLASSPATH=.:ClientCommon.jar:axis-ant.jar:axis.jar:commons-discovery.jar:commons-logging.jar:jaxrpc.jar:log4j-1.2.4.ja
r:saaj.jar:wsdl4j.jar:trace.jar:CFAdmin.jar:jcert.jar:jnet.jar:jsse.jar:xalan.jar:xercesImpl.jar:xmlParserAPIs.jar
# Execute the Java CFAdmin
java cfcc.CFAdmin t:$1.xml $2 $3 $4 $5 $6 $7 $8 $9
The above script performs the following functions:
  • The first line (#!/usr/bin/ksh) is required and defines the UNIX system to use the korn shell to execute this procedure.
  • It then sets the directory to the directory where the cfccmf.sh file is located. In this case, the cfccmf.sh file is located in the /cfcc directory.
  • The export PATH statement updates the PATH parameter to include the JRE (Java Runtime Environment) executable files. If the default path includes this directory, this step is not needed.
  • The export CLASSPATH statement was copied from the setutilcp.sh script. This sets up the Java environment variables. Although it looks like four lines of data, it is actually one long statement.
  • The last statement is the actual Java command that executes Admin Client Utility. Admin Client Utility is named CFAdmin. The first parameter (t:%1.xml) shows that the first parameter entered should be the name of the XML template file without the .xml suffix. Parameters %2 - %9 support you to override up to 8 parameters defined in the template XML file.
    Note: The Java program name (CFAdmin) is case sensitive.