Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Comparing members

Member ERFASS (listed in the example on "Adding, correcting and assembling library source programs") and member EINAUS are compared. A comparison log is generated.

/start-lms ----------------------------------------------------------------  (1)  

//modify-logging-parameters logging=*maximum ------------------------------  (2)

//open-library library=bsp1.bib,mode=*update ------------------------------  (3)

//add-element from-file=quell.einaus, to-elem=(elem=einaus,type=s) --------  (4)

INPUT  FILE

OUTPUT LIBRARY= :1OSN:$USER.BSP1.BIB

        ADD :1OSN:$USER.QUELL.EINAUS AS (S)EINAUS/@(0001)/2013-03-01

(1)

LMS is called.

(2)

In addition to error messages, positive acknowledgments are also logged.

(3)

Library BSP1.BIB is opened for reading and writing.

(4)

File QUELL.EINAUS is added to the library as S-type member EINAUS.

//show-element (element=einaus,type=s) ----------------------------------   (5)  

INPUT  LIBRARY= :1OSN:$USER.BSP1.BIB
INPUT  ELEMENT= (S)ES/@(0001)/2013-03-01
        TITLE 'ERFASSEN VON DATEN'
        PRINT NOGEN
ERFAS   START
        BALR  5,0
        USING *,5
        OPEN  DATEI,OUTPUT
LESEN   RDATA SATZ,ENDPGM
        CLC   TEXT(4),=C'/EOF'
        BE    ENDPGM
        MVC   ATEXT,TEXT
        LH    9,SL
        AH    9,=H'1'
        STH   9,ASL
        WROUT ASATZ,ENDPGM
        PUT   DATEI,SATZ
        B     LESEN
ENDPGM  TERM
*

DATEI   FCB   FCBTYPE=SAM,LINK=DATEN
        DS    OH
SATZ    DS    CL84
SL      DS    CL2
        DS    CL2
TEXT    DS    CL80
ASATZ   DS    OCL85
ASL     DS    CL2
        DC    X'000001'
ATEXT   DS    CL80
        END
NUMBER OF PROCESSED RECORDS IS 29

(5)

Member EINAUS is listed.

//show-element (element=erfass,type=s) -----------------------------------  (6) 

INPUT  LIBRARY= :1OSQ:$USER.BSP1.BIB
INPUT  ELEMENT= (S)ERFASS/002(0001)/2013-03-01
        TITLE 'ERFASSEN VON DATEN'
        PRINT NOGEN
ERFAS   START
        BALR  5,0
        USING *,5
        OPEN  DATEI,OUTPUT
LESEN   RDATA SATZ,ENDPGM
        PUT   DATEI,SATZ
        B     LESEN
ENDPGM  TERM
*

DATEI   FCB   FCBTYPE=SAM, LINK=DATEN
SATZ    DS    CL84
        END
NUMBER OF PROCESSED RECORDS IS     14

//compare-element primary-elem=(elem=einaus,type=s), -

//               secondary-elem=(elem=erfass), -

//               compare-parameters = *par(information=*maximum) ---------  (7)  

FUNCTION         = C O M P A R E
PAR       COMPARE= 00001/32764/L/MAX
PRIMARY    LIBRARY= :1OSN:$USER.BSP1.BIB
PRIMARY    ELEMENT= (S)EINAUS/@(0001)/2013-03-01
SECONDARY  LIBRARY= :1OSN:$USER.BSP1.BIB
SECONDARY  ELEMENT= (S)ERFASS/002(0001)/2013-03-01 -----------------------  (8)

-------------------------------------------------------------------------------

SAME FROM      #1 TO      #7 AS FROM      #1 TO      #7 ------------------  (9)

     #1 >        TITLE 'ERFASSEN VON DATEN'<
     #2 >        PRINT NOGEN<
     #3 >ERFAS   START<
     #4 >        BALR  5,0<
     #5 >        USING *,5<
     #6 >        OPEN  DATEI,OUTPUT
     #7 >LESEN RDATA SATZ,ENDPGM<

(6)

The member ERFASS is listed.

(7)

Members EINAUS and ERFASS are compared. The comparison log is to be output in its full scope.

(8)

Start of comparison log:The log includes the values set for COMPARE, the names of the primary and secondary libraries, and the names of the primary and secondary members.

(9)

The records with record IDs #1 through #7 are identical in both members.

----------------------------------------------------------------------------------
INS. FROM       #8 TO      #14 ---------------------------------------------------  (10) 
     #8 >         CLC   TEXT(4),=C'/EOF'<
     #9 >         BE    ENDPGM<
    #10 >         MVC   ATEXT,TEXT<
    #11 >         LH    9,SL<
    #12 >         AH    9,=H'1'<
    #13 >         STH   9,ASL<
    #14 >         WROUT ASATZ,ENDPGM< --------------------------------------------  (11) 
----------------------------------------------------------------------------------
SAME FROM      #15 TO      #19 AS FROM       #8 TO      #12 ----------------------  (12) 
    #15 >         PUT   DATEI,SATZ <
    #16 >         B     LESEN<
    #17 >ENDPGM   TERM<
    #18 >*<
    #19 >DATEI    FCB   FCBTYPE=SAM, LINK=DATEN< ---------------------------------  (13) 
----------------------------------------------------------------------------------
INS.           #20 ---------------------------------------------------------------  (14) 
    #20 >         DS    OH< ------------------------------------------------------  (15) 
----------------------------------------------------------------------------------  

(08) –(21) Comparison log

(10)

Records #8 through #14 are present in the primary member only and are represented as INS(erted).

(11)

Output of inserted records.

(12)

Records #15 through #19 of the primary member are identical to records #8 through #12 of the secondary member.

(13)

Output of identical records.

(14)

Record #20 is present in the primary member only and is represented as INS(erted).

(15)

Output of inserted record.

SAME          #21           AS          #13 ------------------------------- (16) 

    #21 >SATZ         DS    CL84< ----------------------------------------- (17)

--------------------------------------------------------------------------------

INS. FROM     #22 TO     #28 ---------------------------------------------- (18)

    #22 >SL      DS    CL2<
    #23 >        DS    CL2<
    #24 >TEXT    DS    CL80<
    #25 >ASATZ   DS    OCL85<
    #26 >ASL     DS    CL2<
    #27 >        DC    X'000001'<
    #28 >ATEXT DS CL80< --------------------------------------------------- (19)

--------------------------------------------------------------------------------

SAME          #29           AS          #14 ------------------------------- (20)

    #29 >            END< ------------------------------------------------- (21)

--------------------------------------------------------------------------------

PRIMARY    ELEMENT= (S)EINAUS/@(0001)/2013-03-01

SECONDARY  ELEMENT= (S)ERFASS/002(0001)/2013-03-01

RESULT: C    PRIMARY=    29 INSERTED=    15 (    3)   DELETED=     0 (    0)

           SECONDARY=    14     SAME=    14 (    4) ----------------------- (22)  

// end --------------------------------------------------------------------- (23)

(16)

Record #21 of the primary member is identical to record #13 of the secondary member.

(17)

Output of identical record.

(18)

Records #20 through #28 are present in the primary member only and are represented as INS(erted).

(19)

Output of inserted records.

(20)

Record #29 of the primary member is identical to record #14 of the secondary member.

(21)

Output of identical record.

(22)

Result of the comparison; output of the number of records of the primary and secondary members, and of the number of inserted, identical and deleted records.

The numbers in parentheses indicate how many continuous sections (consisting of consecutive records) have been inserted, identified as identical, or deleted.

(23)

LMS is terminated.