Using Maintain Database Sequences

Use the Maintain Database Sequences page to define a database sequence as a managed object.

Select PeopleTools > Utilities > Maintain Database Sequences. Add a name for a new sequence or search for an existing one.

You can define a database sequence to generate a series of numbers for applications such as getting new purchase order numbers or employee numbers. To use database sequences:

  1. Define a database sequence on the Maintain Database Sequences (PSSEQUENCE) page.

  2. Use Application Designer to insert the sequence into a project.

    See Inserting Definitions Into Projects.

  3. Build the project.

    See Running the Build Process.

To create a database sequence using the Data Mover command CREATE_SEQUENCE, refer to Using PeopleSoft Data Mover Commands.

You can also reference the database sequence in the Meta-SQL function %GetNextSeqValue. See %GetNextSeqValue.

This example illustrates the fields and controls on the Maintain Database Sequences page.

Maintain Database Sequences page

Field or Control

Description

DB sequence name

The field includes the DB sequence name you supplied on the search page.

DB seq seed column

Enter the name of a table and column in the format TableName.ColumnName. When a sequence is created the value selected from this column will be used instead of the value in DB seq start value. This is optional.

DB seq start value

Enter a number to begin the sequence. The default is 1.

DB seq increment

Enter a value to increment each number by. The default is 1.

Enter a negative number to have the sequence values decrease.

DB seq minimum

Enter the minimum value that the sequence can reach. The default is 1.

DB seq maximum

Enter a number for the maximum value in the sequence. The default is 999,999,999,999,999,999.

The maximum value is 1028 -1.

DB seq cycle flag

Select the DB seq cycle flag if you want the sequence to continue to generate values after reaching either its maximum or minimum value.

After an ascending sequence reaches its maximum value, it generates the sequence minimum value. After a descending sequence reaches its minimum, it generates the sequence maximum value. If this option is not set an error is returned when the maximum or minimum value is reached.

DB seq cache value

Specify how many sequence numbers to cache.

  • Enter a number greater than zero to cache that many sequence numbers in memory.

  • Enter zero to cache no numbers.

  • Enter a number less than zero to use the system default for caching.

The default value is -1, meaning the system default is used.