COBOL and line numbers

As if HP-UX was not enough, I've been busy with mainframe customer issue. So, I had to look at several COBOL codes found by Google.

Since when don't COBOL source lines need to be prefixed with line numbers? COBOL sources I find internally here are all prefixed so I wrote a small script to take diff. It ignores case differences, white space, comment lines.
$ cat coboldiff.sh
#!/bin/bash
file1=$(echo $1 | sed 's|/|_|g')
file2=$(echo $2 | sed 's|/|_|g')
cut -c7-72 $1 | grep -v '\^\\\*' > /tmp/$file1
cut -c7-72 $2 | grep -v '\^\\\*' > /tmp/$file2
diff -Bicbw /tmp/$file1 /tmp/$file2
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« May 2015
SunMonTueWedThuFriSat
     
2
3
5
8
9
10
12
13
14
16
17
23
24
30
31
      
Today