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.
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
I -D -(no marker)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?
- Give a string, such as a program name, a dataset name or a copybook, and one or more libraries.
- The result lists every member containing the string, with the matching lines.
- From a member list you can also type
SRCHFOR stringon the command line. Members with hits are flagged and you can open them straight away. - Option 3.15 is the extended version with more options.
Command ===> SRCHFOR PROD.PAY.MASTER Name Prompt PAYRUN01 *Found PAYRUN07 *Found PAYEXTR *Found PAYRPT2
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
Inserted and deleted are then reversed and the listing tells the opposite story. New goes on top.
JCL often lives in several libraries (JCL, PROCs, parms). Search all of them, or concatenate them.
Check the search options. A missed hit is worse than no search at all.
What you will see at work
- Code reviews and change records often attach a SuperC listing as evidence of exactly what changed.
- Impact analysis for a change usually starts with Search-For across every library the application uses.
- Run Search-For in a second logical screen so you can keep editing in the first.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.