Auf AS/400 via Perl/PHP/… connecten
- Dieses Thema hat 1 Antwort und 1 Teilnehmer, und wurde zuletzt aktualisiert vor 13 Jahre, 7 Monaten von
Anonym.
-
AuthorPosts
-
18. Februar 2010 um 17:01 Uhr #4076
AnonymInaktivHallo,
habe ein kleines Problem mit der Verbindung zwischen Linux und einer AS/400.
Mit der Linuxmaschine soll eine bestimmte "Datei" (hier: QGPL.ODBC_OK) abgefragt werden. Allerdings kriege ich erst gar keine Verbindung aufgebaut!
DB2 Express-C ist installiert, die Treiber ebenfalls. Sollte doch soweit richtig sein.
Wenn ich dann mein Perl- oder PHP-Script ausführe, kommen folgende Fehlermeldungen:[IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "10.100.xxx.xx". Communication function detecting the error: "connect". Protocol specific error code(s): "111", "*", "*". SQLSTATE=08001 SQLCODE=-30081
oder
[IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031 SQLCODE=-1031
Der Source von meinem PHP-Script sieht folgendermaßen aus:
#!/usr/bin/php
<?php
$database = 'QGPL';
$user = 'z';
$password = 'z';
$hostname = 'ASKDV';
$port = 50000;
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
 "HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
$conn = db2_connect($conn_string, '', '');
if ($conn) {
  echo "Connection succeeded.";
  db2_close($conn);
}
else {
  echo "Connection failed:n";
  print db2_conn_errormsg();
}
?>
Hat jemand irgend eine Idee? Langsam bin ich echt am verzweifeln!
Vielen Dank im Voraus,
Tobias
19. Februar 2010 um 12:28 Uhr #4235
AnonymInaktivHat sich schon erledigt.
iSeries Access für Linux installiert – dachte das wär schon drauf – und ein kleines Perlscript geschrieben. Schon haut alles hin!
-
AuthorPosts
You must be logged in to reply to this topic.