One of the item that I always strike off ✅ from my checklist whenever I'm assigned with a task of modifying an existing code is Source Code Comparison. It allows me to highlight the difference between different versions of the code. It also acts as a proof for the reviewer that only the intended parts of the code were modified.
Although, CA Endevor lets us use the Changes (C) option to look at the actual lines we've changed, I rely upon SuperCE utility (option 3.13) to compare the modified code and the existing version of the code in Production environment.
Welcome to my blog! 😀 In this blog post, we will look at the SuperCE (option 3.13) ISPF option - which is used to compare the content of two datasets - and the usage of Process statements which is similar to the usage of control statements in IBM's DFSORT utility.
|
This one is for the Thumbnail 😁 |
Your time is precious. So, please use the following links to navigate to different sections of this post.
SuperC (I guess the suffix 'C' after Super stands for Compare) is the standard option to compare two datasets of unlimited size and record length. SuperCE is the extended version of the standard SuperC Utility and it offers more flexibility like,
- Comparing the datasets in line, word or byte level,
- Supplying process statements for specific compare requirements
- Various listing types and so on.
To access the SuperCE Utility from ISPF Primary Option Menu, type 3 (Utilities) and press Enter.
Click on the image for a larger version.
|
ISPF Primary Option Menu. |
From the Utility Selection Panel, type 13 (SuperCE) and press Enter.
|
Selecting SuperCE from Utility Selection Panel. |
Voila! 👏
|
SuperCE Utility Panel. |
Alternatively, you can type =3.13 from ISPF Primary Option Menu (or command line for that matter) and hit Enter to directly get into SuperCE Utility panel.
How to use SuperCE Utility?
Now that we're inside the SuperCE Utility panel, let's use it.
The true method of knowledge is experiment.
- William Blake
To use SuperCE utility, we should have two datasets. It can be a sequential dataset, PDS or a member inside a PDS. ❗ SuperC and SuperCE doesn't support tape datasets.
I've got 2 PDS members with a simple COBOL program in each of them. For better understanding, I've named these members as NEW and OLD because the contents in the NEW member is an updated version of contents in OLD member.
|
The NEW member. This COBOL program accepts a name from the user and displays the name with a greet. |
|
The OLD member. As you probably know, this COBOL program simply displays a very famous message to the user. |
The next step is to input these datasets in the SuperCE Utility panel and do the comparison. The New DS Name field should be provided with the updated version of the dataset that you want to compare and the Old DS Name field should be provided with the previous version of the dataset.
|
Using the SuperCE Utility panel. |
Whenever you access the SuperCE Utility panel, it provides default setting for the Compare Type, Listing Type, Listing DSN, and Browse option.
SuperCE Utility works the best for you with the following settings,
- Compare Type - Line (Compares the dataset for line differences)
- Listing Type - Delta (SuperCE provides a listing after the comparison. This listing shows some awesome stats. Delta option lists the differences between the source data sets, followed by the general summary)
- Listing DSN - This is where the listing output will be stored. SuperCE allocates a default DSN in case if you leave this field blank. If you want to store the results of comparison (I do, as I used to pass on this dataset to my code reviewer), you may provide your own DSN.
- Display Output - Yes (This option tells ISPF that you want the output listing to be displayed. If you choose the option No, SuperCE will not show the listing but it shows the result of the comparison (Differences found or No differences found) at the top right corner of the panel).
- Output Mode - View or Browse
- Execution Mode - Foreground is the default.
For more details about the SuperCE Panel Fields, click 👉
here.
Let's hit Enter to allow SuperCE perform the comparison. The listing output after the comparison is shown below.
|
Listing output for Line Compare. |
In the Listing Output Section (Line #4 thru 21), the source lines are shown.
Left side of each line is either marked with I (Insert) or D (Delete).
The first source line at line #9, 000200 PROGRAM-ID. NEW. , is marked with I (Insert) i.e., the listing tells that this line was inserted in the New DSN and wasn't found in the Old DSN.
The next source line at line #10 is marked with D (Delete) i.e., the listing tells that this line is present in Old DSN but not in the New DSN. So, it must have been deleted in the updated version of the code.
The Line Compare Summary and Statistics section at the bottom shows the overall summary of the comparison.
As you would've noticed in the listing output, the first 6 bytes (Column Numbers) of the COBOL code was also included for the comparison by SuperCE.
Suppose you want to compare data residing in the columns 7 thru 72 in both the datasets, you should supply process statements for this requirement.
The process statements panel can be accessed by typing E in the command line of SuperCE Utility panel, or by using Options action bar choice and choosing Option 1 - Edit Statements.
|
Accessing Process Statements panel. |
In the following picture, some examples of the statements that can be used are shown in the bottom half of the screen. The actual statements required for your comparison should be typed in the EDIT window shown in the first half of the screen.
|
Process Statements panel. |
CMPCOLM process statement should be used to compare using a column range.
|
Inputting Process Statements. |
We can exit the screen now by pressing F3. A message, 'Statements DS saved' is displayed at the top right corner of the SuperCE Utility panel.
|
Statements DS Saved. |
The compare statements will be stored in the dataset provided in Statements DSN field in SuperCE Utility panel. This field can also be left blank allowing the system to create one dataset for you to store the process statements.
On hitting Enter, the compare request will be invoked with the process options.
|
Listing Output |
The Line Compare Summary shows that there are 4 line matches and 6 differences. At the bottom of the screen, the criteria used for this compare task is specified.
There are many flavours of process statements that can be invoked depending on what you need to compare. Some of them are listed below.
Example 1:
You can notice that the end of the process statement, CMPCOLM, contains a suffix of N and O, indicating that it is referencing the New DSN and Old DSN respectively. What follows the statement is the column range within the referenced dataset.
With these statements, we tell SuperCE that we want to compare the data residing in columns 5 to 30 in the New DSN with data in columns 1 to 25 in the Old DSN.
Example 2:
Suppose you want to ignore the comment lines in your COBOL code from being compared.
DPLINE (Do not process lines) process statement do not process the lines that can be recognized by a unique character string, for comparison.
DPLINE '*',7 scans for an asterisk ('*') in column 7 and ignores it from being compared.
Example 3:
Suppose if you want to compare only specific rows in each datasets.
The NFOCUS and OFOCUS process statements can be used to specify the rows to be used for the comparison. In this case, rows 1 thru 10 will be used from the New DSN while rows 11 thru 21 will be used from the Old DSN.
More about Process Statements can be found 👉
here.
Sit back and relax. You can create a JCL from SuperCE Utility panel (with fewer hits on that Enter button) to run the comparison in batch mode. ISRSUPC is the program which is used for comparison.
After providing the datasets in the New and Old DSN, select the execution mode as Batch and press Enter. In the Submit Batch jobs panel, Job statement info is provided at the bottom of the screen. I've chose to Edit JCL before submit.
|
SuperC Utility - Submit Batch jobs panel. |
Upon hitting Enter, the JCL is shown to user.
If you are adding Process Statements, a SYSIN DD statement will be added to the JCL.
Hope you witnessed the uses of SuperCE utility. If SuperCE stands for Super Compare Extended, then adjective Super is well suited and appropriate. Should you have any questions/suggestions please leave it in the comments section below. Thx 👍
References:
- z/OS ISPF User's Guide Vol II
- TSO/ISPF Curriculum z/OS v2.3 - Interskill Learning
Hello poster, I am doing everything perform needed to be done in JCL1 file of the challenge ID "JCL1", still I am getting the error code:- CC 1027 when I check my JCL through "CHKJCL". Now you please tell me what to do next?
ReplyDeletePlease tell me ASAP please please
ReplyDelete