report.acm

report/rel=scr_data/fields=(scr_stat,scr_no,title,descr)/rse="with -
s.subproj_no='3' and s.target_con_name containing -
'B717' and s.area_name containing 'PFD' -
and s.proj_def7 = 'TEST'"/ -
output=report.txt

getdws.com

$ write sys$output ""
$ write sys$output " This program will get a copy of the selected file"
$ write sys$output " from the /sun/CDS/bennettp directory using RCP"
$ if p1 .eqs. ""
$     then
$     inquire p1 "        file"
$ endif
$ file = f$element(0,";",p1)
$ curr_file = f$edit(file, "lowercase")
$ dws_file = f$string("/atsd/projects/du/Displays_Test/CDS/bennettp/" +
curr_file)
$ d_file = f$string("/bennettp/" + curr_file)
$ curr_dws_file = dws_file
$ rshell cds32 "chmod 777 ''curr_dws_file'"
$ c_d_file = d_file
$!PUT FILE INTO LOCAL DIRECTORY
$ rcp cds32::"''curr_dws_file'" 'curr_file'
$ write sys$output " File ",curr_file," Copied from ",c_d_file
$ EXIT

putdws.com

$ write sys$output ""
$ write sys$output " This program will put a copy of the selected file"
$ write sys$output " into the /atsd/users/bennettp directory using RCP"
$ write sys$output ""
$ if p1 .eqs. ""
$     then
$     inquire p1 "        file"
$ endif
$ file = f$element(0,";",p1)
$ curr_file = f$edit(file, "lowercase")
$ dws_file = f$string("/atsd/users/bennettp/" + curr_file)
$ d_file = f$string("/bennettp/" + curr_file)
$ curr_dws_file = dws_file
$ c_d_file = d_file
$!PUT FILE ONTO DWS
$ rcp 'curr_file' cds23::"''curr_dws_file'"
$ write sys$output " Copying ",curr_file," to ",c_d_file
$!CHANGE THE PROTECTIONS ON THE FILE TO MAKE SURE ALL USERS CAN READ IT
$ rshell cds23 "chmod 777 ''curr_dws_file'"
$!
$ EXIT

emailme.com

$ open/write w2 mail_message.txt
$ write w2 "THE JOB IS DONE"
$ close w2
$ MAIL/SUBJECT="JOB FINISHED" mail_message.txt "@ebwr1:[bennettp]pablo"
$ delete/nolog/noconfirm mail_message.txt;*

cmp.com

