Oracle Retail16 min readBy Priyanshu Pandey

RMS Foundation Batches: VDATE, Currency Rates & Business Date Management

A comprehensive guide to RMS foundation batch programs. Learn how VDATE_JOB advances the business date, CURRRATE_LOAD processes exchange rates, fiscal calendar batches update period boundaries, and how foundation programs must complete before all other batches can start.

Phase 8 · Integration & Batches

The first programs to run every night — they set the business date and load exchange rates. If they fail, everything downstream stops.

16 min read📅May 26, 2026✍️Priyanshu Pandey📚Oracle RMS Series
THE FIRST TO RUN

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.

THE BUSINESS DATE

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:

  1. 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.
  2. 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.
  3. 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 EXPLAINED

VDATE vs. SYSDATE

AspectVDATESYSDATE
SourceSYSTEM_OPTIONS tableOS/database server clock
AdvancesOnly when VDATE_JOB runsContinuously
Can Be Rolled BackYes (manual update)No
Time ZoneBusiness time zoneServer time zone
Used ByAll RMS batch and application logicAudit timestamps only
Holiday HandlingCan skip non-business daysDoes 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.

EXCHANGE RATES

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

  1. Exchange rate file arrives (CSV or flat file) from the treasury system
  2. CURRRATE_LOAD reads the file and validates the rates
  3. Rates are loaded into the CURRENCY_RATES table
  4. All subsequent batch programs (PO costing, inventory valuation, financial reporting) use these rates for currency conversion

Rate Types

Rate TypePurpose
Operational RateUsed for day-to-day transaction conversion (PO cost, invoice matching)
Consolidation RateUsed for financial reporting and consolidation across subsidiaries
Budget RateFixed rate set during annual planning for variance analysis
Check Today's Exchange Rates
SQL
SELECT 
    currency_code,
    effective_date,
    exchange_rate,
    exchange_type,
    ROUND(1 / exchange_rate, 4) AS inverse_rate
FROM 
    currency_rates
WHERE 
    effective_date = (SELECT vdate FROM system_options)
ORDER BY 
    currency_code;
CALENDAR

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.

DEPENDENCIES

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)
WHEN THINGS GO WRONG

Foundation Batch Failure Scenarios

FailureImpactResolution
VDATE_JOB failsALL batches held — no processing occursFix the issue (usually data conflict in PERIOD table), rerun VDATE_JOB
CURRRATE_LOAD fails (file missing)Multi-currency operations use stale ratesObtain the rate file, rerun CURRRATE_LOAD
CURRRATE_LOAD fails (invalid rate)Specific currency conversions failCorrect the invalid rate in the file, rerun
Fiscal period close failsStock ledger postings may go to wrong periodFix period status, rerun fiscal batch
VDATE accidentally advanced twiceAll subsequent batches process wrong dateManually 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

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.
RetailCoder
All systems operational
v1.0 Live

RC:OMS

Multi-channel order management with double-entry inventory ledger. Amazon, Flipkart, Shopify, WooCommerce — one source of truth.

Launch demo →
v1.0 Live

RC:Storefront

Self-hosted headless e-commerce. Your server, your data, zero transaction fees. Native RC:OMS inventory sync.

Visit Storefront →
Pipeline

RC:Pulse

AI-powered retail analytics and demand forecasting — built natively on top of your RC:OMS and Storefront data.

Request early access →
Built in India 🇮🇳  ·  Architected by Priyanshu PandeyTalk to an engineer →