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

This blog copyright 2009 by Katsumi Inoue