$ say := "write sys$output"
$ say "****************************************"
$ say "   FILE COMPARISON (CMP)                "
$ say "****************************************"
$ say " @CMP NOT_COVERED.TXT UNTESTABLE.TXT    "
$ say "****************************************"
$ say "this tool compares two files and        "
$ say "generates a file MISSING.TXT that       "
$ say "contains every entry in NOT_COVERED.TXT "
$ say "that is NOT in UNTESTABLE.TXT           "
$ say "                                        "
$ say "NOT_COVERED.TXT is the superset         "
$ say "UNTESTABLE.TXT is the subset            "
$ say "MISSING.TXT is the difference set       "
$ say "****************************************"
$!             CNTL-Y EXIT OPTION
$ on control_y then GOTO close_files
$ if p1 .eqs. ""
$     then
$        inquire p1 "Name of superset"
$ endif
$ if p1 .eqs. ""
$     then
$        p1 := "NOT_COVERED.TXT"
$ endif
$ if p2 .eqs. ""
$     then
$        inquire p2 "Name of subset"
$ endif
$ if p2 .eqs. ""
$     then
$        p2 := "UNTESTABLE.TXT"
$ endif
$!
$!             SPECIFY FILE NAMES
$ file1  = p1
$ file2  = p2
$ FILE_2 = f$search(p2)
$!
$!set message/nofacility/noidentification/noseverity/notext
$ open/read  f1 'file1
$ say "searching ",FILE_2," for everything in ",file1
$ define sys$output CONTENTS.TXT
$ read_loop:
$  read/end=end_read_loop/error=end_read_loop f1 dline
$  elemnt = f$element(0," ",dline)
$  write sys$output elemnt
$  search 'FILE2 'elemnt
$  GOTO read_loop
$ end_read_loop:
$ deassign sys$output
$!
$ search/win=(1,0)/output=missing.txt CONTENTS.TXT %
$ search/match=nand/output=CONTENTS.TXT missing.txt %
$ search/match=nand/output=missing.txt CONTENTS.TXT *
$ search/match=nand/output=CONTENTS.TXT missing.txt """
$ SORT/nodup CONTENTS.TXT MISSING.TXT
$!
$ close_files:
$ deassign sys$output
$ close f1
$!delete /nolog/noconfirm CONTENTS.TXT;
$ set message/facility/identification/severity/text
$!
$ exit

lp.com

$ say := "write sys$output"
$ say "****************************************"
$ say " LIST PROCEDURES (LP)                   "
$ say "****************************************"
$ say " @LP BITE MD90SRC:                      "
$ say "****************************************"
$ say " This example will search all BITE*.ADA "
$ say " files in MD90SRC: and fill output file "
$ say " BIG.CUL with every PACKAGE.PROCEDURE   "
$ say " contained within those searched files. "
$ say "****************************************"
$!             CNTL-Y EXIT OPTION
$ on control_y then GOTO close_files
$ if p1 .eqs. ""
$     then
$        inquire p1 "extract procedures from all files beginning
with(BITE)"
$ endif
$ if p1 .eqs. ""
$     then
$        p1 := "BITE"
$ endif
$ if p2 .eqs. ""
$     then
$        inquire p2 "Directory of source(MD90SRC:)"
$ endif
$ if p2 .eqs. ""
$     then
$        p2 := "MD90SRC:"
$ endif
$!
$ prefix  = p1
$ path  = p2
$ source_files = path + prefix + "*.ada"
$ OUT_FILE := "big.cul"
$ CONTENTS := "contents.txt"
$!
$!             SEARCH FOR KEYWORDS, OUTPUT TO BIG.CUL, CLEANUP
$!
$ say "searching "+source_files+" for package,procedure,function"
$ search/output='OUT_FILE 'source_files "package","procedure","function" 
$ say "removing comments from "+ OUT_FILE
$ search/match=nand/output='CONTENTS 'OUT_FILE "--" 
$ say "removing quoted stuff"
$ search/match=nand/output='OUT_FILE 'CONTENTS """ 
$ say "removing dpkg"
$ search/match=nand/output='CONTENTS 'OUT_FILE "_dpkg is" 
$ say "removing filenames"
$ search/match=nand/output='OUT_FILE 'CONTENTS "[" 
$ say "removing renames"
$ search/match=nand/output='CONTENTS 'OUT_FILE "renames" 
$ say "removing is new"
$ search/match=nand/output='OUT_FILE 'CONTENTS "is new" 
$!
$!             FIX UP BIG.CUL
$!
$! exit
$ open f1 'OUT_FILE
$ say "putting PACKAGE X in front of every PROCEDURE Y in ",OUT_FILE
$ define sys$output 'CONTENTS
$ read_loop:
$  read/end=end_read_loop/error=end_read_loop f1 dline
$  if f$locate("package",dline) .ne. f$length(dline)
$  then
$    offset = f$locate("package",dline)
$    offset = offset + 8
$    stop = f$locate(" is",dline)
$    length = stop - offset
$    package_name = f$extract(offset,length,dline)
$    if f$locate("body",package_name) .ne. f$length(package_name)
$    then
$      offset = f$locate("body",package_name)
$      offset = offset + 5
$      stop = f$length(package_name)
$      length = stop - offset
$      package_name = f$extract(offset,length,package_name)
$    endif
$  endif
$!
$  if f$locate("procedure",dline) .ne. f$length(dline)
$  then
$    offset = f$locate("procedure",dline)
$    offset = offset + 10
$    stop = f$locate(" is",dline)
$    if f$locate(";",dline) .ne. f$length(dline)
$    then
$      stop = f$locate(";",dline) 
$    endif
$    if f$locate("(",dline) .ne. f$length(dline)
$    then
$      stop = f$locate("(",dline) 
$    endif
$    length = stop - offset
$    procedure_name = f$extract(offset,length,dline)
$    procedure_name = package_name + "." + procedure_name
$    write sys$output procedure_name
$  endif
$!
$  if f$locate("function",dline) .ne. f$length(dline)
$  then
$    offset = f$locate("function",dline)
$    offset = offset + 9
$    stop = f$locate(" is",dline)
$    if f$locate("return",dline) .ne. f$length(dline)
$    then
$      stop = f$locate("return",dline) 
$    endif
$    if f$locate("(",dline) .ne. f$length(dline)
$    then
$      stop = f$locate("(",dline) 
$    endif
$    length = stop - offset
$    function_name = f$extract(offset,length,dline)
$    function_name = package_name + "." + function_name
$    write sys$output function_name
$  endif
$!
$  GOTO read_loop
$!
$ end_read_loop:
$!
$ deassign sys$output
$!
$!             CLEANUP     
$!
$ say "capitalizing"
$ edit/edt/command=sys$input 'CONTENTS
sub /a/A/wh /notype
sub /b/B/wh /notype
sub /c/C/wh /notype
sub /d/D/wh /notype
sub /e/E/wh /notype
sub /f/F/wh /notype
sub /g/G/wh /notype
sub /h/H/wh /notype
sub /i/I/wh /notype
sub /j/J/wh /notype
sub /k/K/wh /notype
sub /l/L/wh /notype
sub /m/M/wh /notype
sub /n/N/wh /notype
sub /o/O/wh /notype
sub /p/P/wh /notype
sub /q/Q/wh /notype
sub /r/R/wh /notype
sub /s/S/wh /notype
sub /t/T/wh /notype
sub /u/U/wh /notype
sub /v/V/wh /notype
sub /w/W/wh /notype
sub /x/X/wh /notype
sub /y/Y/wh /notype
sub /z/Z/wh /notype
exit
$ say "sorting"
$ sort/nodup 'CONTENTS 'OUT_FILE 
$!
$!
$ close_files:
$ deassign sys$output
$ close f1
$ delete /nolog/noconfirm 'CONTENTS;
$ exit

