Hi there. New to COBOL, please excuse overly stupid questions.
I came across an example version of an MD5 checksum generator written entirely in COBOL[1]. However I note that it's written in Micro Focus format - which I take it is one dialect of COBOL. So, using the 2.2 release of GNU COBOL I ran the following:
tr -d '\r' < cobmd5.cbl > cobmd5-2.cbl
sed -i 's/^\*/*>/g' cobmd5-2.cbl
cobc -std=mf -free -x -o cobmd5 cobmd5-2.cbl
The tr and sed commands are to change the source from DOS line-endings to Unix ones and to change the bare "*" comments to "*>" comments (I'm guessing an unsupported MF COBOL extension?).
And I get the following:
cobmd5-2.cbl: 158: warning: REDEFINES clause should follow entry-name
cobmd5-2.cbl: 165: warning: REDEFINES clause should follow entry-name
cobmd5-2.cbl: 178: warning: REDEFINES clause should follow entry-name
cobmd5-2.cbl: 190: warning: REDEFINES clause should follow entry-name
cobmd5-2.cbl: 298: warning: REDEFINES clause should follow entry-name
cobmd5-2.cbl: 144: error: only level 88 items may have multiple values
cobmd5-2.cbl: in section 'MD5-F':
cobmd5-2.cbl: 413: error: 'b-and' is a reserved word, but isn't supported
cobmd5-2.cbl: 413: error: syntax error, unexpected Identifier, expecting ) or - or +
cobmd5-2.cbl: 413: error: 'b-or' is a reserved word, but isn't supported
cobmd5-2.cbl: 413: error: 'b-not' is a reserved word, but isn't supported
cobmd5-2.cbl: 413: error: 'b-and' is a reserved word, but isn't supported
cobmd5-2.cbl: in section 'MD5-G':
cobmd5-2.cbl: 418: error: 'b-and' is a reserved word, but isn't supported
cobmd5-2.cbl: 418: error: syntax error, unexpected Identifier, expecting ) or - or +
cobmd5-2.cbl: 418: error: 'b-or' is a reserved word, but isn't supported
cobmd5-2.cbl: 418: error: 'b-and' is a reserved word, but isn't supported
cobmd5-2.cbl: 418: error: 'b-not' is a reserved word, but isn't supported
cobmd5-2.cbl: in section 'MD5-H':
cobmd5-2.cbl: 423: error: 'b-xor' is a reserved word, but isn't supported
cobmd5-2.cbl: 423: error: syntax error, unexpected Identifier, expecting ) or - or +
cobmd5-2.cbl: 423: error: 'b-xor' is a reserved word, but isn't supported
cobmd5-2.cbl: in section 'MD5-I':
cobmd5-2.cbl: 428: error: 'b-xor' is a reserved word, but isn't supported
cobmd5-2.cbl: 428: error: syntax error, unexpected Identifier
cobmd5-2.cbl: 428: error: 'b-or' is a reserved word, but isn't supported
cobmd5-2.cbl: 428: error: 'b-not' is a reserved word, but isn't supported
Some of these seem like syntax MF COBOL supports that GNU COBOL doesn't - the redefines and the syntax errors. The others seem like functions/operators MF COBOL supports that GNU COBOL doesn't.
Are there any good guides on porting MF COBOL to GNU COBOL? Suggestions for things I should read?
Kevin