This chapter contains all the scripts that are needed to run and maintain the Item Planning environment.
The following directories are used by the batch scripts. These directories are subdirectories of the $IP_HOME
directory.
Table 7-1 Directories Used by Batch Scripts
Directory Name | Content of the Directory |
---|---|
bin |
Batch scripts |
config |
Item Planning template configuration |
domain |
Domains |
input |
Input files for building the domain |
logs |
Log files from running any of the batch scripts. A system administrator can scan the logs for any errors, exceptions, or failures. If there are none, the batch completed successfully. |
temp |
Temporary files used by the batch scripts |
Scheduling of the batch scripts are in the following categories:
The following information is included in the tables for each batch script:
A short description of the script.
The name of the script.
The directory in the $IP_HOME/bin
directory where the batch script is found.
Dependencies on other batch scripts.
For a detailed description of each script, see the Batch Designs section in this chapter.
The daily batch scripts are run every day before executing the weekly batch scripts.
Table 7-2 lists information on a daily batch scripts.
The daily batch script is run before executing the weekly batch scripts.
Table 7-3 lists information on the weekly batch scripts.
Table 7-3 Weekly Batch Scripts
Description | Script Name | Batch Directory | Dependency |
---|---|---|---|
Backup |
NA |
NA |
NA |
Export to MFP |
exportToMFP.ksh |
bin |
Backup |
Formalize DPM Positions Note: This script is optional. For more information see, Oracle Retail Predictive Application Server Administration Guide |
informalPositionMgr (RPAS utility) |
$RPAS_HOME/bin |
Backup |
Calendar Hierarchy Load |
loadhier.ksh |
loadhier |
Backup |
Product Hierarchy Load |
loadhier.ksh |
loadhier |
Backup, Formalize DPM Positions (if run) |
Location Hierarchy Load |
loadhier.ksh |
loadhier |
Backup |
Load on order data |
loadActuals.ksh |
bin |
Calendar hierarchy load, Product hierarchy load, Location hierarchy load |
Load MFP data |
loadActuals.ksh |
bin |
Calendar hierarchy load, Product hierarchy load, Location hierarchy load |
Load Actuals data |
loadActuals.ksh |
bin |
Calendar hierarchy load, Product hierarchy load, Location hierarchy load |
Load AP data |
loadActuals.ksh |
bin |
Calendar hierarchy load, Product hierarchy load, Location hierarchy load |
Propagate inventory and aggregate data for all planning levels |
processactuals.ksh |
actualize |
Load on order data, |
Generate sales forecast |
runforecast.ksh |
forecast |
Load on order data, |
Refresh existing workbooks Note: This script is optional. |
refresh.ksh |
workbook |
Generate sales forecast |
Auto build workbooks placed on queue Note: This script is optional. |
autobuild.ksh |
workbook |
None |
The following script is not part of a normal batch schedule. This script is executed only to perform the specified activity.
Table 7-4 lists information on the unscheduled administration script.
These scripts are included in the other batch scripts to control logging and set environment variables. These batch scripts are only supported for Item Planning. The batch environment scripts supported for Item Planning Configured for COE are described in Chapter 8, "Item Planning Configured for COE".
The first script, message.ksh, controls the overall logging. The script writes batch script details to a daily log file. The daily log file is created in the $IP_HOME/logs
directory. The format of the file name is MnthID_Day.log, for example, Apr_02.log.
The second script, environment.ksh, is called at the beginning of every batch script. This script sets the following environment variables:
export ITEM_CONFIGNAME=itemplan
export ITEM_DOMAINHOME=$IP_HOME/domain
export ITEM_MASTERDOMAIN=$ITEM_DOMAINHOME/itemplan
export ITEM_CONFIGHOME=$IP_HOME/config
export ITEM_EXPORT=$IP_HOME/export
export ITEM_INPUTHOME=$IP_HOME/input
export ITEM _LOG_DIR=$IP_HOME/logs
export ITEM _LIB=$IP_HOME/bin
export ITEM _TEMP=$IP_HOME/temp
export ITEM _BATCH=$IP_HOME/bin
export LOGLEVEL=all
The LOGLEVEL parameter can be set to any of the RPAS supported logging levels—all, profile, debug, audit, information, warning, error, and none.
This section contains detailed information on the following batch scripts:
Some of the scripts have a command line argument to set the maximum number of processes that need to be run in parallel. Setting this argument can help speed up the performance of independent tasks on local domains. The default is 1. Additionally, some scripts use the Batch Script Architecture variable BSA_MAX_PROCESSES, defined in the environment.ksh script, for process parallelization.
Script
loadhier.ksh
Usage
loadhier.ksh <hierarchy> <purgeage>
Table 7-5 Calendar Hierarchy Load Usage
Argument | Description | Notes |
---|---|---|
hierarchy |
Sets the RPAS name of the hierarchy to be loaded. |
The default for the calendar hierarchy is clnd. |
purgeage |
Sets the number of days after updating a hierarchy position before purging the position. |
The default is 10000. |
Example
loadhier.ksh clnd 10000
Error Information
This script utilizes standard Batch Script Architecture logging and return code processing. For more information on logging and standard return codes, see the Oracle Retail Batch Script Architecture Implementation Guide.
Notes
Before running this script, a clnd.dat file must exist in the input directory of the domain.
This script uses the RPAS loadHier utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The calendar, product, and location hierarchy loads can be run in any order.
Script
loadhier.ksh
Usage
loadhier.ksh <hierarchy> <purgeage>
Table 7-6 Product Hierarchy Load Usage
Argument | Description | Notes |
---|---|---|
hierarchy |
Sets the RPAS name of the hierarchy to be loaded. |
The default for the product hierarchy is prod. |
purgeage |
Sets the number of days after updating a hierarchy position before purging the position. |
The default is 10000. |
Example
loadhier.ksh prod 10000
Error Information
This script utilizes standard Batch Script Architecture logging and return code processing. For more information on logging and standard return codes, see the Oracle Retail Batch Script Architecture Implementation Guide.
Notes
Before running this script, a prod.dat file must exist in the input directory of the domain.
This script uses the RPAS loadHier utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The calendar, product, and location hierarchy loads can be run in any order.
Script
loadhier.ksh
Usage
loadhier.ksh <hierarchy> <purgeage>
Table 7-7 Location Hierarchy Load Usage
Argument | Description | Notes |
---|---|---|
hierarchy |
Sets the RPAS name of the hierarchy to be loaded. |
The default for the product hierarchy is loc. |
purgeage |
Sets the number of days after updating a hierarchy position before purging the position. |
The default is 10000. |
Example
loadhier.ksh loc 10000
Error Information
This script utilizes standard Batch Script Architecture logging and return code processing. For more information on logging and standard return codes, see the Oracle Retail Batch Script Architecture Implementation Guide.
Notes
Before running this script, a loc.dat file must exist in the input directory of the domain.
This script uses the RPAS loadHier utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The calendar, product, and location hierarchy loads can be run in any order.
Script
loadActuals.ksh
Usage
loadActuals.ksh <measurelist> <maxprocesses>
Table 7-8 Load On Order Data Usage
Argument | Description | Notes |
---|---|---|
measurelist |
Sets the location of the file which contains the list of measures to be exported. |
By default, these files are provided with the package in the |
maxprocesses |
Sets the maximum number of export processes to run in parallel. |
The default is 1. |
Control File
LoadOnOrderList.txt: Contains these measures that can be loaded as part of this script:
ipwponordc
ipwponordr
ipwponordu
Example
loadActuals.ksh LoadOnOrderList.txt 1
Error Information
Table 7-9 Load Actuals Data Error Information
Task Name | Error Code | Abort Required? | Description of Error |
---|---|---|---|
loadactuals |
40 |
yes |
One or more arguments are missing. |
loadactuals |
41 |
yes |
Domain does not exist. |
loadactuals |
42 |
no |
Data file does not exist. |
loadactuals |
43 |
yes |
All measure input files are empty or missing. |
loadactuals |
44 |
yes |
Configuration file does not exist. |
loadactuals |
45 |
yes |
Errors occurred during the load of one or more measures. |
Notes
This script uses the RPAS loadmeasure utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The script ignores any missing or empty measure load files.
All measure files are placed into the domain's input folder.
If there were no errors during the loading of all measures, the input file is archived into the domain's input/processed directory. A date stamp is appended to the end of the measure file name.
The script does not produce an error when records are rejected from the loaded files. These rejected records are logged in the log output of the load process.
Script
loadActuals.ksh
Usage
loadActuals.ksh <measurelist> <maxprocesses>
Table 7-10 Load Actuals Data Usage
Argument | Description | Notes |
---|---|---|
measurelist |
Sets the location of the file which contains the list of measures to be exported. |
By default, these files are provided with the package in the |
maxprocesses |
Sets the maximum number of export processes to run in parallel. |
The default is 1. |
Control File
LoadActualsList.txt: Contains these measures that can be loaded as part of this script:
drtyeopclrc | drtyrecu | drtyslsregr |
drtyeopclrr | drtyslsclrc | drtyslsregu |
drtyeopclru | drtyslsclrr | drwpdefslscrvp |
drtyeopregc | drtyslsclru | drwpdefslscrvtx |
drtyeopregr | drtyslsproc | ipwpcutkpsswv |
drtyeopregu | drtyslspror | ipwportkpssv |
drtymkdar | drtyslsprou | ipwpprcopsswv |
drtyrecc | drtyslsregc | ipwpedwkdv |
drtyrecr |
Example
loadActuals.ksh LoadActualsList.txt 1
Error Information
Table 7-11 Load Actuals Data Error Information
Task Name | Error Code | Abort Required? | Description of Error |
---|---|---|---|
loadactuals |
40 |
yes |
One or more arguments are missing. |
loadactuals |
41 |
yes |
Domain does not exist. |
loadactuals |
42 |
no |
Data file does not exist. |
loadactuals |
43 |
yes |
All measure input files are empty or missing. |
loadactuals |
44 |
yes |
Configuration file does not exist. |
loadactuals |
45 |
yes |
Errors occurred during the load of one or more measures. |
Notes
This script uses the RPAS loadmeasure utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The script ignores any missing or empty measure load files.
All measure files are placed into the domain's input folder.
If there were no errors during the loading of all measures, the input file is archived into the domain's input/processed directory. A date stamp is appended to the end of the measure file name.
The script does not produce an error when records are rejected from the loaded files. These rejected records are logged in the log output of the load process.
Script
loadActuals.ksh
Usage
loadActuals.ksh <measurelist> <maxprocesses>
Table 7-12 Load AP Data Usage
Argument | Description | Notes |
---|---|---|
measurelist |
Sets the location of the file which contains the list of measures to be exported. |
By default, these files are provided with the package in the |
maxprocesses |
Sets the maximum number of export processes to run in parallel. |
The default is 1. |
Control File
AP_IP_transferList.txt: Contains these measures that can be loaded as part of this script:
APCpAsgn2StrB | APCpMkdPermR | APCpSizGrpTx |
APCpBOPC | APCpMkdProR | APCpSizRangeTx |
APCpBOPR | APCpPckSzU | APCpSlsClrC |
APCpBOPU | APCpPerfGrpTx | APCpSlsClrR |
APCpCOGSC | APCpPrcClrC | APCpSlsClrU |
APCpDelFreqU | APCpPrcClrR | APCpSlsRegC |
APCpEOPC | APCpPrcIniR | APCpSlsRegR |
APCpEOPR | APCpPrcProR | APCpSlsRegU |
APCpEOPU | APCpPrcR | APCpSlsStartD |
APCpExitD | APCpPresMinU | APCpStrU |
APCpFabricTx | APCpRecC | APCpVendorTx |
APCpItmAt1MapTx | APCpRecR | APCpWeeksClrU |
APCpItmAt2MapTx | APCpRecU | APCpWeeksRegU |
APCpMkdClrR | APCpSftyStckU |
Example
loadActuals.ksh AP_IP_transferList.txt 1
Error Information
Table 7-13 Load Actuals Data Error Information
Task Name | Error Code | Abort Required? | Description of Error |
---|---|---|---|
loadactuals |
40 |
yes |
One or more arguments are missing. |
loadactuals |
41 |
yes |
Domain does not exist. |
loadactuals |
42 |
no |
Data file does not exist. |
loadactuals |
43 |
yes |
All measure input files are empty or missing. |
loadactuals |
44 |
yes |
Configuration file does not exist. |
loadactuals |
45 |
yes |
Errors occurred during the load of one or more measures. |
Notes
This script uses the RPAS loadmeasure utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The script ignores any missing or empty measure load files.
All measure files are placed into the domain's input folder.
If there were no errors during the loading of all measures, the input file is archived into the domain's input/processed directory. A date stamp is appended to the end of the measure file name.
The script does not produce an error when records are rejected from the loaded files. These rejected records are logged in the log output of the load process.
Script
loadActuals.ksh
Usage
loadActuals.ksh <measurelist> <maxprocesses>
Table 7-14 Load AP Data Usage
Argument | Description | Notes |
---|---|---|
measurelist |
Sets the location of the file which contains the list of measures to be exported. |
By default, these files are provided with the package in the |
maxprocesses |
Sets the maximum number of export processes to run in parallel. |
The default is 1. |
Control File
MFP_IP_transferList.txt: Contains these measures that can be loaded as part of this script.
Note: The control file contains measures for both MFP Retail and MFP Cost. Each variation of MFP contains measures that the other variation does not contain. As a result, you may want to use only the measure set (MFP Retail or MFP Cost) that is applicable to your installation. For the individual measure lists, see MFP Retail Measure List and MFP Cost Measure List. |
bucpbopc | bucpslsnetr | buopmkdpermr |
bucpbopr | bucpslsproc | buopmkdpror |
bucpbopu | bucpslspror | buoprecc |
bucpcogsc | bucpslsprou | buoprecr |
bucpeopc | bucpslsr | buoprecu |
bucpeopr | bucpslsregc | buopslsc |
bucpeopu | bucpslsregr | buopslsclrc |
bucpgmpv | bucpslsregu | buopslsclrr |
bucpmkdclrr | bucpslsu | buopslsclru |
bucpmkdpermr | buopbopc | buopslsnetr |
bucpmkdpror | buopbopr | buopslsproc |
bucprecc | buopbopu | buopslspror |
bucprecr | buopcogsc | buopslsprou |
bucprecu | buopeopc | buopslsr |
bucpslsc | buopeopr | buopslsregc |
bucpslsclrc | buopeopu | buopslsregr |
bucpslsclrr | buopgmpv | buopslsregu |
bucpslsclru | buopmkdclrr | buopslsu |
bucpbopc | bucpslsproc | buopmkdpror |
bucpbopr | bucpslspror | buoprecc |
bucpeopc | bucpslsprou | buoprecr |
bucpeopr | bucpslsregc | buopslsc |
bucpgmpv | bucpslsregr | buopslsclrc |
bucpmkdclrr | bucpslsregu | buopslsclrr |
bucpmkdpermr | buopbopc | buopslsclru |
bucpmkdpror | buopbopr | buopslsproc |
bucprecc | buopeopc | buopslspror |
bucprecr | buopeopr | buopslsprou |
bucpslsclrc | buopgmpv | buopslsregc |
bucpslsclrr | buopmkdclrr | buopslsregr |
bucpslsclru | buopmkdpermr | buopslsregu |
bucpbopc | bucpslsnetr | buoprecc |
bucpbopu | bucpslsu | buoprecu |
bucpeopc | buopbopc | buopslsc |
bucpeopu | buopbopu | buopslsnetr |
bucpgmpv | buopcogsc | buopslsproc |
bucprecc | buopeopc | buopslsprou |
bucprecu | buopeopu | buopslsr |
bucpslsc | buopgmpv | buopslsu |
Example
loadActuals.ksh MFP_IP_transferList.txt 1
Error Information
Table 7-15 Load Actuals Data Error Information
Task Name | Error Code | Abort Required? | Description of Error |
---|---|---|---|
loadactuals |
40 |
yes |
One or more arguments are missing. |
loadactuals |
41 |
yes |
Domain does not exist. |
loadactuals |
42 |
no |
Data file does not exist. |
loadactuals |
43 |
yes |
All measure input files are empty or missing. |
loadactuals |
44 |
yes |
Configuration file does not exist. |
loadactuals |
45 |
yes |
Errors occurred during the load of one or more measures. |
Notes
This script uses the RPAS loadmeasure utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The script ignores any missing or empty measure load files.
All measure files are placed into the domain's input folder.
If there were no errors during the loading of all measures, the input file is archived into the domain's input/processed directory. A date stamp is appended to the end of the measure file name.
The script does not produce an error when records are rejected from the loaded files. These rejected records are logged in the log output of the load process.
Script
processactuals.ksh
Usage
processactuals.ksh
Error Information
This script utilizes standard Batch Script Architecture logging and return code processing. For more information on logging and standard return codes, see the Oracle Retail Batch Script Architecture Implementation Guide.
Notes
This script uses the RPAS mace utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The script can run the rule groups batch_calc, batch_inv_adj, batch_inv_roll1, and batch_inv_roll2.
Script
runforecast.ksh
Usage
runforecast.ksh
Error Information
This script utilizes standard Batch Script Architecture logging and return code processing. For more information on logging and standard return codes, see the Oracle Retail Batch Script Architecture Implementation Guide.
Notes
This script uses the RPAS mace utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The script can run the batch_forecast rule group. This rule group can execute the In-Season and Pre-Season embedded forecasts.
Script
refresh.ksh
Usage
refresh.ksh
Error Information
This script utilizes standard Batch Script Architecture logging and return code processing. For more information on logging and standard return codes, see the Oracle Retail Batch Script Architecture Implementation Guide.
Notes
This is an optional script. It enables all workbooks to be kept current with the elapsed settings and prevents stale data from being committed.
The script uses the RPAS wbbatch utility to refresh workbooks in the auto build queue. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
Workbooks should be committed before the refresh batch job. If a workbook is not committed, the data in that workbook can be overwritten by data in the domain during the refresh process.
If you are running both the auto build and refresh scripts, it is important to run the refresh job first. The refresh updates all Item Planning workbooks saved in the domain. If the auto build is run first, these workbooks are unnecessarily refreshed.
Script
autobuild.ksh
Usage
autobuild.ksh
Error Information
This script utilizes standard Batch Script Architecture logging and return code processing. For more information on logging and standard return codes, see the Oracle Retail Batch Script Architecture Implementation Guide.
Notes
This script is an optional script. It should be used only if auto workbooks are utilized.
The script uses the RPAS wbbatch utility to build workbooks in the auto build queue. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
Auto build entries must be added with the domain before running this script. See the Oracle Retail Predictive Application Server User Guide for the Classic Client for details on this process.
If you are running both the auto build and refresh scripts, it is important to run the refresh job first. The refresh updates all IP workbooks saved in the domain. If the auto build is run first, these workbooks are unnecessarily refreshed.
Script
loadActuals.ksh
Usage
loadActuals.ksh <measurelist> <maxprocesses>
Table 7-16 Load Mapping Measures Usage
Argument | Description | Notes |
---|---|---|
measurelist |
Sets the location of the file which contains the list of measures to be exported. |
By default, these files are provided with the package in the |
maxprocesses |
Sets the maximum number of export processes to run in parallel. |
The default is 1. |
Control File
LoadMapList.txt: Contains the list of measures that can be loaded as part of this script.
Example
loadActuals.ksh LoadMapList.txt 1
Error Information
Table 7-17 Load Actuals Data Error Information
Task Name | Error Code | Abort Required? | Description of Error |
---|---|---|---|
loadactuals |
40 |
yes |
One or more arguments are missing. |
loadactuals |
41 |
yes |
Domain does not exist. |
loadactuals |
42 |
no |
Data file does not exist. |
loadactuals |
43 |
yes |
All measure input files are empty or missing. |
loadactuals |
44 |
yes |
Configuration file does not exist. |
loadactuals |
45 |
yes |
Errors occurred during the load of one or more measures. |
Notes
This script uses the RPAS loadmeasure utility. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.
The script ignores any missing or empty measure load files.
All measure files are placed into the domain's input folder.
If there were no errors during the loading of all measures, the input file is archived into the domain's input/processed directory. A date stamp is appended to the end of the measure file name.
The script does not produce an error when records are rejected from the loaded files. These rejected records are logged in the log output of the load process.