INSPECT TALLYING FOR CHARACTER The following COBOL program depicts the use of INSPECT TALLYING FOR CHARACTER 01 TEST-STRING PIC X(40) VALUE SPACES. 01 WS-COUNTER PIC 9(9) VALUE ZEROES. 01 SEARCH-STRING PIC X(2) VALUE SPACES. MOVE ‘THIS IS TEST STRING TO TEST LEADING SPACES’ INSPECT TEST-STRING TALLYING WS-COUNTER FOR DISPLAY ‘COUNT OF ALL CHARACTERS IS = ‘ The output of the program is COUNT OF ALL CHARACTERS IS = 000000040