cp.com

$ say := "write sys$output"
$ say ""
$ say "****************************************"
$ say "   FILE COMPARISON"
$ say "****************************************"
$ say ""
$ say "this tool compares two files and"
$ say "generates a file MISSING.TXT that"
$ say "contains every entry in FILE1 that is"
$ say "NOT contained in FILE2."
$ say ""
$ say "FILE1 is the superset"
$ say "FILE2 is the subset"
$ say "MISSING.TXT is the difference set"
$ say ""
$ say "****************************************"
$!             CNTL-Y EXIT OPTION
$ on control_y then GOTO close_files
$ p3 = "BITE"
$ if p1 .eqs. ""
$     then
$        inquire p1 "Name of big file(superset)"
$ endif
$ if p2 .eqs. ""
$     then
$        inquire p2 "Name of small file(subset)"
$ endif
$!
$!             SPECIFY FILE NAMES
$ cul_file  = p1
$ tcr_file  = p2
$!             READ FILE LIST; SEARCH FOR KEYWORDS; OUTPUT TO FILE
$ open/read  f1 'tcr_file
$ open/write w1 TCR_ELEMENT.LIS
$ flag = 0
$ read_loop:
$  read/end=end_read_loop/error=end_read_loop f1 line
$  cline = f$edit(line, "COMPRESS, TRIM")
$  pline = f$edit(line, "COLLAPSE, TRIM")
$  if (pline .EQS. "UnitNameTotalDecisionCondStatemntBlockMixedBool") then
flag = 1
$  if (pline .NES. "UnitNameTotalDecisionCondStatemntBlockMixedBool")
.AND. (flag .EQ. 0) then GOTO read_loop
$  if (pline .EQS.
"AMD-29050TestCoverageAnalyzer(TCA)Version5.4.00CLASSA") then GOTO
end_read_loop
$!
$  if (f$extract(0,f$length(p3),cline) .EQS. p3)
$      then
$      element    = f$element(0,"-",cline)
$      cul_elemnt = f$element(0," ",element)
$      percent_fd = f$element(1," ",element)
$!         If the input line wraps ONCE
$      if (f$element(1,"-",cline) .NES. "-")
$         then
$         read/end=end_read_loop/error=end_read_loop f1 line
$         eline = f$edit(line, "COMPRESS, TRIM")
$         percent_fd = f$element(1," ",eline)
$         cul_elemnt = cul_elemnt + f$element(0," ",eline)
$!            If the input line wraps TWICE (no provision made for THREE
wraps)
$         if (f$element(1,"-",eline) .NES. "-")
$            then
$            read/end=end_read_loop/error=end_read_loop f1 line
$            fline = f$edit(line, "COMPRESS, TRIM")
$            percent_fd = f$element(1," ",fline)
$            cul_elemnt = cul_elemnt + f$element(0," ",fline)
$         endif
$      endif
$     tcr_elemnt = cul_elemnt + "        " + percent_fd
$     write w1 tcr_elemnt
$  endif
$!
$  GOTO read_loop
$ end_read_loop:
$!
$ close w1
$!        PARSE THE CUL FILE AND SEARCH THE TCR LIST FOR THAT ELEMENT
$!
$ total_culs = 0
$ open/read  f2 'cul_file
$! open/write w2 CUL_CONTENTS.TXT
$ define sys$output CUL_CONTENTS.TXT
$ read_cul_loop:
$  read/end=end_read_cul_loop/error=end_read_cul_loop f2 dline
$  sline = f$edit(dline, "COMPRESS, TRIM")
$  tline = f$edit(dline, "COLLAPSE, TRIM")
$  if (f$extract(0,1,sline) .NES. "#") .AND. (f$extract(0,1,tline) .NES.
"")
$    then
$    cul_elemnt = f$element(0," ",sline)
$    total_culs = total_culs + 1
$    write sys$output " CUL file entry: ",cul_elemnt
$    set message/nofacility/noidentification/noseverity/notext
$    search TCR_ELEMENT.LIS 'cul_elemnt
$    write sys$output
"---------------------------------------------------"
$  endif
$!
$  GOTO read_cul_loop
$ end_read_cul_loop:
$ deassign sys$output
$ close w2
$!
$ flag2 = "OFF"
$ flag3 = "EMPTY"
$ open/read  f3 CUL_CONTENTS.TXT
$ open/write  w3 Missing.txt
$ read_dul_loop:
$  read/end=end_read_dul_loop/error=end_read_dul_loop f3 dline
$  sline = f$edit(dline, "COMPRESS, TRIM")
$  tline = f$edit(dline, "COLLAPSE, TRIM")
$  if (f$extract(0,15,sline) .EQS. "CUL file entry:")
$    then
$    flag2 = "SET"
$    temp_var = f$element(1,":",tline)
$  endif
$  if (f$extract(0,15,sline) .EQS. "---------------") .AND. (flag2 .EQS.
"SET")
$    then
$    write w3 temp_var
$    flag3 = "NOT_EMPTY"
$  endif
$  if (f$extract(0,15,sline) .NES. "CUL file entry:") .AND.
(f$extract(0,15,sline) .NES. "---------------")
$    then
$    flag2 = "OFF"
$  endif
$!
$  GOTO read_dul_loop
$ end_read_dul_loop:
$!
$ if (flag3 .EQS. "EMPTY") then write w3 "All units in ",cul_file," appear in ",tcr_file,"."
$!
$ close_files:
$ deassign sys$output
$ close f1
$ close f2
$ close f3
$ set message/nofacility/noidentification/noseverity/notext
$ close w1
$ close w2
$ close w3
$ delete /nolog/noconfirm temp_search_res.txt;
$ delete /nolog/noconfirm TCR_ELEMENT.LIS;
$ delete /nolog/noconfirm CUL_CONTENTS.TXT;
$ set message/facility/identification/severity/text
$!
$ exit

