Summary of the kGenFiscalPeriods.sh Script

The following sections summarize the arguments and options for the kGenFiscalPeriods.sh script. The script must be run with an argument, or with both the -startYear and -endYear arguments.

Arguments

Table 2-3. Arguments for the kGenFiscalPeriods.sh script lists the arguments for the kGenFiscalPeriods.sh script.

Table 2-3. Arguments for the kGenFiscalPeriods.sh script

Argument

Description

-endYear <year>

Generates additional periods, ending with the fiscal year you specify as a 4-digit year. Used in conjunction with the -startYear argument.

If part or all of the specified time period exists, it is not regenerated.

If generating the specified range of periods would create a time gap between that range and the existing set of periods, the script also generates periods to fill that gap.

The cumulative set of generated time periods cannot exceed 65 years (up to 15 years in the past and up to 50 years in the future).

Using the commit option with this argument saves new periods to the database.

-export <file name>.csv

Exports period definitions (except weeks) from the database to the specified <file name>.csv file in the <PPM_Home>/bin/fiscal/output directory.

After the export, the file contains the following columns of data (for more information, see step 1 in Modify the Period Definitions File):

  • Database ID

  • Start Date

  • End Date

  • Period Type

  • Long Name

  • Short Name

Using the commit option with this argument has no effect.

-import <file name>.csv

Imports to the database the period definitions from the specified <file name>.csv file in the <PPM_Home>/bin/fiscal/input directory. You can create a new file to import by copying and modifying an existing exported file.

The file to be imported must have the first four columns listed in this table for the export argument. Subsequent columns are ignored.

Using the commit option with this argument saves new periods to the database.

-language <lang1,lang2,...>

Using the month names and period formats specified in the period_<language>.conf files for the languages specified in the argument, generates the same set of periods for those languages as already exist for other languages.

See the System Requirements and Compatibility Matrix for the values to specify for the languages for which you need to add periods. Multiple languages must be separated by commas and no spaces.

Using the commit option with this argument saves new periods in the new languages to the database.

-startYear <year>

Generates additional periods, starting from the fiscal year you specify as a 4-digit year. Used in conjunction with the -endYear argument.

If part or all of the specified time period exists, it is not regenerated.

If generating the specified range of periods would create a time gap between that range and the existing set of periods, the script also generates periods to fill that gap.

The cumulative set of generated time periods cannot exceed 65 years (up to 15 years in the past and up to 50 years in the future).

Using the commit option with this argument saves new periods to the database.

Options

Table 2-4. Options for the kGenFiscalPeriods.sh script lists the options for the kGenFiscalPeriods.sh script.

Table 2-4. Options for the kGenFiscalPeriods.sh script

Option

Description

commit

Commits changes to the database. If this option is not specified, any changes you make are not saved to the database.

help

Displays help for the arguments and options.

shift

Checks the periods.conf configuration file to determine whether, to which month, and in which direction to shift the start of each fiscal year, and then performs the shift. Do not attempt to simultaneously generate new periods and use the shift option in the script.

truncate

Deletes all periods currently defined in the database. Use with extreme caution (see the warning below this table).

To take effect, this option must be used with the commit option.

Caution: Using the truncate option deletes all periods in the system. We recommend using this option only on new installations when you intend to delete the standard fiscal calendars provided by default and then create and import a new set of retail calendar periods, possibly based on an external file.