| Subcribe via RSS

z/OS 1.11 available on september 25, 2009

August 19th, 2009 | No Comments | Posted in IBM system z |

The last version of the operating system for system z has just been announced officially. z/OS 1.11 will focus on technologies that make the success of the mainframe, hardware virtualization for performance improvement, very high availability, security, flexibility, and ease of administration.

IBM took the opportunity to launch a new product called z/OS Management Facility, which will allow programmers to manage and administrate a mainframe with more ease, on the daily z/OS operation.

z/OS 1.11 and z/OS Management Facility will be available on Septembre 25, 2009

Tags: ,

Understand the difference between TCO et TCA

August 19th, 2009 | No Comments | Posted in Green IT |

When you buy servers, equipments, or softwares, the first question is “how much this cost ?”. The first approch is to say that it’s cost the price when I click on “buy” or when I give cash to the constructor. But, indeed, it’s not really true.

We will define what is the Total Cost of Acquisition and the Total Cost of Ownership. The first is the buy cost, what we just introduce, and the second is the buy cost with all the external costs (cooling, staff,..)

To be more clear, we want to buy 10 x86 servers to use as web cluster. TCA will be 10*500€, so 5.000€. For the TCO, we should add some other costs:

  • Server electricity
  • Servers cooling
  • Infrastructure (floor space)
  • Hire 10 employees
  • Training your staff on clustering technologies
  • Software and hardware installation
  • Equipment insurance
  • Cost of softwares
  • Repair and daily check
  • Downtime, outage and failure expenses
  • ..

All these points are important, this is the TCO. When you have a project, you should think of the project cost on several years, not only the first day, when you buy servers. Some solutions can be expensive at the beginning, but can be cheaper on two years (low consumption ? low downtime ? small staff ?).

Tags: ,

Get documented with IBM Redbooks

August 16th, 2009 | No Comments | Posted in IBM |

IBM Redbooks

It’s always very hard to find good documentation on some products (IBM or else). Internet is really nice, but sometime it’s the jungle, we can find lot of good, but also lot of bad/false.. Shop sells very good books, but come on.. they’re too expensive, I’m student, I can’t buy 10 or 20 books near 50/60€ each..

Hopefully, IBM have a huge ebook library named Redbooks. There are 5 kinds of IBM ebook, first is the classic RedBook, it’s a guide on one or multiple producs, Drat are RedBook in beta version, RedPapers are short technical articles, RedGuides are a kind of praticals business example, and TechNotes are brief technical help on something very precise.

IBM have more than 5.000 RedBooks, in 2008 more than 400 Redbooks have been published. Each month, more than 500.000 ebooks and 100.000 RedPapers are downloaded.

Here are some “must have” Redbooks:

And, the most important, all these ebooks are free !

Tags: , ,

DB2 queries with PHP

August 16th, 2009 | No Comments | Posted in IBM DB2, Programming |

You want to use PHP as programmation language to query your DB2 databases. We will see how to do. We only need a HTTP server with the PECL ibm_db2 extension. This extension allow us to use new functions, relative to IBM DB2, but also work with IBM Cloudscape and Apache Derby.

After the installation, we will use these functions as normal PHP functions. This is a connection example to the SAMPLE database. You can click on the function to get more information:

<?php
$conn = db2_connect('SAMPLE', 'db2user', 'secretpass');

if($conn) {
  echo "connection to sample: ok.";
} else {
  echo "connection to sample: failed.";
}

db2_close($conn);
?>

Nothing very complicated here, we connect to the SAMPLE database with the db2_connect function, and we check if the connection works, then we close the connection with db2_close.

Now, let’s do something more interesting, do some query on our tables !

<?php
$query = "SELECT * FROM ADMINISTRATOR.EMPLOYEE";
$stmt = db2_prepare($conn, $query);

if($stmt) {
  $ex = db2_execute($stmt);
  if($ex) {
    while($ligne = db2_fetch_array($stmt)) {
      $lastname = ligne[3];
      echo "<br />- $lastname";
    }
  }
}
?>

We put your query in the $query variable, and we use the db2_prepare function with the previous connection ($conn). This function will “prepare” (I’m so smart), it will create an optimized path in DB2, to be more fast. We execute this result ($stmt) with the db2_execute function, who do the query on your database. To finish, we use db2_fetch_array to retrieve our data in an array.

A BLOB example.. or Binary Large OBject, an image, a audio or video file,..

$filename = '/home/mycado/itsme.jpg';
$name = 'My cute picture";

$query = 'INSERT INTO photo (id, name, image) VALUES (?, ?, ?)';
$stmt = db2_prepare($conn, $query);

if($stmt) {
  db2_bind_param($stmt, 1, 'id', DB2_PARAM_IN);
  db2_bind_param($stmt, 2, 'name', DB2_PARAM_IN);
  db2_bind_param($stmt, 3, 'filename', DB2_PARAM_FILE);

  $ex = db2_execute($stmt);
}

We use the flag db2_bind_param we give us more precision with the data type in our request. The first two variables, an id and a string, use DB2_PARAM_IN, an classical input parameter et we put your picture with DB2_PARAM_FILE. Note that the question marks are not an error !

It’s enough for now, I advice you to read the ebook “DB2 Express-C: The Developer Handbook for XML, PHP, C/C++, Java, and .NET‘. About the ibm_db2 functions, you can find them all on php.net.

Tags: , ,

Start on DB2 with IBM DB2 Express-C

August 15th, 2009 | No Comments | Posted in IBM DB2 |

You should have heard something about IBM DB2, but it’s still two letters and a number for you. We will see how to start with DB2, in the good and free way ! (and.. legal).

IBM DB2 is a relational database management system, using SQL language. Created in 1983 by IBM, and the last version is the 9.7 (Cobra). Compatible with the major operating systems (z/OS, AIX, Unix, Linux, Windows, Mac OS,..), DB2 ranks second in terms of market share, behind Oracle. There are several versions of DB2, more or less specialized and offer more or less services, but we will choose the free version, who can be use by students, developers, or small companies. DB2 Express-C is free to develop, deploy and distribute.

DB2 Express-C only have two limitations, which are not problem for us. It supports only 2 core and up to 2GB of RAM, which is enough for our tests. This version is available for Linux (32bit, 64bit and POWER), Windos (32bit and 64bit), Solaris (Intel 64bit), and Mac OS X (Intel 64bit), but unavailable for z/OS.. still not a problem for us ! There is no other limitation, we are free for the database size, number of connected users,.. Whether you develop in Java, .Net, Ruby, Python, Perl or pretty much any other programming language out there

We will proceed to the crucial stage, downloading DB2 Express-C 9.7 and install it on your system. To go further, don’t hesitate to consult the excellent ebook Getting Started with DB2 Express-Cand watch the videos on channelDB2.

Tags: ,