rt.com

$ say := "write sys$output"
$ say ""
$ say "****************************************"
$ say "The naming conventions must be strictly"
$ say "followed for this com file to execute"
$ say "correctly. For example:"
$ say ""
$ say "Disp1:"
$ say "testfile: BCH_SH0022.TDF"
$ say "driver:   BCH_SH0022_D.ADA"
$ say ""
$ say "Disp2:"
$ say "testfile: BCH_WV2000.TDF"
$ say "driver:   BCH_WV2000_D.ADA"
$ say ""
$ say "Disp3:"
$ say "testfile: BCH_IO3000.TDF"
$ say "driver:   BCH_IO3000_D.ADA"
$ say "****************************************"
$ say ""
$ SETUP_FILE = f$search("setup.com")
$!
$ if SETUP_FILE .NES. "" then goto setup_exist
$ say ""
$ say "****************************************"
$ say "I like to have a file called setup.com in"
$ say "the local directory, that this program will call."
$ say "Setup.com sets up the a29 library and"
$ say "the source directory for TCA."
$ say "It looks something like this:"
$ say ""
$ say " define a29_library swit405:disp1.alb"
$ say " define TCA_SRC b3740src"
$ say ""
$ say "You can define these logicals by hand"
$ say "but when using many windows, this"
$ say "is more convenient. Either way,"
$ say "the a29_library logical must be defined."
$ say "****************************************"
$ say ""
$ goto no_setup
$!
$    setup_exist:
$ @setup
$!
$    no_setup:
$ PATH  = f$environment("default")
$ LIB   = "a29_library"
$ SQE   = "NONE"
$ TEST  = ""
$ KEEP  = "FALSE"
$ RERUN = "FALSE"
$ CFG   = "TEMP"
$!
$ if p1 .eqs. "" 
$     then
$     inquire p1 " Enter Test Id (ex.BCH_SH0022)"
$     inquire p2 " RERUN/RUN (RUN)"
$ endif
$ if p2 .eqs. "RERUN" then RERUN := "TRUE"
$!
$!    Set up additional logicals for handling multiple files
$ p1      = f$element(0,".",p1)
$ DRIVER := "''p1'_d"
$ TLIB   := "''p1'.alb"
$ HDBF   := "''p1'.hdb"
$ PTHF   := "''driver'.pth"
$ RESF   := "''p1'.res"
$ TCRF   := "''p1'.tcr"
$ TDFF   := "''p1'.tdf"
$ VERF   := "''p1'.ver"
$ XINF   := "''driver'.xin"
$ COMPF  := "''p1'_b.com"
$!
$ define/nolog LHDBF 'HDBF
$!
$ if f$search(PATH+TDFF) .eqs. "" then PATH = PATH+":"
$ CUL_FILE    = f$search(PATH+p1+".cul")
$ DRIVER_FILE = f$search(PATH+DRIVER+".ada")
$ TDF_FILE    = f$search(PATH+TDFF)
$!
$   test_tdf_exist:
$ if TDF_FILE .NES. "" then goto test_driver_exist
$ say "ERROR - TDF file not found!"
$ exit
$!
$   test_driver_exist:
$ if DRIVER_FILE .NES. "" then goto test_library_exist
$ say "ERROR - Driver file not found!"
$ exit
$!
$   test_library_exist:
$ if f$search(LIB) .NES. "" then goto start_test
$ library_error:
$ say "ERROR - Library not found:" + LIB
$ exit
$!
$   start_test:
$ say "--> Starting test " + TDF_FILE
$ say ""
$!
$   say LIB
$
$   lib_name = f$logical(LIB)
$
$   if lib_name .eqs. ""
$   then
$     lib_name = f$search(LIB)
$   endif
$
$   say lib_name
$
$   if f$locate("DISP1",lib_name) .ne. f$length(lib_name)
$   then
$       disp = "1"
$       say disp
$   else
$     if f$locate("DISP2",lib_name) .ne. f$length(lib_name)
$     then
$         disp = "2"
$         say disp
$     else
$         disp = "3"
$         say disp
$     endif
$   endif
$  
$   say ""
$   say ""
$!      Rerunning test without recompiling library
$ if RERUN .eqs. "TRUE" then define/nolog a29_library 'TLIB
$ if RERUN .eqs. "TRUE" .AND. f$search(TLIB) .eqs. "" then goto
library_error
$!
$!      Running test with recompiling library
$ if RERUN .nes. "TRUE"
$   then
$   a29/plu/command="create ''TLIB'"/lib='LIB
$   define/nolog a29_library 'TLIB
$!
$ BUILD_FILE = f$search(COMPF)
$!
$ if BUILD_FILE .EQS. "" then goto no_builder
$ say "USING " + COMPF
$ @'COMPF
$ goto test_execution
$ no_builder:
$!
$   say "--> COMPITE."
$   compite_nosched 'DRIVER_FILE
$!
$!   Define the paths to be used for the link include and segment files.
$!
$    define/nolog inc EBWR1:[bennettp.inc]
$!
$   if disp .eqs. "1"
$   then
$     say "--> DISP1 LINK."
$     a29/link/map/prog/debug/nocoff_debug/tca_paths -
          /test=9 -
          /noselective -
          /buffer_raised_exception/exceptions=(nonames,notrace) -
          /segment_file=inc:HW155DISP1.SEG -
          /heap_areas=(size1:1000) -
          /large_application/semaphores=0/notasks -
  
 /include=(inc:all_objects.a,inc:graph1.a,inc:io.a,inc:part_number.o) -
         'DRIVER
