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
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today