Dear all

I am seeking for your assistance. I have a large dataset with more than 400 variables in the form of a matrix. The variables are company names. I want to recode all the values greater 1 to 1. I can do it manually but the variables are too many to do the task. I am asking if there is any other way to recode all the values. My sample of the dataset is as below.

Your help is highly appreciated.

----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str27 Companies byte AcoAltona double(AcosVill AESElpa AESSul) byte AESTieteE double AESTiete
"521 Particip"        0 0                 0                 0 0                  0
"524 Particip"        0 0                 0                 0 0                  0
"A P Participacoes"   0 0                 0                 0 0                  0
"AES Elpa"            0 0                 0    249173.5401575 0       779422.68105
"AES Sul"             0 0 69323.74467778359                 0 0 1781537.5434122258
"AES Tiete"           0 0     30329.1385225    249173.5401575 0                  0
"AES Tiete E"         0 0     30329.1385225    249173.5401575 0       779422.68105
"AGF Brasil"          0 0                 0                 0 0                  0
"AGconcessoes"        0 0                 0                 0 0                  0
"Aco Altona"          0 0                 0                 0 0                  0
"Acos Vill"           0 0                 0                 0 0                  0
"Aetatis Sec"         0 0                 0                 0 0                  0
"Agpart"              0 0                 0                 0 0                  0
"Albarus"             0 0                 0                 0 0                  0
"Alef S/A"            0 0                 0                 0 0                  0
"Alfa Consorc"        0 0                 0                 0 0                  0
"Alfa Financ"         0 0                 0                 0 0                  0
"Alfa Holding"        0 0                 0                 0 0                  0
"Alfa Invest"         0 0                 0                 0 0                  0
"Aliperti"            0 0                 0                 0 0                  0
"All Amer Lat"        0 0                 0                 0 0                  0
"All Norte"           0 0                 0                 0 0                  0
"Alpargatas"          0 0                 0                 0 0                  0
"Altere Sec"          0 0                 0                 0 0                  0
"Am Inox BR"          0 0                 0                 0 0                  0
"Amazonia"            0 0                 0                 0 0                  0
"Amazonia Celular"    0 0                 0                 0 0                  0
"Ambev S/A"           0 0                 0                 0 0                  0
"Amelco"              0 0                 0                 0 0                  0
"Ampla Energ"         0 0                 0 398677.6404889594 0                  0
"Anhanguera"          0 0                 0                 0 0                  0
"Aracruz"             0 0                 0                 0 0                  0
"Araucaria"           0 0                 0                 0 0                  0
"Arcelor BR"          0 0                 0                 0 0                  0
"Arteb"               0 0                 0                 0 0                  0
"Arthur Lange"        0 0                 0                 0 0                  0
"Atompar"             0 0                 0                 0 0                  0
"Azevedo"             0 0                 0                 0 0                  0
"BR Ferrovias"        0 0                 0                 0 0                  0
"BR Propert"          0 0                 0                 0 0                  0
"BRB Banco"           0 0                 0                 0 0                  0
"BRF SA"              0 0                 0                 0 0                  0
"Bahema"              0 0                 0                 0 0                  0
"Bahema Equipament"   0 0                 0                 0 0                  0
"Ban Armazens"        0 0                 0                 0 0                  0
"Banco Bec"           0 0                 0                 0 0                  0
"Bandeirante Energ"   0 0                 0                 0 0                  0
"Banese"              0 0                 0                 0 0                  0
"Banespa"             0 0                 0                 0 0                  0
"Banestado"           0 0                 0                 0 0                  0
"Banestes"            0 0                 0                 0 0                  0
"Banex S/A"           0 0                 0                 0 0                  0
"Banpara"             0 0                 0                 0 0                  0
"Banrisul"            0 0                 0                 0 0                  0
"Bardella"            0 0                 0                 0 0                  0
"Battistella"         0 0                 0                 0 0                  0
"Baumer"              0 0                 0                 0 0                  0
"Belapart"            0 0                 0                 0 0                  0
"Bemge"               0 0                 0                 0 0                  0
"Bergamo"             0 0                 0                 0 0                  0
"Besc"                0 0                 0                 0 0                  0
"Betapart"            0 0                 0                 0 0                  0
"Bic Monark"          0 0                 0                 0 0                  0
"Biomm"               0 0                 0                 0 0                  0
"Blue Tree"           0 0                 0                 0 0                  0
"Bombril"             0 0                 0                 0 0                  0
"Bompreco Bah"        0 0                 0                 0 0                  0
"Bonaire Part"        0 0                 0                 0 0                  0
"Botucatu Tex"        0 0                 0                 0 0                  0
"Bradesco"            0 0                 0                 0 0                  0
"Bradespar"           0 0                 0                 0 0                  0
"Brasil"              0 0                 0                 0 0                  0
"Brasil T Par"        0 0                 0                 0 0                  0
"Braskem"             0 0                 0                 0 0                  0
"Brasmotor"           0 0                 0                 0 0                  0
"Brazilian Fr"        0 0                 0                 0 0                  0
"Buettner"            0 0                 0                 0 0                  0
"Bunge Brasil"        0 0                 0                 0 0                  0
"CBC Cartucho"        0 0                 0                 0 0                  0
"CCR SA"              0 0                 0                 0 0                  0
"CPFL Energia"        0 0                 0                 0 0                  0
"CPFL Geracao"        0 0                 0                 0 0                  0
"CPFL Piratininga"    0 0                 0                 0 0                  0
"Cabinda Part"        0 0                 0                 0 0                  0
"Cacique"             0 0                 0                 0 0                  0
"Caconde Part"        0 0                 0                 0 0                  0
"Caemi"               0 0                 0                 0 0                  0
"Caf Brasilia"        0 0                 0                 0 0                  0
"Caianda Part"        0 0                 0                 0 0                  0
"Cambuci"             0 0                 0                 0 0                  0
"Capitalpart"         0 0                 0                 0 0                  0
"Caraiba Met"         0 0                 0                 0 0                  0
"Cargill Fertilizant" 0 0                 0                 0 0                  0
"Casan"               0 0                 0                 0 0                  0
"Cbcc Contact Center" 0 0                 0                 0 0                  0
"Ceb"                 0 0                 0                 0 0                  0
"Cedro"               0 0                 0                 0 0                  0
"Ceee-Gt"             0 0                 0                 0 0                  0
"Ceg"                 0 0                 0                 0 0                  0
"Celesc"              0 0                 0                 0 0                  0
end
------------------ copy up to and including the previous line ------------------