karlomutschler
Programmer
good day,
need to develop a SAS script to import data from a textfile
into PALO olap DB.
An example provided (using PHP) reads as follows:
<?php
define('HOST', '127.0.0.1');
define('PORT', '7777');
define('USER', 'admin');
define('PASS', 'admin');
$connection = palo_init(HOST, PORT, USER, PASS);
// print_r($connection);
$cube = 'Data';
$dbname = 'DB_01';
// $number = palo_ecount($connection, $dbname, 'Dimensionsname');
$fp = fopen('export.txt','r');
$recno = 1;
while (!feof($fp)){
$line = fgets($fp, 2048);
list ($dim1, $dim2, $dim3, $dim4, $dim5, $dim6, $value) = split (chr(9), $line);
PALO_SETDATA($value, FALSE, $connection, $dbname, $cube, $dim1, $dim2, $dim3, $dim4, $dim5, $dim6);
$recno = $recno+1;
echo $recno . "<br>";
}
fclose($fp);
palo_disconnect($connection);
?>
How would one go about and translate this into SAS-script?
Any assistance or help would be highly appreciated
Kindest regards
Karlo
need to develop a SAS script to import data from a textfile
into PALO olap DB.
An example provided (using PHP) reads as follows:
<?php
define('HOST', '127.0.0.1');
define('PORT', '7777');
define('USER', 'admin');
define('PASS', 'admin');
$connection = palo_init(HOST, PORT, USER, PASS);
// print_r($connection);
$cube = 'Data';
$dbname = 'DB_01';
// $number = palo_ecount($connection, $dbname, 'Dimensionsname');
$fp = fopen('export.txt','r');
$recno = 1;
while (!feof($fp)){
$line = fgets($fp, 2048);
list ($dim1, $dim2, $dim3, $dim4, $dim5, $dim6, $value) = split (chr(9), $line);
PALO_SETDATA($value, FALSE, $connection, $dbname, $cube, $dim1, $dim2, $dim3, $dim4, $dim5, $dim6);
$recno = $recno+1;
echo $recno . "<br>";
}
fclose($fp);
palo_disconnect($connection);
?>
How would one go about and translate this into SAS-script?
Any assistance or help would be highly appreciated
Kindest regards
Karlo