ctmdeffolder

The ctmdeffolder utility creates a definition for a new SMART folder. SMART folders are used for jobs whose processing can be treated as a single unit. The definition created using this utility contains values for parameters that affect handling of the entire collection of jobs in the SMART folder. A SMART folder can be empty, or it can contain jobs and also Sub Folders, see ctmdefsubfolder.

When a Sub Folder is defined using ctmdeffolder without any Rule-Based Calendar being specified, the Sub Folder inherits all Rule-Based Calendars.

The following are the ctmdeffolder utility syntax rules:

  • When using variables in cmtdeffolder parameters, a variable that does not contain a $ sign can be enclosed in single (‘ ’) or double (" ") quotation marks.

  • A variable that does contain a $ sign must be enclosed in single quotation marks.

  • A variable containing a $ sign cannot be resolved if it is enclosed in double quotation marks.

  • If you define a new Rule-based calendar with the ! character at the beginning of the Rule-based calendar name, the Rule-based calendar is excluded. If this feature is disabled, an error message is displayed that you cannot define a Rule-based calendar with the ! character. For more information, see DefaultCTMExcludeRBC in Control-M/EM general parameters.

Creating SMART folders with Definitions Using the ctmdeffolder Utility

This procedure describes how to run the ctmdeffolder utility, which enables you to create a definition for a new SMART folder.

Begin

  1. Do one of the following:

    • UNIX: Log in to a Control-M/Server account.
    • Windows: Open a command prompt window where Control-M/Server is installed.

    You can also run this utility in Control-M Agent by navigating to where Control-M/Agent is installed.

  2. Type the following command:

    Copy
    ctmdeffolder-FOLDER          <name>
     [ -SUBAPPLICATION <subapplication name> ]
     [ -APPLICATION    <application name> ]
     [ -MAXRERUN     <value> ]
     [ -CYCLIC       Y|N ]
     [ -CYCLIC_TYPE     INTERVAL|INTERVAL_SEQUENCE|SPECIFIC_TIMES ]
     [ -INTERVAL        <45d(days) | 1080h(hours) | 64800m (minutes)> ]
     [ -SPECIFIC_TIMES  <specific times string (HHMM,HHMM)> ]
     [ -INTERVAL_SEQUENCE  <interval sequence string e.g(+1H,+2M)> ]
     [ -TOLERANCE    <maximum delay allowed (minutes)> ]
     [ -INTERVALFROM    START | END | TARGET ]
     [ -MAXWAIT         <days> ]
     [ -ADJUST_COND  Y|N|B ]
     [ -RUN_AS        <username> ]
     [ -CREATED BY    <username> ]
     [ -DEBUG        <debug level 0-5> ]
     [ -QUIET  ]
     [ -TIMEZONE     <xxx> ]
     [ -TIMEFROM     <earliest submission time> ]
     [ -TIMEUNTIL    <latest  submission time> | '>' ]
     [ -PRIORITY     <job priority> ]
     [ -CONFIRM      Y|N ]
     [ -APPLTYPE     <Agent_application> ]
     [ -APPLVER      <application version> ]
     [ -CMVER        <CM version> ]
     [ -APPLFORM     <application form> ]
     [ -DESCRIPTION  <string> ]
     [ -DOCMEM       <filename> ]
     [ -DOCLIB       <directory name> ]
     [ -INCOND       <condition> <dateref>|ODAT  AND|OR ]
     [ -OUTCOND      <condition> <dateref>|ODAT  ADD|DEL ]
     [ -VARIABLE     <varname> <expression> ]
     [ -SHOUT        OK|NOTOK|LATESUB|LATETIME|EXECTIME
                     <destination> <urgency R|U|V> <message> [<time>| <#mmm>] ]
     [ -USERDAILY  <user daily name>
         [ -REMOVEATONCE Y:N ]
         [ -DAYSKEEPINNOTOK <days> ]
     [ -ON         <OK|NOTOK|FAILCOUNT <equal operator EQ|=> <number>|
    <varname> <operator EQ|NE|GT|GE|LT|LE|IR|NR|LK|NL|IX|NX|SW|EW|CO|NC|MP|NP> <value> ]
         [ -DOOK ]
         [ -DONOTOK ]
         [ -DOSTOPCYCLIC]
         [ -DOSHOUT    <destination> <urgency R|U|V> <message> ]
         [ -DOCOND     <condname> <dateref>|ODAT  ADD|DEL ]
         [ -DOVARIABLE <varname> <expression> ]
         [ -DOFORCEJOB <foldername> <jobname> <odate>|ODAT [ -UNIQUE_FLOW Y|N ]]
         [ -DOREMOTEFORCEJOB <foldername> <jobname> <odate>|ODAT [ -UNIQUE_FLOW Y|N ]]
         [ -DOMAIL <destination> <cc> <urgency R|U|V> <subject> <message> ]
         [ -DOREMEDY <summary> <description> <urgency L|M|H|U|C> ]
    -RBC <rbcname>
         [ -MAXWAIT     <maxwait>        ]
         [ -DAYS        <daystr>         ]
         [ -WEEKDAYS    <weekdaystr>     ]
         [ -MONTH   ALL|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC  Y|N ]
         [ -DATE        <MMDD>           ]
         [ -DATEFROM    <YYYYMMDD>       ]
         [ -DATEUNTIL   <YYYYMMDD>       ]
         [ -DAYSCAL     <days calendar>  ]
         [ -WEEKCAL     <week calendar>  ]
         [ -CONFCAL     <conf calendar>  ]
         [ -CAL_ANDOR    AND|OR          ]
         [ -SHIFT        [</>/@][+/-]nn  ]

The parameters related to Cyclic Folder appear if Control-M/Server is not running in Compatibility mode.

You can use the following -input_file parameter to run the utility:

ctmdeffolder -input_file <fullPathFileName>

ctmdeffolder Parameters

The following table lists the ctmdeffolder utility parameters:

Parameter

Description

-DEBUG

Defines the level of debug messages.

Valid values:0 to 5

Default: 0—no debug messages.

-QUIET

Indicates that no information messages are displayed during execution of the command.

-input_file

Defines the name and full path of a file containing parameters for the utility.

In this file, each parameter and its values, if any, are on a separate line with the same syntax they would have on the command line.

Enables you to:

  • prepare and save files of utility parameters that can be reused.

  • specify utility input longer than the number of characters allowed in the command line.

-input_file ~<controlmOwner>/ctm_server/data/ctmdeffolder_parms.txt

-USER DAILY

Defines the name of an order method job that is associated with the created SMART folder.

This parameter is case-sensitive.

The specified name must not be longer than 10 characters. If a longer name is specified, an error message is issued.

ctmdeffolder -folder ss -application a -group g -rbc r -order_ method verylongnamespecified

The response is:

RULE-BASED CALENDAR 'r' added

The value length for -ORDER_ METHOD exceeds maximum allowed length 10

ctmdeffolder Example

The following is an ctmdeffolder command example:

  • Use the following command to create a SMART folder named job:

    ctmdeffolder -FOLDER job -SUBAPPLICATION supply -APPLICATION supplies -RBC jobRbc -DAYS ALL -MONTH ALL Y

  • The Control-M/Server issues a message, similar to the following:

    RULE-BASED CALENDAR 'jobRbc' added

    new SMART folder ENTITY defined, SMART folder='job', ACTIVEFOLDERNO = 00000j(19)