RACF
This gem is a Ruby wrapper around the around IBM’s Resource Access Control Facility (RACF). RACF It is a security system that provides access control and auditing functionality for the z/OS and z/VM operating systems.
Yes, we’re talking about using Ruby in order to connect to a mainframe!!!
After the mainframe fear passes, let’s talk a bit more. (…)
How to install?
bundle
bundle exec rake install
How to run the specs?
bundle exec rake
How the gem connect to a mainframe?
The way the RACF gem connects to the mainframe is through a terminal emulator called S3270 (x3270.bgp.nu/s3270-man.html). S3270 opens a telnet connection with the mainframe. After that, it opens a socket on which we can open a telnet connection. It’s through that last connection that we use s3270 to communicate with the mainframe.
So, it’s something like that:
mainframe <=== telnet ===> s3270 (terminal emulator) <=== telnet ===> RACF Gem
Ok, but, how can I use that &*%@@!%&* gem ???
You can run a RACF command as simple as that:
client = Racf::Client.new(:user_id => "mainframe_user_id",
:password => "mainframe_user_password",
:server_address => "192.168.0.1")
client.start_session do |c|
users = c.listuser("AJ00042")
puts users
end
What’s next?
Besides Ruby, the only thing you need to really use the power of that gem is a big, big, really big client who owns a mainframe!!!
But, if you’re trying that in your home and you don’t have a mainframe in your bedroom, you should give Hercules a try (www.hercules-390.org/).