The first programs to run every night — they set the business date and load exchange rates. If they fail, everything downstream stops.
What Are Foundation Batches?
Foundation batches are the very first programs to execute in the nightly batch window. They establish the date context, load reference data, and set up the environment for all subsequent batch programs.
If foundation batches fail, every downstream batch must be held. No pricing, no replenishment, no inventory processing, no data extraction.
VDATE_JOB: Advancing the Business Date
The most critical foundation batch is VDATE_JOB. It advances the RMS business date (commonly called "VDATE") stored in the PERIOD table or SYSTEM_OPTIONS.
Why Not Just Use SYSDATE?
Every batch program in RMS uses VDATE, not SYSDATE, as the business date. This is because:
- Time Zone Independence: RMS may run in a data center in US-East, but the business operates across US-West, Europe, and Asia. VDATE represents the "business day" regardless of server clock time.
- Batch Sequence Control: VDATE advances only when the batch explicitly runs VDATE_JOB. If the batch window overruns into the next calendar day (past midnight), all programs still process using yesterday's VDATE — they don't accidentally jump to tomorrow's business date.
- Recovery: If a critical batch fails and the team needs to reprocess yesterday's data, they can set VDATE back to yesterday and rerun the batch. SYSDATE cannot be rolled back.
What VDATE_JOB Does
-- Simplified VDATE_JOB logic
UPDATE system_options
SET vdate = vdate + 1;
-- Also updates the current fiscal period tracking
UPDATE period
SET period_status = 'C' -- Close current period
WHERE period_end_date = (SELECT vdate - 1 FROM system_options);
UPDATE period
SET period_status = 'O' -- Open new period
WHERE period_start_date = (SELECT vdate FROM system_options);
COMMIT;
VDATE vs. SYSDATE
| Aspect | VDATE | SYSDATE |
|---|---|---|
| Source | SYSTEM_OPTIONS table | OS/database server clock |
| Advances | Only when VDATE_JOB runs | Continuously |
| Can Be Rolled Back | Yes (manual update) | No |
| Time Zone | Business time zone | Server time zone |
| Used By | All RMS batch and application logic | Audit timestamps only |
| Holiday Handling | Can skip non-business days | Does not skip |
VDATE Drift
If the nightly batch is skipped (e.g., due to a system outage), VDATE will be one day behind SYSDATE. This causes downstream issues: price changes won't execute on the correct date, replenishment will be calculated for yesterday's demand, and sales posting will reference the wrong business date. Always verify VDATE matches the expected business date before starting the batch.
CURRRATE_LOAD: Exchange Rate Processing
For retailers operating in multiple currencies, CURRRATE_LOAD loads daily exchange rates from an external source (typically the corporate treasury system or a market data provider).
The Process
- Exchange rate file arrives (CSV or flat file) from the treasury system
- CURRRATE_LOAD reads the file and validates the rates
- Rates are loaded into the
CURRENCY_RATEStable - All subsequent batch programs (PO costing, inventory valuation, financial reporting) use these rates for currency conversion
Rate Types
| Rate Type | Purpose |
|---|---|
| Operational Rate | Used for day-to-day transaction conversion (PO cost, invoice matching) |
| Consolidation Rate | Used for financial reporting and consolidation across subsidiaries |
| Budget Rate | Fixed rate set during annual planning for variance analysis |
Fiscal Calendar Batches
The fiscal calendar batch updates period statuses as the business progresses through the year:
- Period Close: When the last day of a fiscal period passes, the period status changes from 'O' (Open) to 'C' (Closed)
- Half Close: When the last day of a fiscal half passes, the half is closed
- Year Close: At fiscal year-end, the year is closed and a new year begins
These status changes affect which periods can receive postings to the stock ledger and when financial reports can be finalized.
The Dependency Chain
Foundation batches are the root of the entire batch dependency tree:
VDATE_JOB ─────────────────────────────────────────┐
CURRRATE_LOAD ─────────────────────────────────────┤
FISCAL_DATE_UPDATE ────────────────────────────────┤
│
┌───────────────────────────────▼
│ ALL OTHER BATCHES
│
├── Pricing Batches (need VDATE for effective date)
├── Sales Posting (needs VDATE for business date)
├── Inventory Batches (need VDATE + exchange rates)
├── Replenishment (needs VDATE for lead time calc)
├── Financial Batches (need fiscal period status)
└── Data Extraction (needs VDATE for delta window)
Foundation Batch Failure Scenarios
| Failure | Impact | Resolution |
|---|---|---|
| VDATE_JOB fails | ALL batches held — no processing occurs | Fix the issue (usually data conflict in PERIOD table), rerun VDATE_JOB |
| CURRRATE_LOAD fails (file missing) | Multi-currency operations use stale rates | Obtain the rate file, rerun CURRRATE_LOAD |
| CURRRATE_LOAD fails (invalid rate) | Specific currency conversions fail | Correct the invalid rate in the file, rerun |
| Fiscal period close fails | Stock ledger postings may go to wrong period | Fix period status, rerun fiscal batch |
| VDATE accidentally advanced twice | All subsequent batches process wrong date | Manually set VDATE back, rerun all affected batches |
The VDATE Double-Advance Problem
If VDATE_JOB runs twice accidentally (e.g., due to a scheduler misconfiguration), VDATE jumps from Monday to Wednesday, skipping Tuesday entirely. Tuesday's price changes never execute, Tuesday's sales are posted under Wednesday's business date, and replenishment calculates based on Wednesday's demand instead of Tuesday's. This is extremely difficult to unwind and may require partial batch re-execution.
Best Practices
Important Gotchas
- !Always verify VDATE matches the expected business date BEFORE starting the nightly batch. A simple SQL check: SELECT vdate FROM system_options. If it's wrong, the entire batch will process against the wrong date.
- !CURRRATE_LOAD should have a validation step that compares today's rates against yesterday's. A sudden 50% change in a major currency rate is almost certainly a data error, not a market event.
- !Build a "foundation batch health check" script that runs automatically before the main batch sequence. It should verify: VDATE is correct, exchange rates are loaded, fiscal period is open, and SYSTEM_OPTIONS are consistent.
- !In cloud (POM), foundation batches are pre-configured as mandatory first steps. In on-premise (Control-M), YOU must ensure the dependency chain is correctly configured — an accidental parallel execution of VDATE_JOB and REPLENISH is catastrophic.
Key Takeaways
- Foundation batches (VDATE_JOB, CURRRATE_LOAD, FISCAL_DATE_UPDATE) are the first programs to run every night — all other batches depend on them.
- VDATE is the RMS business date stored in SYSTEM_OPTIONS — it advances only when VDATE_JOB runs, not when the server clock advances.
- VDATE provides time-zone independence, batch-safe date management, and rollback capability that SYSDATE cannot.
- CURRRATE_LOAD loads daily exchange rates for multi-currency operations — stale rates cause incorrect PO costing and financial reporting.
- If foundation batches fail, ALL downstream batches must be held until the foundation issue is resolved.


