COBOL Strings: How to Remove Spaces without Using “Trim” function

 In COBOL -85 there is no TRIM function. Below are the best methods to track spaces in input strings. Delimiter is one of the best method to remove spaces.

String FIRST-STRING DELIMITED BY SPACES
       ' ' DELIMITED BY SIZE
       SECOND-STRING DELIMITED BY SIZE
       INTO OUTPUT-STRING

Keep Reading

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.