I am using SQL2GMS at the begining of my GAMS code, to generate the
input files to my model(sets and parameters)
Once the model is solved, I need run SQL2GMS again to capture some
responses of my model and put it into my data-base.
But I have a problem with it , because GAMS executes the both
SQL2GMS sentences (the writing at the begining and the write ending
ones) at the same time. It is at the begining of GAMS code.
How can I run the two SQL2GMS sentences in different parts from GAMS
code?
it means run SQL2GMS to include the data and then, when the model has
finished, run the SQL2GMS again, to put the solution whit insert into
tabla from ‘path file’ in my data-base?
Note: the Qwery insert into tabla from ‘path file’ is working. the
outfile generated is ok.
I appreciate your collaboration.
Thanks and regards
\
Hello
I had the same problem some time a go. I solved it in the following manner:
At the end of the gams file, I did a put statement which I wrote a .sql script in the text mode, like explained in:
http://interfaces.gams-software.com/doku.php?id=databases:oracle
then I wrote a small java program to process this file and dump the .sql statements into the bank.
In fact, this java program do more than this, it monitor a sql table and trigger gams every time a line in this table changes, then, it sends to a temporary table, which is read by gams. After the optimization, it process the .sql statement and saves the results to the table.
This is the solution I found and its working. If you want this program I can sell it, since we develop gams solutions as a specialists (at the VRTech company: http://www.vrtech.com.br/index.php?lang=en_us ).
Regards
2011/4/14 Ronalchenco
I am using SQL2GMS at the begining of my GAMS code, to generate the
input files to my model(sets and parameters)
Once the model is solved, I need run SQL2GMS again to capture some
responses of my model and put it into my data-base.
But I have a problem with it , because GAMS executes the both
SQL2GMS sentences (the writing at the begining and the write ending
ones) at the same time. It is at the begining of GAMS code.
How can I run the two SQL2GMS sentences in different parts from GAMS
code?
it means run SQL2GMS to include the data and then, when the model has
finished, run the SQL2GMS again, to put the solution whit insert into
tabla from ‘path file’ in my data-base?
Note: the Qwery insert into tabla from ‘path file’ is working. the
outfile generated is ok.
I appreciate your collaboration.
Thanks and regards
Edson Valle
edsoncv@gmail.com
–
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.