Easytrieve Inventory Management Projects

Inventory management on the mainframe means tracking what you have, where it sits, and when to order more—often across hundreds of warehouses and millions of SKUs. ERP systems publish nightly stock balance extracts and movement transaction files; Easytrieve turns those datasets into warehouse stock listings, below-minimum reorder reports, dead-stock analysis, shrink exception lists, and vendor return summaries. Retail, manufacturing, and distribution share the same batch patterns even when field names differ. This tutorial covers typical inventory file layouts, SKU master lookups, reorder logic, location control breaks, movement history reports, negative quantity validation, and how inventory jobs fit the nightly supply chain batch window.

Progress0 of 0 lessons

Inventory Data Files

Common inventory batch files
FileContentsReport use
Stock balanceSKU, location, on-hand qty, allocated qtySnapshot listings, reorder checks
Item masterSKU, description, unit cost, reorder pointDecode and threshold comparison
Movement historySKU, location, transaction type, qty, dateActivity audit, shrink tracing
Location masterWarehouse code, name, regionBreak headings and regional rollups

Stock Balance File Layout

text
1
2
3
4
5
6
FILE STKBAL SKU-NO 12 A WHS-CODE 4 A ON-HAND-QTY 9.0 ALLOC-QTY 9.0 AVAIL-QTY 9.0

SKU-NO identifies product; WHS-CODE identifies warehouse or store location. ON-HAND-QTY is physical count; ALLOC-QTY is reserved for orders; AVAIL-QTY may be calculated upstream or in Easytrieve as ON-HAND minus ALLOC. Numeric definitions match ERP extract—integer quantities often use zero decimal positions.

Merge Master Data or TABLE Lookup

Balance files often carry SKU without description. Two patterns prevail: merge item master to balance in upstream sort/merge JCL producing wide extract, or SEARCH SKUTAB TABLE WITH SKU-NO GIVING SKU-DESC in Easytrieve. Merge once saves repeated SEARCH on high-volume runs; TABLE suits small catalogs or when master changes independently mid-day via refreshed table dataset.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
FILE SKUTAB TABLE 100 DISK ARG 12 A DESC 40 A JOB INPUT STKBAL SEARCH SKUTAB WITH SKU-NO GIVING SKU-DESC IF NOT SKUTAB SKU-DESC = 'UNKNOWN SKU' PERFORM LOG-SKU-EXCEPTION END-IF IF ON-HAND-QTY LT ZERO PERFORM LOG-NEGATIVE-STOCK END-IF

Reorder Point Report

Purchasing needs SKUs where available quantity falls below reorder point from item master. When master fields appear on merged extract, compare directly; otherwise SEARCH or second FILE read supplies REORDER-PT threshold per SKU.

text
1
2
3
4
5
6
7
JOB INPUT STKBAL PERFORM GET-REORDER-THRESHOLD IF AVAIL-QTY LT REORDER-PT ORDER-QTY = REORDER-PT - AVAIL-QTY + SAFETY-STOCK PRINT REORDER-LINE W-REORDER-CNT = W-REORDER-CNT + 1 END-IF

ORDER-QTY calculation varies by policy—economic order quantity modules may live in PERFORM GET-ORDER-QTY. SAFETY-STOCK constant buffers lead time. W-REORDER-CNT appears on report trailer for buyers verifying action list size.

Warehouse Control Breaks

Logistics managers want subtotals per warehouse: SKU count, total units, total extended cost. SORT STKBAL by WHS-CODE before Easytrieve step. REPORT defines BREAK WHS-CODE with AFTER-BREAK printing summary line. SEARCH WHSTAB for warehouse name on break heading.

text
1
2
3
4
BREAK WHS-CODE AFTER-BREAK PRINT WHS-SUMMARY-LINE W-WHS-SKU-CNT = ZERO W-WHS-UNIT-TOT = ZERO

Movement History Reports

Movement files support shrink investigation and audit. Filter IF TRAN-TYPE EQ 'ADJ' and ABS(TRAN-QTY) GT threshold for adjustment exception report. Date range filters use IF TRAN-DATE GE W-START-DATE AND TRAN-DATE LE W-END-DATE for period activity listing. Accumulate receipts versus shipments by TRAN-TYPE category for warehouse productivity metrics.

