Mainframe emulation…create AWSTAPE!

Well an important step has been conquered…submitting jobs [JCL] to MVS 3.8 from my local Linux environment. The next thing important to me, is getting data, perhaps a lot of data into the mainframe. Everyone is different so this might not be as important to someone else. However to me I need to feel that I can run real useful jobs on the mainframe! For me it’s not enough to run a MVS job on 50 records. That wouldn’t be primarily what a MVS mainframe would be used for in its heyday. I myself could manually process 50 records with a calculator. My smallish company, who had millions of customer records couldn’t even afford, or at least justify the expense of MVS and the hardware to run it. I need to know my MVS environment can emulate an actual business. To that end, I need to be able to be able to transfer a lot of data to the mainframe. I’m talking a million records or more. I want to put Hercules/MVS through it’s paces. Obviously the data isn’t actual customers because that would mean I have access to real peoples personal information, and I don’t. However I can generate real looking random data. Currently I can generate a million real looking 164 byte records in about 15 minutes. Another reason is I want to do this is to be able to compare the cool gnuCobol native Linux compiler to a real IBM mainframe COBOL. I assume gnuCOBOL will be faster because it’s not running under emulation. Still, I like doing those comparisons. Also I like seeing what a free COBOL compiler can do against a compiler who’s monthly cost to IBM customers was probably hundred’s or thousand’s of dollars. And that’s just for the compiler, which can’t run without the OS. And for sure the monthly costs for all this software is many thousands of dollars!

Currently this is where I am in this process. It seems to me perhaps a virtual tape (AWSTAPE) might be the best way to transfer large amounts of records to the mainframe. Some years ago Jay Moseley wrote a Basic program to do this. He placed it in the public domain. Concerning the Basic program, he stated that he used “the final release of Microsoft’s Professional Development System which is way beyond the dinky QBASIC that is stuck on all the DOS/Windows systems now” . He further stated “I spent another week writing C equivalents of the original program and getting that to the point it would produce the AWSTAPE image files over under Linux. Even though the compiled BASIC versions ran under DOSEMU, I wanted to have a native version.”

Being familiar with Basic, I took his program and made a few small changes to be able to compile in the very nice IMHO…FreeBasic. The resulting native Linux executable is only 72.6kb. And is fast, IMHO.

It wrote (created the AWSTAPE) 50,000, 164 byte recs in ~10 seconds
It wrote 1 million, 165 byte recs in ~12 seconds

Not too shabby for a Basic program that’s converting every record from ASCII to EBCDIC.

I also tried QB64, which I used for his other tapedump.bas Basic program, because at the time I couldn’t find a way to do the DIR$ function, in FreeBasic. I later found a way to perform this function in FreeBasic. The size of this QB64 executable in Linux was 1.9MB, but only 77.9K in FreeBasic…a big difference! Also the QB64 executable pops open a tacky, non-native looking MS-DOS style Window.

Having said all that. You should use the C version of Jay’s programs. Which are much faster. And the executables provided work out-of-the-box on my system.

Getting there…the next step is loading the AWSTAPE into a MVS dataset, on Hercules!