MVS COBOL Success

Wrote my 1st MVS Cobol (see comment about this) below program that successfully read a dasd file and wrote a new dasd file. Then wrote my 2nd MVS Cobol program that successfully read a virtual tape (AWSTAPE) file and wrote a new dasd file.

It should be obvious now, although I admit it wasn’t completely at first, that an AWSTAPE appears to MVS as a regular IBM tape, that doesn’t require some special AWSTAPE utility on MVS to process. I successfully used the IBM utility IEBGENER and a COBOL program to read the tape. Your JCL obviously needs a proper tape DD card just like any normal tape processing does.

I was a little worried that the MVS compiler would have problems with newer DASD (such as anything in the 33xx series) like the DOS compiler did…but it handled 3390’s just fine! I don’t know if that’s because the MVS compiler was patched or simply because it’s a superior compiler? But I do know that the device model isn’t specified in the MVS SELECT/ASSIGN statement as it is in DOS COBOL.

For example:
DOS: SELECT IN-FILE ASSIGN TO SYS010-DA-3380-A-INFILE
MVS: SELECT OUT-FILE ASSIGN TO DA-S-INFILE

Used IEBGENER to load 50,000, 164 byte customer records records to disk. Once I got it working…it was very fast. I basically thought it would just require a new larger (more records) tape. However this brought new problems. Error messages stating that I either hadn’t allocated enough space or there wasn’t enough space available to copy the data to disk.

This IEBGENER loaded data includes a ending character (linux line feed) that isn’t used. Back it the day we would never have wasted a byte like that…50,000 customer records equals 50,000 wasted bytes! You can store an additional 304 customer records in that wasted space. DASD was expensive back then! That’s what caused the Y2K problem…programmers saving 2 bytes per date by only storing ’65’ for ‘the year ‘1965’ and making the assumption of a ’19’ year prefix!

MVS COBOL

Technically it is isn’t MVS COBOL. As it isn’t freely available. In reality it’s a pretty old (but still useful) COBOL version that is freely available. It is IBM COBOL though!