$   else
$     if disp .eqs. "2"
$     then
$       say "--> DISP2 LINK."
$       a29/link/map/prog/debug/nocoff_debug/tca_paths -
          /test=9 -
          /noselective -
          /buffer_raised_exception/exceptions=(nonames,notrace) -
          /segment_file=inc:HW155DISP2.SEG -
          /heap_areas=(size1:1000) -
          /large_application/semaphores=0/notasks -
  
 /include=(inc:all_objects.a,inc:graph2.a,inc:io.a,inc:aaf2_acs_defaults.o) -
        'DRIVER
$     else
$       say "--> MAINT LINK."
$       a29/link/map/prog/debug/nocoff_debug/tca_paths -
          /test=9 -
          /noselective -
          /buffer_raised_exception/exceptions=(nonames,notrace) -
          /segment_file=inc:HW155MAINT.SEG -
          /heap_areas=(size1:1000) -
          /large_application/semaphores=0/notasks -
          /include=(inc:all_objects.a,inc:maint_io.a) -
         'DRIVER
$     endif
$   endif
$!    The next endif indicates the end of IF RERUN .NES. TRUE
$ endif
$!
$ test_execution:
$ say "--> EXECUTE "+ p1
$ tgs/hdb'TEST 'TDF_FILE
$ a29/xdeb/targ=vaxissvm/xinfo='DRIVER/mode=batch/out='resf 'DRIVER
  set display commands off
  close source
  define debug input "LHDBF"
