Simple Sample Session
In this example, a base member called COBOLBAS has two derivatives called COBOLDV1 and COBOLDV2.
Here are the tasks associated with this session:
Establishing Your Profile
From the Member Reconciliation menu, select 0 (PROFILE), and then 1 (COMPARE OPTIONS). Ensure that TEXT Type is either a period (wildcard character) or COBOL.
Press [PF3] END and select option 3 (EDITING). Set the Include Prefix option to YES. Press [PF3] END and select 5 (DATA SETS).
SERDSNML -------------------- PROFILE DATA SETS ----------------------------
WIS DSNAME ===>CDFUSER.CDF.WIS_______________________
Print DSNAME ===>CDFUSER.CDF.PRINT_____________________
Export DSNAME ===>CDFUSER.CDF.EXPORT____________________
Export DSORG ===>PDS_____ (PDS, SEQ, PAN, LIB, or blank)
Export Member Mask ===>________ (Mask to rename Base members on export)
LIB Module Name ===>LIBR____ (LIBrarian update module name: LIBR, LIBRARY)
Press ENTER to validate and stay; END to register and exit; CANCEL to exit.
Fill in the profile data sets as suggested using your TSO user ID instead of CDFUSER.
Defining the Base and Derivatives to M+R
After establishing your user profile, you need to define the base and derivatives to M+R.
From the Member Reconciliation menu, select 1 (VERSIONS). When the Versions panel appears, specify the data set names, members, nicknames, and IDs, but leave Type blank.
SERCDFCM ------------------------- VERSIONS ----------------------------------
Command ===> _________________________________________________________________
CMN Export Package: LibType:
--MEMBER- TYPE NICKNAME ID
Base: somnode.CMNZMF.SAMPLES cobolbas base -
Last Member:
or CMN Appl/Pkg: LibType:
Drv1: somnode.CMNZMF.SAMPLES coboldv1 drv1 b
or CMN Appl/Pkg: LibType:
Drv2: somnode.CMNZMF.SAMPLES coboldv2 drv2 c
or CMN Appl/Pkg: LibType:
Drv3:
or CMN Appl/Pkg: LibType:
Drv4:
or CMN Appl/Pkg: LibType:
Drv5:
or CMN Appl/Pkg: LibType:
Drv6:
or CMN Appl/Pkg: LibType:
Drv7:
or CMN Appl/Pkg: LibType:
Press ENTER to validate and stay; END to register and exit; CANCEL to exit.
Press [Enter] to register the specifications. All the field entries will be raised to upper case. Through registration, you also discover that Type is a PDS for the base and the two derivatives. Press [PF3] END to return to the Member Reconciliation menu.
Running M+R
At this point, you have specified the base and derivatives. Now select 2 (EXECUTE) from the Member Reconciliation menu. As M+R executes, the In Progress screen appears first, and is then followed by the Reconcile panel, shown below.
View All ------------------------- RECONCILE --------------- ROW 1 TO 20 OF 97
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
******************************** TOP OF DATA *********************************
000000 ********/* 2000/12/04 17:03:43 somnode.CMNZMF.SAMPLES
Records in Exported File:
|------------------------------------------------
|DEGREE OF COMPLEXITY: 4 MEDIUM
|-------------------------------------------------
| RECORDS | CONFLICTS |SINGLE CHANGES |
|----------------|---------------|---------------|
|NICKNAMES |PREV CURR DIFF |PREV CURR DIFF |
|----------------|---------------|---------------|
|ORIGINAL 60 | 1 0% | 3 0% |
|----------------|---------------|---------------|
|DRV1 63 | 5 0% | 2 0% |
|----------------|---------------|---------------|
|DRV2 66 | 7 0% | 1 0% |
|----------------|---------------|---------------|
|RECONCIL | 0 0% | 0 0% |
|----------------|---------------|---------------|
| TOTAL: | 13 0% | 6 0% |
|------------------------------------------------
Reconciliation Scope:
The panel displays an initial analysis of the reconcile work ahead. Complexity of the work is rated 4 Medium on a scale 1 through 10. It also tells us the following:
-
The current release of base has 60 lines of code, 3 of which were changed by 2 records in DRV1 and by 1 record in DRV2. These are single changes.
-
One record in base was changed by more than one derivative. A total of 12 records of DRV1 and DRV2 are in conflict; that is, they represent competing changes to 1 record in base.
Scroll down [PF8] to see the next page of the Reconcile panel.
View All ------------------------- RECONCILE -------------- ROW 21 TO 41 OF 97
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
NICKNAME MEMBER LAST MODIFIED USER ID DATA SET NAME
-----------------------------------------------------------------------
BASE COBOLBAS 2000/11/21 15:52 SERENA somnode.CMNZMF.SAMPLES
DRV1 COBOLDV1 2000/11/21 15:52 SERENA somnode.CMNZMF.SAMPLES
DRV2 COBOLDV2 2000/11/21 15:52 SERENA somnode.CMNZMF.SAMPLES
RECONCIL 2000/12/04 17:03 CDFUSER Current Work
-----------------------------------------------------------------------
000001 000100 IDENTIFICATION DIVISION.
000002 000200 PROGRAM-ID. COBOL01.
000003 000300 ENVIRONMENT DIVISION.
000004 000400 INPUT-OUTPUT SECTION.
000005 000500 FILE-CONTROL.
000006 000600 SELECT ONLY-FILE,
000007 000700 ASSIGN VSAMFILE,
000008 000800 ORGANIZATION IS INDEXED,
000009 000900 ACCESS DYNAMIC,
000010 001000 RECORD KEY IS ONLY-KEY,
000011 001100 FILE STATUS IS ONLY-FILE-STAT.
000012 001200 DATA DIVISION.
000013 001300 FILE SECTION.
000014 001400 FD ONLY-FILE.
In this panel, the line following the command line (B:DRV1 C:DRV2) relates the derivatives' IDs with their nicknames. The "Reconciliation Scope" section associates the nicknames with the data set names.
-
-: BASE - somnode.CMNZMF.SAMPLES(COBOLBAS)
-
B: DRV1 - somnode.CMNZMF.SAMPLES(COBOLDV1)
-
C: DRV2 - somnode.CMNZMF.SAMPLES(COBOLDV2)
Furthermore, the artificial data set name "Current Work" for the nickname "RECONCIL" reflects your consolidation effort. Scroll down [PF8] to see the next page of the Reconcile panel.
View All ------------------------- RECONCILE -------------- ROW 42 TO 62 OF 97
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
000015 001500 01 ONLY-REC.
000016 001600 02 ONLY-KEY.
000017 001700 03 ONLY-ACCOUNT PIC X(10).
000018 001800 03 ONLY-TYPE PIC XX.
000019 001900 03 ONLY-DSN PIC X(44) OCCURS 2.
000020 002000 03 ONLY-MEMBER PIC X(10) OCCURS 2.
< 0021 002100 02 ONLY-REST-OF-REC PIC X(100).
<>BC__ 002100 02 ONLY-REST-OF-REC.
> BC__ 002200 05 ONLY-DISP PIC XXX.
> BC__ 002300 05 ONLY-UNIT PIC X(8).
> BC__ 002400 05 ONLY-VOL PIC X(6).
> B___ 002500 05 FILLER PIC X(83).
> _C__ 002500 05 ONLY-SMS-GROUP PIC X(8).
> _C__ 002600 05 ONLY-DESCRIPT PIC X(70).
> _C__ 002700 05 FILLER PIC X(5).
000022 002200 WORKING-STORAGE SECTION.
000023 002300 77 ONLY-FILE-STAT PIC XX.
000024 002400 01 SWITCHES.
000025 002500 02 END-OF-ONLY-FILE-SW PIC X.
000026 002600 88 END-OF-ONLY-FILE VALUE 'Y'.
000027 002700 LINKAGE SECTION.
This panel illustrates the conflicts between the derivatives. Line 21 of the base has undergone different changes in the two derivatives.
Recall that the symbols (>, <, <>) are M+R visual clues of what changes have been made. The composite "<>BC" (greater than and less than in B and in C) means that the base line 21 is considered different in derivative B (DRV1) and derivative C (DRV2). ">BC" (greater than in B and in C) means that the same line has been added in both derivatives B and C. ">B" (greater than in B) means that the line has been added in derivative B, when compared to the base. This representation also applies to derivative C (DRV2).
Scroll down [PF8] to see the next page of the Reconcile panel
View All ------------------------- RECONCILE -------------- ROW 63 TO 83 OF 97
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
000028 002800 01 LS-FUNCTION PIC X(8).
000029 002900 88 OPEN-REQUEST VALUE 'OPEN'.
000030 003000 88 READSEQ-REQUEST VALUE 'READSEQ'.
000031 003100 88 CLOSE-REQUEST VALUE 'CLOSE'.
000032 003200 01 LS-ONLY-REC PIC X(220).
000033 003300 EJECT
000034 003400 PROCEDURE DIVISION USING LS-FUNCTION, LS-ONLY-REC.
000035 003500 MAIN-LINE.
000036 003600 IF OPEN-REQUEST PERFORM DO-THE-OPEN
000037 003700 ELSE IF READSEQ-REQUEST PERFORM DO-THE-SEQ-READ
< B___ 003800 ELSE IF UPDATE-REQUEST PERFORM DO-THE-UPDATE
000039 003900 ELSE IF CLOSE-REQUEST PERFORM DO-THE-CLOSE
000040 004000 ELSE DISPLAY 'INVALID I/O FUNCTION REQUESTED'
000041 004100 MOVE 12 TO RETURN-CODE.
000042 004200 GOBACK.
000043 004300 DO-THE-OPEN.
000044 004400 OPEN I-O ONLY-FILE.
000045 004500 IF ONLY-FILE-STAT = '00'
000046 004600 MOVE 0 TO RETURN-CODE
<>B___ 004900 MOVE ZERO TO RETURN-CODE
000047 004700 ELSE
Observe the composite "<B" (less than in B). It means that this line has been deleted on derivative B when compared to the base. Also note that a line from derivative B has changed (replaced) the 46th base record. Scroll down [PF8] to see the next page of the Reconcile panel.
View All ------------------------- RECONCILE -------------- ROW 84 TO 97 OF 97
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
000048 004800 EXHIBIT NAMED ONLY-FILE-STAT
000049 004900 DISPLAY 'OPEN FAILED'
<>_C__ 005500 DISPLAY 'COBOL01 - OPEN FAILED'
000050 005000 MOVE 8 TO RETURN-CODE.
000051 005100 DO-THE-SEQ-READ.
000052 005200 READ ONLY-FILE NEXT, AT END MOVE 8 TO RETURN-CODE.
000053 005300 IF ONLY-FILE-STAT = '00'
000054 005400 MOVE ONLY-REC TO LS-ONLY-REC
000055 005500 MOVE 'N' TO END-OF-ONLY-FILE-SW
000056 005600 ELSE
000057 005700 MOVE 'Y' TO END-OF-ONLY-FILE-SW
000058 005800 MOVE 8 TO RETURN-CODE.
000059 005900 DO-THE-CLOSE.
000060 006000 CLOSE ONLY-FILE.
******************************* BOTTOM OF DATA *******************************
This panel indicates that a line from derivative C has replaced the 49th base record.
Investigating the Changes
Recall that the VIEW Conflict (V $) primary command enables you to display the conflict. If you issue V $ at this point, only the conflicting base/derivative lines will be displayed. This result is shown below.
View All ------------------------- RECONCILE --------------- ROW 1 TO 20 OF 57
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
******************************** TOP OF DATA *********************************
- - - - - - - - - - - - - - - - - - - - - - - - - 21 Lines NOT Displayed
< 0021 002100 02 ONLY-REST-OF-REC PIC X(100).
<>BC__ 002100 02 ONLY-REST-OF-REC.
> BC__ 002200 05 ONLY-DISP PIC XXX.
> BC__ 002300 05 ONLY-UNIT PIC X(8).
> BC__ 002400 05 ONLY-VOL PIC X(6).
> B___ 002500 05 FILLER PIC X(83).
> _C__ 002500 05 ONLY-SMS-GROUP PIC X(8).
> _C__ 002600 05 ONLY-DESCRIPT PIC X(70).
> _C__ 002700 05 FILLER PIC X(5).
- - - - - - - - - - - - - - - - - - - - - - - - - 41 Lines NOT Displayed
Issuing Line Commands with M+R
For this scenario, we want to retain the code from derivative C, rather than from derivative B. To do this, we must delete line 21 from the base and the line "FILLER PIC X(83)" of derivative B. These results are shown below.
View All ------------------------- RECONCILE --------------- ROW 1 TO 20 OF 57
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
******************************** TOP OF DATA **********************************
- - - - - - - - - - - - - - - - - - - - - - - - - - 21 Lines NOT Displayed
d 0021 002100 02 ONLY-REST-OF-REC PIC X(100).
<>BC__ 002100 02 ONLY-REST-OF-REC.
> BC__ 002200 05 ONLY-DISP PIC XXX.
> BC__ 002300 05 ONLY-UNIT PIC X(8).
> BC__ 002400 05 ONLY-VOL PIC X(6).
d B___ 002500 05 FILLER PIC X(83).
> _C__ 002500 05 ONLY-SMS-GROUP PIC X(8).
> _C__ 002600 05 ONLY-DESCRIPT PIC X(70).
> _C__ 002700 05 FILLER PIC X(5).
- - - - - - - - - - - - - - - - - - - - - - - - - - 41 Lines NOT Displayed
To delete the two lines, press [Enter]. The lines are deleted. These results are shown below.
View All ------------------------- RECONCILE --------------- ROW 1 TO 20 OF 57
COMMAND ===> SCROLL ===> CSR
B:DRV1 C:DRV2
******************************** TOP OF DATA **********************************
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 Lines DELETED
- - - - - - - - - - - - - - - - - - - - - - - - - - - - 21 Lines NOT Displayed
<>BC__ 002100 02 ONLY-REST-OF-REC.
> BC__ 002200 05 ONLY-DISP PIC XXX.
> BC__ 002300 05 ONLY-UNIT PIC X(8).
> BC__ 002400 05 ONLY-VOL PIC X(6).
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 Lines DELETED
> _C__ 002500 05 ONLY-SMS-GROUP PIC X(8).
> _C__ 002600 05 ONLY-DESCRIPT PIC X(70).
> _C__ 002700 05 FILLER PIC X(5).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - 41 Lines NOT Displayed
Enter the [PF3] END command to return to the Member Reconciliation menu.
Exporting the Consolidated Version
To export the consolidated version, select 6 (EXPORT) from the Member Reconciliation menu. M+R acknowledges that your consolidation effort was exported to the target file that you have specified.
Press the [PF3] END command twice (or X command), to exit M+R and return to the M+R Invocation panel.
Verifying Your Work
To verify the reconciliation you have just finished, you can use a comparison utility to compare the base and consolidated version. You will obtain a difference report which should look like the following:
001600 02 ONLY-KEY.
001700 03 ONLY-ACCOUNT PIC X(10).
001800 03 ONLY-TYPE PIC XX.
001900 03 ONLY-DSN PIC X(44) OCCURS 2.
002000 03 ONLY-MEMBER PIC X(10) OCCURS 2.
++++++++
D 002100 02 ONLY-REST-OF-REC PIC X(100).
--------
I 002100 02 ONLY-REST-OF-REC.
I 002200 05 ONLY-DISP PIC XXX.
I 002300 05 ONLY-UNIT PIC X(8).
I 002400 05 ONLY-VOL PIC X(6).
I 002500 05 ONLY-SMS-GROUP PIC X(8).
I 002600 05 ONLY-DESCRIPT PIC X(70).
I 002700 05 FILLER PIC X(5).
++++++++
002200 WORKING-STORAGE SECTION.
002300 77 ONLY-FILE-STAT PIC XX.
002400 01 SWITCHES.
002500 02 END-OF-ONLY-FILE-SW PIC X.
002600 88 END-OF-ONLY-FILE VALUE 'Y'.
. . .
003300 EJECT
003400 PROCEDURE DIVISION USING LS-FUNCTION, LS-ONLY-REC.
003500 MAIN-LINE.
003600 IF OPEN-REQUEST PERFORM DO-THE-OPEN
003700 ELSE IF READSEQ-REQUEST PERFORM DO-THE-SEQ-READ
++++++++
D 003800 ELSE IF UPDATE-REQUEST PERFORM DO-THE-UPDATE
++++++++
003900 ELSE IF CLOSE-REQUEST PERFORM DO-THE-CLOSE
004000 ELSE DISPLAY 'INVALID I/O FUNCTION REQUESTED'
004100 MOVE 12 TO RETURN-CODE.
004200 GOBACK.
004300 DO-THE-OPEN.
004400 OPEN I-O ONLY-FILE.
004500 IF ONLY-FILE-STAT = '00'
++++++++
D 004600 MOVE 0 TO RETURN-CODE
--------
I 004900 MOVE ZERO TO RETURN-CODE
++++++++
004700 ELSE
004800 EXHIBIT NAMED ONLY-FILE-STAT
++++++++
D 004900 DISPLAY 'OPEN FAILED'
--------
I 005500 DISPLAY 'COBOL01 - OPEN FAILED'
++++++++
005000 MOVE 8 TO RETURN-CODE.
005100 DO-THE-SEQ-READ.
005200 READ ONLY-FILE NEXT, AT END MOVE 8 TO RETURN-CODE.
005300 IF ONLY-FILE-STAT = '00'
005400 MOVE ONLY-REC TO LS-ONLY-REC
You have now completed the simple session. If you followed the tutorial, your results should match those illustrated in the difference report above.
Here is a question to assess your knowledge of M+R: You performed only two line deletions, but the difference report reveals four single line deletions, a block insertion, and two single line insertions. Why is that?
Here is the answer: Single changes like replacing and deleting base records are auto-applied, if not explicitly deleted, if your profile setting is AUTOOVERRIDE=YES.
The following session will help you master the commands introduced in the first scenario even if you are not quite comfortable with the IBM Assembler language.