00001 #include <iostream>
00002 #include <fstream>
00003 #include <string>
00004 #include <cmath>
00005 #include "ppfc++.hpp"
00006
00007 using namespace std;
00008 using namespace ppf;
00009
00010 int main(int argc, char *argv[])
00011 {
00012 datatype a;
00013
00014 try
00015 {
00016 ppfdb.connect("JETPPF", ppf::read);
00017 ppfdb.read(a, 58762, "EQUI", "Q");
00018 a.readLocal("test.ppf");
00019
00020 ppfdb.connect("ameak", ppf::write);
00021 ppfdb.create(50000, 0, "This is a test");
00022
00023 ppfdb.write(a, "NET", "A", ppf::tvector | ppf::xvector);
00024 for (long t=0;t<a.getTDim();t++) a.setT(t, a.getT(t) - 10.0);
00025 ppfdb.write(a, "NET", "B", ppf::tvector | ppf::xvector);
00026
00027 ppfdb.closeDDA(3, "THIS IS A REALLY BIG COMMENT FOR FUN, I HOPE THIS DOESN'T BREAK ANYTHING");
00028 ppfdb.abort();
00029 ppfdb.commit("PPFTEST", 1);
00030 }
00031 catch (ppf_error &e)
00032 {
00033 cout << e.message << " Code=" << e.code << ", Routine=" << e.method << endl;
00034 exit(1);
00035 }
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 return 0;
00071 }
00072
00073