$ tgs/ver 'RESF
$ say "--> Test execution completed."
$!
$ if disp .eqs. "1"
$  then
$   say "--> DISP1 TCA."
$   if CUL_FILE .nes. ""
$    then
$     TCA -"BATS" -p 'DRIVER -x 'DRIVER -c 'CUL_FILE -r 'TCRF -t 1
--"ignore=A,I,G,H"
$   else
$    say "WARNING - CUL file missing; no TCA collected."
$   endif
$ else
$  if disp .eqs. "2"
$   then
$    say "--> DISP2 TCA."
$     if CUL_FILE .nes. ""
$      then
$       TCA -"BATS" -p 'DRIVER -x 'DRIVER -c 'CUL_FILE -r 'TCRF -t 3
--"ignore=A,I,G,H"
$     else
$      say "WARNING - CUL file missing; no TCA collected."
$     endif
$  else
$   say "--> NO TCA REQUIRED FOR MAINT PARTITION"
$  endif
$ endif
$!
$!GTCE 'TCRF
$!
$ say "--> attempt to generate test configuration stamp for " + p1
$ say ""
$ say ""
$ say ""
$ if CUL_FILE .eqs. "" then CUL_FILE = "NONE"
$ TEST_STAMP := "''p1'.SMP"
$ define sys$output 'TEST_STAMP
$ TESTER    := 'f$edit(f$getjpi(0,"USERNAME"),"TRIM")'
$ NODE_NAME := 'f$getsyi("NODENAME")'
$ say
"------------------------------------------------------------------------`
$ say ""
$ say "Test:           " + TDF_FILE
$ say "Performed By:   " + TESTER
$ say "From The Node:  " + NODE_NAME
$ say "SQE Witness:    " + SQE
$ say ""
$ say "Driver File:    " + DRIVER_FILE
$ say "CUL File:       " + CUL_FILE
$ say ""
$ say "ITE Version:    " + f$logical("ite_version")
$ say "HADS Version:   " + f$logical("a29_version")
$ say "DCT$SUPPORT :   " + f$logical("dct$support")
$ say ""
$ say
"------------------------------------------------------------------------`
$ say ""
$ a29/plu/command="library"
$ say ""
$ say
"------------------------------------------------------------------------`
$ deassign sys$output
$ convert 'TEST_STAMP,'VERF 'TEST_STAMP
$ delete 'VERF;0
$ rename 'TEST_STAMP 'VERF
$!
$!
$ say "--> Test " + p1 + " has successfully completed execution."
$!

