therese
16th October 2001, 07:50
How can I be able to read input from file using C++ or java. The scenario goes like this....
When I open baan session like Maintain Item Data, instead the user will input the fields, the program will automatically gets the value of the fields from a file(using other language). Or it is possible to use DLL or DCC?
Hoping for immediate reply.
Thanks!
marcel
16th October 2001, 17:22
Hi:
Using TCL/TK (Shareware for UNIX or DOS) with the EXPECT extension you can simulate that the BaaN Inputs is not from
the board but from a ASCII file.
With NFS you can use this file online from any comunicate site.
Hope that can help you
Bien le Bonjour
Marcel
vgobiraj
16th October 2001, 19:23
I assume that u have a flat file with data that needs to be inserted into Baan Item Data
The best way can be to write a Baan 4GL FS/BOI to read the file and update Baan.
marcel
16th October 2001, 22:13
Hi Teresa:
The way with tcl/tk is to exactly (as you are asking...) emulate the capture (on a PC) of a user directly in a BaaN session. Sometime the session have to validate some items and as i know it´s not easy (we try it...)with 4GL.
Take care with BaaN date (01/01/01 is 1721424 Julian...) you have to use a C prog. to transform DATES to BaaN JULIAN DATES
In TCL prog. for instance:
-To open Baan tdpurXXXXXX Session use :
spawn ba6.1 tdpur......
-If the session need to capture a "s" use:
.....10 { expect -re " \ ^.]\\.\\.\[^.]" send "s"
All the TCL program with validations (Unix files R/W permisions, existing or not BaaN tables....) is about 100 prog. lines.
If you do it in 4GL, it would be cue to compare both solutions.
Maybe (as I know) you can solve the problem with REFLEXTION but this software is not free.
Bien le Bonjour
Marcel
therese
18th October 2001, 08:28
"The best way can be to write a Baan 4GL FS/BOI to read the file and update Baan."
I understand that FS is write thru ttstpcreatdll, right? How can I be able to run it?, if it just a script. Where should I linked it? Please enlighten me.
mark_h
18th October 2001, 15:39
Therese,
I attached some AFS documents in a reply to a question by Joshua. These should be helpful in getting you started. It was his question about reading from a flat file. If for some reason you have problems with them let me know and I will post them again.
Good Luck!