Inventory Validation Rules

  • Negative ON-HAND-QTY—exception unless backorder policy documents allowed states.
  • ALLOC-QTY greater than ON-HAND-QTY—allocation integrity failure.
  • Unknown SKU on balance file—master sync lag; log for item master team.
  • Duplicate SKU plus location key—possible extract duplication; flag one record.
  • Zero unit cost on valued report—distorts extended cost extension; default or exception.

Extended Cost and Valuation

Extended cost equals quantity times unit cost from master. DEFINE fields with matching decimals; accumulate W-TOTAL-VALUE for warehouse summary. Finance may require standard cost versus moving average—read correct cost column from master and document in header comment which valuation method the report represents.

Sample JCL

text
1
2
3
4
5
6
7
8
//INVREORD EXEC PGM=EZTPA00,REGION=0M //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=INV.LIB(EZTREORD),DISP=SHR //STKBAL DD DSN=INV.STOCK.BAL(+1),DISP=SHR //SKUTAB DD DSN=INV.SKU.MASTER(+1),DISP=SHR //RPTOUT DD SYSOUT=(1,INTRDR) //PURCH DD DSN=INV.REORDER.LIST(+1),DISP=(,CATLG,DELETE) //EXCEPT DD DSN=INV.STOCK.EXCEPT(+1),DISP=(,CATLG,DELETE)

PURCH DD captures machine-readable reorder list for downstream purchasing feed. EXCEPT DD captures negative stock and unknown SKU for morning inventory control meeting.

Retail Versus Manufacturing Nuances

Retail emphasizes store-level SKUs, high SKU count, and shrink by location. Manufacturing emphasizes raw material versus finished goods, lot numbers, and WIP locations. Easytrieve patterns identical—FILE layouts and break levels differ. Lot-controlled environments add lot number to sort key and break hierarchy.

Performance at Scale

Millions of balance rows require presorted input, minimal DISPLAY, and single-pass accumulation. Merge SKU master before Easytrieve when SEARCH would run per row on huge catalog. Split regional jobs when one global run exceeds batch window—operations runs four parallel jobs by region with merged control totals afterward.

Explain It Like I'm Five

Inventory Easytrieve is like checking every toy box in every room of a giant store at bedtime. You count how many of each toy is in each room. If a room has fewer toys than the list says you need, you write on a shopping list to buy more. If a count is minus one—which should not happen—you tell the grown-up to fix the mistake before opening tomorrow.

Exercises

  1. Define STKBAL FILE and write IF AVAIL-QTY LT REORDER-PT PRINT reorder line.
  2. Build SKUTAB INSTREAM with five SKUs and SEARCH for descriptions.
  3. Add W-REORDER-CNT accumulator and print on TITLE trailer line.
  4. List three exception conditions for inventory and proposed LOG procedures.
  5. Compare merge-master versus TABLE lookup for a million-row balance file.

Frequently Asked Questions

Quiz

Test Your Knowledge

1. Inventory Easytrieve jobs typically read:

  • Stock balance and movement extract files
  • Payroll tax tables only
  • CICS map definitions
  • Compiler options

2. Reorder reports flag items when:

  • On-hand quantity falls below reorder point
  • SKU description changes
  • JCL TIME expires
  • PAGE count exceeds limit

3. SKU descriptions usually come from:

  • TABLE SEARCH on item master or merged master file
  • TITLE statement only
  • Random literals
  • SCREEN validation

4. Warehouse reports often subtotal by:

  • Warehouse or location code control break
  • Employee pay grade
  • Loan delinquency days
  • Tax bracket

5. Negative on-hand quantity on a stock file should:

  • Route to exception report for investigation
  • Print silently
  • Delete the SKU
  • Skip SORT
Published
Read time19 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Mainframe inventory batch reporting patterns with EasytrieveSources: Broadcom Easytrieve 11.6 batch processing, supply chain reporting practicesApplies to: Easytrieve inventory stock, reorder, and movement reporting projects