ct.com

$ lp == "@EBWR1:[bennettp]lp"
$ say := "write sys$output"
$ say "****************************************"
$ say " CUL/TCR FILE COMPARISON (CT)           "
$ say "****************************************"
$ say " @CT BITE MD90SRC: MD90TEST:            "
$ say "****************************************"
$ say " This tool compares a CUL file with a   "
$ say " TCR file and generates a file          "
$ say " NOT_COVERED.TXT that                   "
$ say " contains every CUL entry that is       "
$ say " NOT covered by the TCR.                "
$ say "                                        "
$ say " This tool starts by building a CUL file"
$ say " containing every package.procedure     "
$ say " in a source directory [using LP], then "
$ say " builds a TCR file containing all       "
$ say " the TCR headers in a test directory,   "
$ say " and then this tool will produce        "
$ say " NOT_COVERED.TXT containing a list      "
$ say " of procedures that remain uncovered.   "
$ say "****************************************"
$!             CNTL-Y EXIT OPTION
$ on control_y then GOTO close_files
$ if p1 .eqs. ""
$     then
$        inquire p1 "extract procedures from all files beginning
 with(PFD)"
$ endif
$ if p1 .eqs. ""
$     then
$        p1 := "PFD"
$ endif
$ first_char = f$extract(0,1,p1)
$ if p2 .eqs. ""
$     then
$        inquire p2 "Directory of source(md90SRC:)"
$ endif
$ if p2 .eqs. ""
$     then
$        p2 := "md90SRC:"
$ endif
$ if p3 .eqs. ""
$     then
$        inquire p3 "Name of test directory path(md90test:)"
$ endif
$ if p3 .eqs. ""
$     then
$        p3 := "md90test:"
$ endif
$ tcr_files = p3 + first_char + "*.tcr"
$!
$!             BUILD CUL, TCR HEADER FILES
$!
$ say "build CUL file"
$ LP 'p1 'p2 
$ say "build TCR HEADER file"
$ search/OUTPUT=big.tcr/win=(500,0) 'tcr_files "Total Percentages   "
$!
$!             SPECIFY FILE NAMES
$!
$ cul_file  = "big.cul"
$ tcr_file  = "big.tcr"
$!
$!             READ FILE LIST; SEARCH FOR KEYWORDS; OUTPUT TO FILE
$ say "READ FILE LIST; SEARCH FOR KEYWORDS; OUTPUT TO FILE"
$!
$ open/read  f1 'tcr_file
$ open/write w1 TCR_ELEMENT.LIS
$ flag = 0
$ read_loop:
$  read/end=end_read_loop/error=end_read_loop f1 line
$  cline = f$edit(line, "COMPRESS, TRIM")
$  pline = f$edit(line, "COLLAPSE, TRIM")
$  if (pline .EQS. "UnitNameTotalDecisionCondStatemntBlockMixedBool") then
 flag = 1
$  if (pline .NES. "UnitNameTotalDecisionCondStatemntBlockMixedBool")
 .AND. (flag .EQ. 0) then GOTO read_loop
$  if (pline .EQS.
 "AMD-29050TestCoverageAnalyzer(TCA)Version5.4.00CLASSA") then GOTO
 end_read_loop
