Building Mass Change Definitions

Once you’ve properly set up the types, templates, prompt tables, and security, you can build a Mass Change definition. When you create a definition, all information will default from its Mass Change type and template, except for the criteria and default field values and users

You define a Mass Change definition by using the Mass Change Definition Component. We discuss the first page, Description, in the previous section. The remaining pages are where you identify criteria fields and default fields, and generate the actual SQL statements.

To add a new definition:

  1. Select PeopleTools > Mass Changes > Mass Change Definitions.

    Search by Mass Change Definition, Mass Change Template ID, Mass Change Type ID, or Primary Permission List. When you select a value the Mass Change Definitions page appears. Alternatively, enter a value for a new definition.

  2. For a new Mass Change Definition, select a Mass Change Template.

    If you selected an existing Mass Change Definition, this field is not editable.

  3. Use the lookup icon to select an Archive ID, specify an Archive Date, if desired, and enter a Description.

  4. Select the Criteria and Defaults page to specify the values of the criteria and default fields defined by the template.

    The Criteria rows consist of a SQL operator (Mass Change Definition drop-down list on the left) and a field value (on the right). When you specify an operator and a value, you are completing a WHERE clause condition for the field in question. You can only enter one SQL operator per Criteria. However, you can enter multiple values by adding rows.

    For each criteria field, select an operator and a value. For each default field, enter a value.

    The following table lists the valid operators, how they are used, and an example of each one as used on a set of Business Units that includes: CORP, FRNGN, NEWGN, SUBCO, and WORLD.

    Operator

    Meaning

    Example

    Result

    <

    Less than

    < NEWGN

    CORP, FRNGN

    < =

    Less than or equal to

    < = NEWGN

    CORP, FRNGN, NEWGN

    < >

    Not equal to

    < >NEWGN

    CORP, FRNGN, SUBCO, WORLD

    =

    Equal to

    = NEWGN

    NEWGN

    > =

    Greater than or equal to

    > = NEWGN

    NEWGN, SUBCO, WORLD

    >

    Greater than

    > NEWGN

    SUBCO, WORLD

    BTW

    Between value A and value B

    BTW CORP SUBCO

    CORP, FRNGN, NEWGN, SUBCO

    NBT

    Not between value A and value B

    NBT CORP SUBCO

    WORLD

    IN

    In a subset of

    IN CORP SUBCO

    CORP, SUBCO

    NIN

    Not in a subset of (complement)

    NIN CORP SUBCO

    FRNGN, NEWGN, WORLD

    LIK

    Like (used with a % wildcard)

    LIK NEW%

    NEWGN

    NLK

    Not like (used with a % wildcard)

    NLK %GN

    CORP, SUBCO, WORLD

    The Defaults box displays fields that will be updated and allows you to enter a Mass Change Field Value for each field. If you have created prompt tables for the fields on this page, you can select from a list of valid values for each field.

  5. Select the Tools Specific Fields page, and enter any information required for the definitions for your particular application.

  6. Select the Generate SQL page.

    • Use this page to create the SQL statement(s) based on the information you specified for the type, template, and definition.

      Mass Change gives you the opportunity to check the SQL text generated by a Mass Change definition before actually executing it.

    • View the SQL statement(s) by clicking the Generate SQL button.

      The SQL text is created and displayed in the large, display-only, edit box.

    • If you’re unhappy with the SQL, use the Clear Sw button to delete it, and rewrite the Mass Change definition, template, or type, as needed.

    • Use the Count button in the lower left corner of the page to display the total number of rows affected by each statement.

    • If you select the Execute SQL Upon Saving check box, the SQL will be executed when you save the page if your Mass Change Operator Security profile authorizes you to execute definitions online.

      If you do not enable this option, you can save the Mass Change definition, then execute it in the background, using a run control.

  7. Review the statement(s).

    Check the statement text. Be sure any FROM or WHERE clauses reference the proper tables, fields, and values. As a further test, press Count. This displays the total rows affected by each statement.

    Are the totals what you expected? If everything checks out, continue to the next step. If not, redefine the definition, template, or type, as necessary.

  8. Select Execute SQL Upon Saving, if desired.

  9. Click the Save button to save the definition.

    If you selected Execute SQL Upon Saving, the definition begins executing.

  10. Select Execution History to view a list of SQL Statements, Criteria Fields, and Operations.