tuple9i
9th November 2009, 17:49
Hi BaanBoard, I have used this site for many solutions to my BaaN issues. I thank you for that. I am trying to determine if there is a way to call a BaaNQuery and supply variables such as a START DATE, END Date and OUTPUT TYPE (ASCIF) with OUTPUT LOCATION to supply a string with path and file name.

Environment:
BaaN: Infor BW 8.4c.3 (Unicode)
Server: Windows 2003 server

Hopefully I have asked the question properly. Basically I have a BaaN query:

Query Name: OCREFW

so far, I have to manually run the query:

in ttadv3482m000 (Print Query Data)

Create Date
from -7 (7 days in past)
to +1 (tomorrow)

in ttstpslopen: Select Device

File Device: ASCIF (ascii file)
BaaN sessions ttstpsplopend.devc

in options:

Outout File: C:\temp\user\file.txt
BaaN sessions ttstpsplopend.path

The PREVIEW Option is checked:
BaaN sessions ttstpsplopend.preview

I would like to somehow apply the proper settings to the above when I call the query in a batch file. Something like (please forgive the psuedo-code, I am not a programmer):

call %BSE%\bin\startjob.bat OCREFW < var1 (ttstpsplopend.devc = ASCIF); var2 (ttstpsplopend.path = C:\temp\user\file.txt);
var3 (ttstpsplopend.preview = Y)

The startjob.bat supplies the information USER/PASSWORD to logon to BaaN using BW.exe

Thank you for your help.

Tuple9i

Hitesh Shah
11th November 2009, 18:12
U may use the dll ottdllsql_query to get easy sql query to string query and then use other olesql functions in same library to get the output the way u wish .

Another alternative is to create a job with 2 session 1st ur customer session to modify query data in easy sql text to reflect constants only in the query and 2nd ttadv3280m000 to run the query to generate the output u need.

tuple9i
2nd December 2009, 18:05
Thank you Hitesh. This looks promising. Sorry for the late response. I was out enjoying some time off for the Thanksgiving Holiday. I will post what I come up with.