{"title":"Using COBOL defensive traps","authors":"Eric Garrigue Vesely","doi":"10.1002/(SICI)1096-908X(199709/10)9:5%3C329::AID-SMR156%3E3.0.CO;2-Z","DOIUrl":"https://doi.org/10.1002/(SICI)1096-908X(199709/10)9:5%3C329::AID-SMR156%3E3.0.CO;2-Z","url":null,"abstract":"This paper focuses on inserting defensive traps in COBOL programs during maintenance in order to improve the quality of the software. The paper defines ‘defensive trap’ and describes two types, active and passive. One of the major opportunities present during maintenance is to fix omissions of defensive traps by inserting them into the software. The paper describes nine situations, involving arithmetic verbs, CALL, STRING, UNSTRING, EVALUATE, IF and ELSE, GO TO DEPENDING, SEARCH, and input and output verbs. The other major opportunity present during maintenance is to correct for the weak use or misuse of defensive traps. The paper describes five situations, involving index and subscript checks, IF NEGATIVE, overlapping operands, PERFORM and EXIT, and qualification. The paper includes some examples from experience with inserting and strengthening defensive traps. 1997 John Wiley & Sons, Ltd.","PeriodicalId":383619,"journal":{"name":"J. Softw. Maintenance Res. Pract.","volume":"2 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1997-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125745166","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}