Command Line Interface - How To

Topics | QScripts | How To | Troubleshoot | Support | Related Topics


Command Line Interface - Save a Job as a Script

Set up the qoperation find Command


Command Line Interface - Save a Job as a Script

Related Topics:

See Command Line Interface - Support to find out what command line features your agent supports. These scripts call an executable in the installation directory that submits your saved jobs and selected options to the CommServe.

To save as a script:

  1. From the CommCell Console, begin one of the following procedures:
  2. Select Save as a Script and any options that you want to execute when the script is run.
  3. Click OK to open the Saving the Job as a Script dialog box.
  4. Select the location of the client on which you want to save the script.
  5. Enter or Browse to a path and name for the script file to be saved on the CommServe computer.
  6. Select Synchronous or Asynchronous execution. Some job types will always be performed asynchronously and the synchronous option will be disabled.
  7. If a script with same name exists, you can decide if the existing script must be overwritten. In addition, you can decide the extension of the save as script file.

  8. Click OK to save the operation as a script file.
  9. You can also save a script remotely.


Set up the qoperation find Command

Related Topics:

To set up the qoperation find command:

  1. From the CommCell Console, start a browse for the node level whose content you want to search.
  2. Select the desired data for restore and click Recover All Selected.
  3. From the Restore Options (General) tab, click any desired options. Then click the Job Initiation tab.
  4. From the Job Initiation tab, select Save as a Script and any options that you want to execute when the script is run.
  5. Click OK to open the Saving the Job as a Script dialog box.
  6. Select the location of the client on which you want to save the script file and the argument file.
  7. Enter or Browse to a path and name for the script file and argument file to be saved on the CommServe computer.
  8. Select Synchronous or Asynchronous execution. Some job types will always be performed asynchronously and the synchronous option will be disabled.
  9. If a script with same name exists, you can decide if the existing script must be overwritten. In addition, you can decide the extension of the save as script file.

  10. Click OK to save the operation as a script file and also to generate a corresponding argument file. A message identifying the name of each file will be displayed (e.g., script file find03.bat and corresponding argument file find03.bat_1121988100.tmp may be displayed).
  11. You can also save a script remotely.

  12. Modify the contents of the script file to include the correct form of the qoperation find command. For example, script file find03.bat below could be updated to include argument file find03.bat_1121988100.tmp in the command line as follows:

    setlocal

    if not defined GALAXY_BASE set GALAXY_BASE=C:\Program Files\<software installation path>\Base

    set PATH=%PATH%;%GALAXY_BASE%

    qlogin -af "find03.bat_1121988100.tmp"

    if %errorlevel% NEQ 0 (

    echo Login failed.

    goto next_script_1211988100

    qoperation find -af "find03.bat_1121988100.tmp"

    set OrigErrLevel=%errorlevel%

    qlogout

    if %errorlevel% NEQ 0 (

    echo Logout failed. )

    if %OrigErrLevel% NEQ 0 exit /b %OrigErrLevel%

    :next_script_1211988100

  13. Modify the contents of the argument file as follows:

You are now ready to run the qoperation find command.


Back To Top