Input Files using the --command Option and References to Job Data

In this case, you define one or more jobs, export the data for them, and include that in the input file. The --command option allows you to include the data from more than one jojb and thus execute multiple actions with one command call.

To create an input file of this type, use the following steps:

  1. Create one or more jobs of the Job type. For more information, see Creating Jobs.
  2. For each of the jobs, run the following dbexport command:

    dbexport -z dumpfile.zip -C dataArea BatchTask -f "BatchTask=value" --fields=Data

    where dumpfile.zip is the name of the zip file that will contain a CSV file which in turn will contain the XML data for the bjob, dataArea is the name of the data area the action, and value if the name of the job.

  3. Open the CSV file in the zip file in a text editor and make the following changes:
    • Remove the "Data" text at the beginning of the file and remove the quotes that surround the XML content.

    • Change all double sets of double quotes to single sets of single quotes. For example, className=""Actor"" should change to className='Actor'.

      The goal here is to create valid XML that will later be inserted within double quotes in the input file. You may have a scripting tool or other utility that you can use instead of manually editing the file.

  4. Save the file and then check that it is valid XML. Some browsers can validate the XML and you may have other tools of your own for this that you can use.
  5. Copy the content of the output file or files to a new text file. This new file will be used as the input data file for the execaction command.
  6. After you have copied the content to the input file, edit the file so that it has the following format for each action. Each command line option goes on a separate line.
    # Action 1
    #
    --command
    -F
    --Fields BatchTask="value" Data="<XML content copied from one output file>"
    
    # Action 2
    --command
    -F
    --Fields BatchTask="value" Data="<XML content copied from one output file>"

    The command line would be the following:

    execaction gen -f addRoleCmds.txt