/******************************* REXX ********************************/ /*** Purpose: Compare the member with that available in Production ***/ /*** : Library. The member must be either a Proc, Source, ***/ /*** : Control proc or Copybook. ***/ /*** Input : If used in ChangeMan --> member name (req. only if ***/ /*** : component under comparison is copybook or ctlproc) ***/ /*** : Other than ChangeMan --> None ***/ /*** Output : Comparison results ***/ /*** Author : Yash Pal Samnani ***/ /*********************************************************************/ /*--------------------------------------------------------------*/ /* Gather the member name to be compared */ /*--------------------------------------------------------------*/ "ISREDIT MACRO ("||mem||")" hold_mem = mem hold_mem = STRIP(hold_mem) /*-----------------------------------------------------------------*/ /* The component name is gathered by ISREDIT command */ /* Note that this will overwrite the member name entered by User */ /*-----------------------------------------------------------------*/ "ISREDIT (mem) = MEMBER" /*-----------------------------------------------------------------*/ /* If the member is in changeman then find the member name */ /* Note that the ISREDIT useage makes the mem name as blank if */ /* the tool is executed in changeman package */ /* Now find the member name only if it is either source or proc */ /* For control pros and copybook, the user MUST enter the component*/ /* name otherwise the attempt will fail and message to this effect */ /* will be shown. */ /*-----------------------------------------------------------------*/ IF mem = '' THEN DO Call Get_Srce_name IF mem = '' THEN DO Call Get_Proc_name IF (mem = '') & (hold_mem = '') THEN DO msg1 = "Specify the member name for comparison in ChangeMan. " msg2 = "Attempt failed !" ZEDLMSG = msg1 || msg2 ZEDLMSG = msg1 || msg2 "ISPEXEC SETMSG MSG(ISRZ000)" EXIT END IF (mem = '') & (hold_mem /= '') THEN mem = hold_mem END END /*"ISREDIT (pds) = DATASET" */ mem = STRIP(mem) upper mem /*--------------------------------------------------------------*/ /* Standard library against which comparison will be done */ /*--------------------------------------------------------------*/ STD_SRC = "'"||"BOXA.PROD.TECH.SRCE("||mem||")'" STD_PRC = "'"||"BOXA.PROD.TECH.PROC("||mem||")'" STD_CTLPRC = "'"||"BOXA.PROD.TECH.CTLPROC("||mem||")'" STD_CPYLIB = "'"||"BOXA.PROD.TECH.COPYLIB("||mem||")'" "isredit f PROGRAM-ID first " IF RC = 0 then identity = 'SOURCE' "ISREDIT F ALL 'IDENTIFICATION'" IF RC = 0 then identity = 'SOURCE' "ISREDIT F ALL 'ENVIRONMENT'" IF RC = 0 then identity = 'SOURCE' IF identity = 'SOURCE' then DO if sysdsn(STD_SRC) = 'OK' THEN DO "ISREDIT COMP "STD_SRC "isredit l first special" if rc = 0 then do status = 'Y' end "isredit l first label" if rc = 0 then do status = 'Y' end if status = 'Y' then ZEDSMSG = "Source compared !" else ZEDSMSG = "Files are same !" "ISPEXEC SETMSG MSG(ISRZ000)" EXIT END END IF sysdsn(STD_PRC) = 'OK' THEN DO "ISREDIT COMP "STD_PRC "isredit l first label" if rc = 0 then do status = 'Y' end "isredit l first special" if rc = 0 then do status = 'Y' end if status = 'Y' then ZEDSMSG = "PROC compared !" else ZEDSMSG = "Files are same !" "ISPEXEC SETMSG MSG(ISRZ000)" EXIT END IF sysdsn(std_ctlprc) = 'OK' THEN DO "ISREDIT COMP "std_ctlprc "isredit l first label" if rc = 0 then do status = 'Y' end "isredit l first special" if rc = 0 then do status = 'Y' end if status = 'Y' then ZEDSMSG = "Control Proc compared !" else ZEDSMSG = "Files are same !" "ISPEXEC SETMSG MSG(ISRZ000)" EXIT END IF sysdsn(std_cpylib) = 'OK' THEN DO "ISREDIT COMP "std_cpylib "isredit l first label" if rc = 0 then do status = 'Y' end "isredit l first special" if rc = 0 then do status = 'Y' end if status = 'Y' then ZEDSMSG = "Copy Book compared !" else ZEDSMSG = "Files are same !" "ISPEXEC SETMSG MSG(ISRZ000)" EXIT END msg1 = "Attempt failed! Either the component is not available in the " msg2 = "Production Library OR the component being compared is other " msg3 = "than Proc, Source, ControlProc or Copy Book." ZEDLMSG = msg1 || msg2 || msg3 "ISPEXEC SETMSG MSG(ISRZ000)" EXIT Get_Srce_name: /*--------------------------------------------------------------*/ /* Gather the source name when the macro is used in ChangeMan */ /*--------------------------------------------------------------*/ "isredit f PROGRAM-ID first " IF RC = 0 then do "isredit (line1) = LINE .ZCSR" parse var line1 junk1 '.' mem '.' mem = strip(mem) End Return Get_Proc_name: /*--------------------------------------------------------------*/ /* Gather the proc name when the macro is used in ChangeMan */ /*--------------------------------------------------------------*/ "isredit f PROC first" "isredit (line1) = LINE .ZCSR" parse var line1 '//' mem ' PROC' junk mem = strip(mem) Return