Mainframe Path Start learning free
Beginner7 min readLesson 3 of 4

Comparing and searching: SuperC and Search-For

SuperC (option 3.12) compares two datasets or members and shows exactly which lines were inserted or deleted. Search-For (option 3.14) finds every member of a library that contains a string. Together they answer two daily questions: what changed, and where is this used.

3.12 SuperC: what changed?

Give SuperC a new and an old dataset (or member). It produces a listing that marks lines inserted in the new version and lines deleted from the old one. Option 3.13 is the extended version with more options, such as ignoring columns, comparing a whole library, or comparing by word instead of by line.

A SuperC listing, trimmed
  ID  SOURCE LINES                                          TYPE   LEN
      //PAYRUN01 JOB (ACCT),'PAYROLL',CLASS=A
  I - //STEP010  EXEC PGM=PAYCALC,REGION=0M
  D - //STEP010  EXEC PGM=PAYCALC
      //INFILE   DD DSN=PROD.PAY.MASTER,DISP=SHR
  ... summary: 1 line inserted, 1 line deleted
Reading the listingWhat it means
I -
Inserted: this line exists in the new version only.
D -
Deleted: this line existed in the old version only.
(no marker)
Unchanged context, shown so you can see where the change sits.

Comparing from inside the editor

While editing, the primary command COMPARE compares what you are editing against another member or dataset and marks the differences directly in your edit session. COMPARE SESSION compares against the version as it was when you opened it, which is handy before you save.

3.14 Search-For: where is this used?

Which jobs read the payroll master?
Command ===> SRCHFOR PROD.PAY.MASTER
   Name     Prompt
   PAYRUN01 *Found
   PAYRUN07 *Found
   PAYEXTR  *Found
   PAYRPT2
TRY IT YOURSELF

Which option number compares two members with SuperC?

Show a hint

It is in the 3.1x range, just before 3.13.

Show the solution

3.12 (3.13 is the extended version).

Examples are for learning. Run commands and jobs only on a system you are authorised to use, such as a training or test system, and never on production without approval.

Common mistakes

Swapping new and old in SuperC

Inserted and deleted are then reversed and the listing tells the opposite story. New goes on top.

Searching only one library

JCL often lives in several libraries (JCL, PROCs, parms). Search all of them, or concatenate them.

Trusting a search with the wrong case or spelling

Check the search options. A missed hit is worse than no search at all.

What you will see at work

Key terms

Check your understanding.
Take this lesson's quiz and save your progress. Free.

Take the lesson quiz
← Allocating, copying and moving: options 3.2 and 3.3Browse, View, Edit and option 6 →