Mainframe

Discussion of challenges you have already solved
MagneticMonopole
Posts: 26
Joined: Fri Nov 07, 2008 3:19 pm

Mainframe

Post by MagneticMonopole »

Hi,

did you really have access to a system/370?
I considered using an emulator (hercules), but finally managed to convert the floats to their binary representation and that to EBCDIC. Very nice and highly informative challenge!
User avatar
teebee
Posts: 89
Joined: Mon Nov 10, 2008 3:21 pm
Location: Germany

Post by teebee »

Thanks. I have access to a System z mainframe running z/OS. However, I am not a COBOL programmer. Actually, this little program was my second COBOL program at all. Nevertheless, you described the supposed way to solve this challenge.
nighthalk
Posts: 41
Joined: Fri Jul 31, 2009 8:22 pm

Post by nighthalk »

i didnt realize they used a different base for the exponents but wow i had no clue they had a different keyboard scheme... i eventually stumbled onto this little gem here

http://support.microsoft.com/kb/216399/EN-US/

after finding examples to get my excel sheet to work it was solved
Zeta
Posts: 62
Joined: Thu Apr 16, 2009 3:37 pm

Post by Zeta »

python is your friend again: it has integrated EBCDIC support.
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post by megabreit »

Very funny challenge (well, up to a certain point)!!
First thing I tried was to download every available free Cobol compiler. But every one of those stumbled over some other dirty detail and produced various errors which I could not fix.
Then I did like you expected... deal with the Cobol syntax, EBCDIC and started doing it all by hand... grrr.
How did you calculate the scientific binary? I was asking Wolfram Alpha, but noticed various rounding errors which resulted in wrong letters here and there. It was always a difference of just 1, so it was easy to find the right letter... but it left a bad smell about trusting floating point values in general...
Skeeve
Posts: 5
Joined: Sun Oct 26, 2008 7:37 am

Post by Skeeve »

Very nice challenge - I had to learn a bit COBOL and IBMs floating point representation before a little Python program could do the decoding.
jonik555
Posts: 43
Joined: Mon Aug 31, 2009 6:18 pm
Location: Prague

Post by jonik555 »

Hi, very nice challenge. and very hard too... I did it all by hand after trying millions of openCOBOLS etc.
http://en.wikipedia.org/wiki/IBM_Floati ... chitecture
http://en.wikipedia.org/wiki/Binary_numeral_system
http://en.wikipedia.org/wiki/Ebcdic
It would be relatively easy without these giant exponents...
Thank you! Really interesting!
There are 10 types of people, those who understand ternary, those who think that this joke is about binary and the others.
martinsm
Posts: 2
Joined: Tue Jul 20, 2010 7:14 am
Location: Riga, Latvia

Post by martinsm »

Really nice challenge.
Figured it out myself, but with some googling around you can find that somebody (polarlemniscate) tried to solve this challenge with help of ibm mainframe user forum: http://www.ibmmainframeforum.com/viewto ... f=6&t=3784
There is answer available in plain text. It would be nice to change float's to say something else.
User avatar
teebee
Posts: 89
Joined: Mon Nov 10, 2008 3:21 pm
Location: Germany

Post by teebee »

Thanks for the advise. The challenge has been updated.
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

z390 for the win.
contagious
Posts: 35
Joined: Tue May 12, 2009 6:08 pm
Location: Greece

Post by contagious »

AMindForeverVoyaging wrote:z390 for the win.
you mean zCOBOL :D

I did some research on Cobol and how it represents floats, but i stumbled upon zCOBOL...

Good job to Teebee, very nice challenge.
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

contagious wrote:you mean zCOBOL :D
Whatever the name, as long as I don't have to fiddle with silly things like COMP-1 and EBCDIC. ;)
aurora
Posts: 54
Joined: Thu Feb 05, 2009 12:31 pm
Location: Bavaria, Germany

Post by aurora »

I very much enjoyed the challenge. It introduced me to the Hercules emulator and the z390 / zCobol software. I used the latter one to solve the challenge.
Dr. Halo
Posts: 6
Joined: Mon Oct 27, 2008 2:49 am
Location: Munich

Post by Dr. Halo »

One of the best challenges, even tricky for an experienced PC COBOL programmer...
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Post by Hippo »

I have found this link http://www.ibmmainframeforum.com/viewto ... f=6&t=3784,
what gave me enough info to deduce COMP-1 float representation. rest I did in excell.
Post Reply