I am writing a sanity check program, which requires converting some fields from lower case to upper case. I understand that using the 'Inspect' verb is an option, are there any other ways of doing this too ?

I'm partial to the INSPECT CONVERTING with literals. The compiler generates an in-line TR instruction, whereas, with the FUNCTION's, the compiler generates a BALR to a run-time routine. FUNCTION's were not introduced until COBOL/370, about 20 years ago.

One thing I will say when using the INSPECT, I always coded the lower-case letters using hex-representation (IE: X'81' as opposed to 'a'), instead of taking the chance that someone (like me) brings the code up in CAPS ON mode and accidentally hits the line where the lower-case letters are coded and converts them to upper-case.

It would be great if COBOL had an MVZ-like command, where you can move 4-Bit zone 'C' values to the zone of each byte of an existing alphabetic string, which performs the upper-case change. Maximum length of the target string, from an Assembler point-of-view, is 256.

An "OC" (OR-character) like-command would work just as well using SPACES (B'11000001') as the mask, which would turn-on the second-bit (from the left), converting a lower-case 'a' (B'10000001') to an upper-case 'A' (B'11000001'). Again, maximum target-string length of 256.

When using either of these methods, the content of the string must be guaranteed to have only lower-case letters or "Unpredictable results may occur" and you know what that means.

As an exercise, try moving each byte to the low-order byte of a redefined halfword, PIC 9(04) COMP, (cleared to X'00's), add 64 to the halfword and move the halfword low-order byte back to the string. Same result, horrible overhead....

Or, divide the length of the string by 4 and get a remainder. Then you could add a fullword of X'40404040' (1077952576) to 4-Bytes at a time in an in-line PERFORM. If the compiler doesn't support COMP-5, then TRUNC(BIN) must be specified.

After coming out of the PERFORM (if the length of the string was less than 4, then you would have never executed the PERFORM), check for a remainder from the divide and if found, take care of the last 1-3 bytes and you're done.

Whether it can be considered a major oversight or not, I suspect that the vast majority of systems outside Scandanavia pay little heed to Scandanavian characters.

Having said that, the INSPECT ... CONVERTING with literals in hex (X'...'), suggested by the other Bill, would be applicable to any single byte value. For a multi-byte value, INSPECT ... REPLACING could be suitable.