summaryrefslogtreecommitdiff
path: root/os2/OS2/REXX/t/rx_tiesql.test
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-04 11:04:30 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-04 11:04:30 +0100
commit354c724e8ab74f150e14800acc80d505949161f5 (patch)
tree42fd4401ebe97f5a765397d0ff33ce50b50ad349 /os2/OS2/REXX/t/rx_tiesql.test
parent46c3340ed6f3bbae3f80607438da0310e52a687a (diff)
downloadperl-354c724e8ab74f150e14800acc80d505949161f5.tar.gz
OS/2 hadn't been updated to cope with the ext/ restructuring.
I don't have OS/2, so I can't test this, but the code in Configure will assume flat directories, because ext/File-Glob is present, and hence not search recursively and not find the OS/2 extensions if they are copied into ext/OS2/* I believe that without this change OS/2 will not have been building since the change to flattened ext. This change may not be sufficient to get OS/2 building again, but it is in the right direction.
Diffstat (limited to 'os2/OS2/REXX/t/rx_tiesql.test')
-rw-r--r--os2/OS2/REXX/t/rx_tiesql.test86
1 files changed, 0 insertions, 86 deletions
diff --git a/os2/OS2/REXX/t/rx_tiesql.test b/os2/OS2/REXX/t/rx_tiesql.test
deleted file mode 100644
index c85a1e990b..0000000000
--- a/os2/OS2/REXX/t/rx_tiesql.test
+++ /dev/null
@@ -1,86 +0,0 @@
-BEGIN {
- chdir 't' if -d 't/lib';
- @INC = '../lib';
- require Config; import Config;
- if ($Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
- print "1..0\n";
- exit 0;
- }
-}
-
-#extproc perl5 -Rx
-#! perl
-
-use REXX;
-
-$db2 = load REXX "sqlar" or die "load";
-tie $sqlcode, REXX, "SQLCA.SQLCODE";
-tie $sqlstate, REXX, "SQLCA.SQLSTATE";
-tie %rexx, REXX, "";
-
-sub stmt
-{
- my ($s) = @_;
- $s =~ s/\s*\n\s*/ /g;
- $s =~ s/^\s+//;
- $s =~ s/\s+$//;
- return $s;
-}
-
-sub sql
-{
- my ($stmt) = stmt(@_);
- return 0 if $db2->SqlExec($stmt);
- return $sqlcode >= 0;
-}
-
-sub dbs
-{
- my ($stmt) = stmt(@_);
- return 0 if $db2->SqlDBS($stmt);
- return $sqlcode >= 0;
-}
-
-sub error
-{
- my ($where) = @_;
- print "ERROR in $where: sqlcode=$sqlcode, sqlstate=$sqlstate\n";
- dbs("GET MESSAGE INTO :msg LINEWIDTH 75");
- print "\n", $rexx{'MSG'};
- exit 1;
-}
-
-sql(<<) or error("connect");
- CONNECT TO sample IN SHARE MODE
-
-$rexx{'STMT'} = stmt(<<);
- SELECT name FROM sysibm.systables
-
-sql(<<) or error("prepare");
- PREPARE s1 FROM :stmt
-
-sql(<<) or error("declare");
- DECLARE c1 CURSOR FOR s1
-
-sql(<<) or error("open");
- OPEN c1
-
-while (1) {
- sql(<<) or error("fetch");
- FETCH c1 INTO :name
-
- last if $sqlcode == 100;
-
- print "Table name is $rexx{'NAME'}\n";
-}
-
-sql(<<) or error("close");
- CLOSE c1
-
-sql(<<) or error("rollback");
- ROLLBACK
-
-sql(<<) or error("disconnect");
- CONNECT RESET
-
-exit 0;