VSAM JCL: AMP

The AMP parameter on a DD statement carries VSAM-specific keyword data that the base sequential JCL grammar does not express. Think of AMP as a small configuration payload attached to your allocation request so the access method can size buffer pools, strings, and certain option flags for this OPEN without changing the cluster definition in the catalog. That distinction matters for operations: ALTER and DEFINE change persistent attributes, while AMP changes how this job step negotiates resources at runtime. Beginners first encounter AMP when they copy a high-performance sort extract job and see a long parenthetical string after AMP=. This page explains the common keywords, when omission is healthy, and how AMP cooperates with the detailed VSAM tuning tutorials already on this site.

Syntax shape

jcl
1
2
3
4
//VSIN DD DSN=PROD.LEDGER.TRANS.KSDS, // DISP=SHR, // AMP=('BUFND=8','BUFNI=4','STRNO=2')

The exact quoting style may vary by installation examples; some shops omit inner quotes when the parser accepts token boundaries. Follow your local JCL manual and lint tools because JCLPro or equivalent scanners enforce site quirks. Multiple AMP subparameters combine in one AMP clause separated by commas. Do not assume AMP crosses steps: each DD carries its own AMP payload for the programs that OPEN that DD in that step.

Keyword roles at a glance

Frequent AMP keywords for VSAM DDs
KeywordRolePractical note
BUFNDNumber of VSAM buffers for the data component during this OPEN.Increase for heavy sequential scans; coordinate with region size.
BUFNINumber of VSAM buffers for the index component during this OPEN.Matters most for random keyed workloads on deep indexes.
BUFSPAdditional buffer space request beyond BUFND/BUFNI counts.Use only when following a sizing formula from performance staff.
STRNONumber of VSAM strings for concurrent positioning within the cluster.Must align with application design for multiple concurrent positions.
OPTCDOption codes influencing VSAM behavior such as space usage or integrity-related choices per documented values.Never flip bits casually; use IBM tables for supported combinations.
MACRFMacro access flags (e.g., sequential, direct) guiding VSAM preparation.Should match how COBOL or assembler programs actually access the file.

BUFND and BUFNI are the pair performance engineers adjust first when SMF shows index versus data EXCP imbalance. STRNO appears when multiple strings in one address space must hold independent positions in the same cluster, which is more common in complex batch chains than in trivial tutorials. OPTCD values map to documented option characters; if you are unsure about a combination, log the question in your team research file rather than shipping speculative tuning to production. This site has standalone pages for BUFND, BUFNI, STRNO, OPTCD, and ACCBIAS that go deeper than this JCL-focused overview.

When omitting AMP is the right answer

Default buffering often suffices for small files, development compiles, and low-volume maintenance utilities. Adding AMP without measurement can increase virtual storage consumption for marginal benefit. Good shops capture a baseline job without AMP, capture SMF type 14/15 or newer equivalents, then test incremental AMP changes under controlled clones of production data volumes. Document the winning configuration in the job prolog so the next maintainer does not strip AMP thinking it is noise.

Alignment with program access mode

A COBOL program that opens a KSDS for INPUT and only reads sequentially should cooperate with MACRF settings that favor sequential access. If the same file is opened for random updates in another program, that program might warrant different AMP tuning or none at all if the file is small. Because AMP attaches to the DD, two steps in the same job referencing the same DSN can specify different AMP clauses if each step has its own DD card. That flexibility helps mixed pipelines but also creates divergence risk if procs are copied without thought.

AMP versus DEFINE CLUSTER attributes

  • DEFINE chooses CI size, FREESPACE, RECORDSIZE, KEYS—the skeleton of the file.
  • AMP chooses how aggressively this job buffers data and index CIs once the skeleton exists.
  • ALTER can change some define-time attributes; AMP cannot turn a KSDS into an ESDS.

SMS and RACF interactions

Storage management may cap certain resources or redirect datasets based on data class. Security products still authorize the underlying DSN even if AMP requests more buffers. If AMP appears to have no effect, verify that the step is actually opening the DD you tuned and that a dynamic allocation exit is not rewriting parameters. Tracing OPEN failures sometimes reveals DDNAME mismatches between JCL and program rather than AMP miscalculation.

PROC overrides and symbol expansion

Large shops rarely hard-code BUFND in every job; they expose symbols on cataloged procedures so performance teams can adjust a single default when hardware generations change. When you override AMP= in a proc invocation, remember that the override replaces or merges according to JCL rules for parameter continuation. A partial override that drops a required quote can silently fail parsing and fall back to defaults, which looks like "AMP ignored" in triage. Always expand the proc in ISPF or your JCL checker to see the final DD text the interpreter will feed to allocation.

Dynamic allocation from programs (BPXWDYN or language-specific wrappers) can also supply AMP-equivalent parameters without a static DD card. That means your batch JCL might show minimal AMP while an assembler program injects tuning at runtime. Cross-training between application teams and operations is the only reliable way to learn those hidden paths; the catalog alone will not tell you what buffers a program requested after OPEN.

Evidence-driven tuning checklist

  • Capture baseline SMF or RMF metrics for elapsed time, EXCP count, and sync I/O wait before touching AMP.
  • Change one AMP knob at a time so post-run comparisons attribute effects correctly.
  • Re-run with representative data volumes; tuning validated on empty test files misleads everyone.
  • Record region usage and paging deltas; buffers are not free.
  • Archive winning JCL snippets in the configuration management system with a ticket number.

Hands-on exercises

  1. Find one production job with AMP set. Map each AMP keyword to the explanation table above in your notes.
  2. Compare BUFND guidance from this page with the standalone BUFND tutorial; write two bullets on when to read each page.
  3. Explain to a peer why doubling BUFND twice in a row without SMF evidence might be rejected in code review.

Explain Like I'm Five

Think of VSAM as a library book with many pages. DEFINE CLUSTER builds the book and chooses page size. AMP is how many bookmarks the librarian lets you hold at once while you read. More bookmarks can speed up jumping around, but if you ask for a thousand bookmarks, the librarian runs out of hands. BUFND and BUFNI are bookmarks for story pages versus index pages at the back.

Test Your Knowledge

Test Your Knowledge

1. AMP on a DD primarily influences:

  • CI size definition
  • Runtime buffering and access hints for that step
  • Compiler listing width
  • JES message class

2. Which situation most justifies adding explicit BUFND/BUFNI?

  • Hello world with ten records
  • Measured high EXCP rate on a large batch scan after baseline SMF review
  • Any job missing AMP fails
  • BUFND replaces RACF

3. MACRF should align with:

  • JCL comment cards
  • Program access declarations and actual use
  • Only SORT work data
  • Spool class
Published
Read time10 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: IBM z/OS JCL Reference and DFSMSdfpSources: IBM z/OS MVS JCL Reference; DFSMSdfpApplies to: z/OS 2.5 / 3.x