$!
$  if (f$extract(0,f$length(p1),cline) .EQS. p1)
$      then
$      element    = f$element(0,"-",cline)
$      cul_elemnt = f$element(0," ",element)
$      percent_fd = f$element(1," ",element)
$!         If the input line wraps ONCE
$      if (f$element(1,"-",cline) .NES. "-")
$         then
$         read/end=end_read_loop/error=end_read_loop f1 line
$         eline = f$edit(line, "COMPRESS, TRIM")
$         percent_fd = f$element(1," ",eline)
$         cul_elemnt = cul_elemnt + f$element(0," ",eline)
$!            If the input line wraps TWICE (no provision made for THREE
 wraps)
$         if (f$element(1,"-",eline) .NES. "-")
$            then
$            read/end=end_read_loop/error=end_read_loop f1 line
$            fline = f$edit(line, "COMPRESS, TRIM")
$            percent_fd = f$element(1," ",fline)
$            cul_elemnt = cul_elemnt + f$element(0," ",fline)
$         endif
$      endif
$     tcr_elemnt = cul_elemnt + "        " + percent_fd
$     write w1 tcr_elemnt
$  endif
$!
$  GOTO read_loop
$ end_read_loop:
$!
$ close w1
$!
$!        PARSE THE CUL FILE AND SEARCH THE TCR LIST FOR THAT ELEMENT
$ say "PARSE THE CUL FILE AND SEARCH THE TCR LIST FOR THAT ELEMENT"
$!
$ total_culs = 0
$ open/read  f2 'cul_file
$! open/write w2 CUL_CONTENTS.TXT
$ define sys$output CUL_CONTENTS.TXT
$ read_cul_loop:
$  read/end=end_read_cul_loop/error=end_read_cul_loop f2 dline
$  sline = f$edit(dline, "COMPRESS, TRIM")
$  tline = f$edit(dline, "COLLAPSE, TRIM")
$  if (f$extract(0,1,sline) .NES. "#") .AND. (f$extract(0,1,tline) .NES.
 "")
$    then
$    cul_elemnt = f$element(0," ",sline)
$    total_culs = total_culs + 1
$    write sys$output " CUL file entry: ",cul_elemnt
$    set message/nofacility/noidentification/noseverity/notext
$    search TCR_ELEMENT.LIS 'cul_elemnt
$    write sys$output
 "---------------------------------------------------"
$  endif
$!
$  GOTO read_cul_loop
$ end_read_cul_loop:
$ deassign sys$output
$ close w2
$!
$ say "build not_covered.txt"
$!
$ flag2 = "OFF"
$ flag3 = "EMPTY"
$ open/read  f3 CUL_CONTENTS.TXT
$ open/write  w3 not_covered.txt
$ read_dul_loop:
$  read/end=end_read_dul_loop/error=end_read_dul_loop f3 dline
$  sline = f$edit(dline, "COMPRESS, TRIM")
$  tline = f$edit(dline, "COLLAPSE, TRIM")
$  if (f$extract(0,15,sline) .EQS. "CUL file entry:")
$    then
$    flag2 = "SET"
$    temp_var = f$element(1,":",tline)
$  endif
$  if (f$extract(0,15,sline) .EQS. "---------------") .AND. (flag2 .EQS.
 "SET")
$    then
$    write w3 temp_var
$    flag3 = "NOT_EMPTY"
$  endif
$  if (f$extract(0,15,sline) .NES. "CUL file entry:") .AND.
 (f$extract(0,15,sline) .NES. "---------------")
$    then
$    flag2 = "OFF"
$  endif
$!
$  GOTO read_dul_loop
$ end_read_dul_loop:
$!
$ if (flag3 .EQS. "EMPTY") then write w3 "All units in ",cul_file," appear
 in ",tcr_file,"."
$!
$ close_files:
$ deassign sys$output
$ close f1
$ close f2
$ close f3
$ set message/nofacility/noidentification/noseverity/notext
$ close w1
$ close w2
$ close w3
$ delete /nolog/noconfirm temp_search_res.txt;
$ delete /nolog/noconfirm TCR_ELEMENT.LIS;
$ delete /nolog/noconfirm CUL_CONTENTS.TXT;
$ set message/facility/identification/severity/text
$ sort/nodup not_covered.txt not_covered.txt
$!
$ exit




back

1

Hosted by www.Geocities.ws