Bogdan
26th April 2002, 14:47
Hi,

I want to browse files in a folder (local-WIN and server-AIX) and maybe to select them. Is it possible in BaaN IVc3?

Thank you.

NPRao
26th April 2002, 20:33
I guess I see 2 possible solutions -

1. Use app_start to call the windows explorer.

2. use the baan file/directory functions and maybe put the info on the gbf browser

mark_h
26th April 2002, 23:10
On the server side you can use the dir commands like dir.open, dir.entry, etc. These commands would allow you to do what you are talking about on the server side. Never could figure a way to do this on the client.

Good Luck!

Mark

Bogdan
26th April 2002, 23:30
Hi,

Well, my basic ideea was to make a small session that simulate a ftp client (some of our users are using files as printer output and because they do not have access to ftp ...).
Then I found that extraordinary code for importing into word, excel, pdf, etc., but I still want to do that; just for fun.

Thanks a lot for yours help. I'll try yours sugestions.
By the way where, I can find some help regarding BaaN OS integration (I mean functions, etc. for interacting with OS-es).My help seems to be incomplete. I know about seq.xxx but never heard about dir.xxx :confused: !
Regarding app_start, I tried some time ago to use it, but with no result; I'll work harder on this side :o .

Thank you

NPRao
26th April 2002, 23:38
You can refer to the tools dll - ttdllfilehand

Library ttdllfilehand
File Handling, also working for remote
(38 Functions available)

void app.file( const string source(), const string target(), ref long ret )

long cmp.files( const string source(), const string target() )

void convert.filename.for.remote( const string source(), ref string target() )

void copy.file( const string source(), const string target(), ref long ret )

long copy.move.file( long copy, const string fpath(), const string tpath() )

long cp.dir.and.subdirs( const string src(), const string trg() )

long create.directory( const string directory() )

long create.local.temp.file( const string path(), ref string local.path() )

long dir.present( const string directory() )

long edit.file( const string programm(), const string fname(), long read.only, [ string extension(50) ], [ long text.mode ], [ long jump.to.line ] )

long file.cmp( const string file1(), const string file2() )

long file.copy.or.move( const string source(), const string target(), [ long mode ] )

long file.present( const string path() )

long is_dir( const string dirname() )

long is_file( const string path() )

long local.to.remote( const string source(), const string target() )

long mkdir.rem( const string directory() )

void move.file( const string source(), const string target(), ref long ret )

long mv.dir.and.subdirs( const string src(), const string trg() )

long pack.patch( const domain ttadv.path path.dumps, const domain ttadv.path path.patch, const string patch.code() )

long pattern.in.file( const string file(), const string pattern() )

long read.vrc.from.patch( const string path.patch(), ref string target.vers(), ref string target.rele(), ref string target.cust() )

long remote.to.local( const string source(), const string target() )

long remove.local.temp.file( const string path(), ref string local.path() )

long rm.dir.and.subdirs( const string src() )

void ttadv0010.convert.filename( const string source(), ref string target() )

long ttadv0010.file_copy( const string source(), const string target() )

long ttadv0010.file_move( const string source(), const string target() )

void ttdllfilehand.abort.wrb( )

void ttdllfilehand.app.file.wrb( const string source(), const string target(), ref long ret )

void ttdllfilehand.change.file.wrb( const string source(), ref long ret )

void ttdllfilehand.commit.wrb( )

void ttdllfilehand.copy.file.wrb( const string source(), const string target(), ref long ret )

domain ttadv.path ttdllfilehand.creat.tmp.file.wrb( const string source() )

void ttdllfilehand.db.retry.point.wrb( )

void ttdllfilehand.move.file.wrb( const string source(), const string target(), ref long ret )

void ttdllfilehand.rm.file.wrb( const string source(), ref long ret )

long unpack.patch( const domain ttadv.path path.src, const domain ttadv.path path.dest )

more functions in the help file -

Syntax

long seq.open.local( string filename, string mode(2), [long remove.after.use] )

Description

This opens a specified file on the client system. It returns a file pointer, which you can use to identify the file in subsequent operations. The function supports long file names.

Arguments

filename The name of the file that must be opened. If you do not specify a path name, the file is searched for in the directory where BW is loaded.
mode The mode in which the file must be opened. This can be one of the following options:“r” Open for reading.“w” Create for writing.“a” Open for writing at end of file, or create for writing.In addition, you can add "t" to any of the above options if you want the file to be opened in text mode.
remove.after.use Use this optional argument to specify whether or not the file must be removed after it has been closed by seq.close.local():<>0 file is removed
0 file is not removed
Note

You cannot use seq.*() functions in combination with the seq.*.local() functions. So, you cannot use seq.seek() or seq.rewind(), for example, on a file that was opened with seq.open.local().

Return values

>0 success; file pointer is returned
<=0 error; file could not be opened

Context

ttdllbw library function.

Let us know if you are looking for more info and your findings.

alejandro
27th April 2002, 01:26
If in your system you have this dll tgbrg0019 "File Selection" you can call this function

function extern long select.file(
domain tgfile path,
long multi.select.allowed,
ref string selected(,),
ref long no.of.selected,
long max.selected)

It is very powerfull and it will display the browser you are looking for, in server side.

Little explanation:

path: You will see folders and files from this path
multi.select.allowed: well as it sounds.
selected: In this variable will be put file you select
the rest sounds simple, I think.

If you need further details, let me know.

~Vamsi
27th April 2002, 02:25
Alejandro,

Very Cool. :cool:

Bogdan
27th April 2002, 21:35
Thank a lot guys

Right now I can't test and use all the information you provided to me, but I'll do it next week and I'll let you know.

Thank you again.

MrMarco
29th April 2002, 20:06
Guys!

Can I say I have tried out the browser function call and it is SO cool! Is there a function that allows the contents of the selected file to be viewed in read-only mode? This would be the icing on the cake!

alejandro
29th April 2002, 20:22
What do you mean?

With the Browser you cannot create or insert files.

Also a NOTE:

To call this function you have to create a session or a dll

Look at your log files (ttstperrlog) to see a new file named as log.ppmmm where you can see erros within the use of this functon.

~Vamsi
29th April 2002, 20:25
Marco,

If that functionality does not exist, it should be possible to extend the existing function. Let us know if you did it and if so how :).

Bogdan
30th April 2002, 12:06
Hi,

I'm on a dead line. I made a session in witch I call select.file. First there were some missing gif-s and I got some errors but I put them in the right place and now in BSE/log is no error log file.

When I'm launching the session there is a very short window "flash" and that's it. . I think something is missing.

Are there some special var's initializations?

The script is type 4 and the form is also 4.
I'll try with a 3GL script, but until then maybe you can give me clue.

Thanks a lot

alejandro
30th April 2002, 12:37
I think you have to call this function with zoom from the field you want to return files selected.

That is how i use it, and it works.

Bogdan
30th April 2002, 13:56
Alejandro,

Thanks for your great help, but still not working; anyway I think it should work in a regular session also, not only in a zoomed one.

Can you provide me a small piece of script with the function call?

This is mines(3GL):

extern string fisier.sursa.work(32,1)
extern long nrfis,naspa
function main()
{
naspa=select.file("/work/Bob",1,fisier.sursa.work,nrfis,1)
}

I assumed that multi.select.allowed=1 means "yes" and max.selected=1 means only one file alloewd for selection.
no.of.selected is the number of files selected?
By the way, the function returns 0 (is it success?)

;) Is there a way for me to find out the exact sintax/usage for such kind of functions or the repository dll/scripts (e.g. tgbrg0019, ttdllbw, etc.) ;)

Thank you again

alejandro
30th April 2002, 15:34
Here is the small piece of code you asked for, using your same way of working.

I have tested it and worked fine.

|************************************************
|* tccomtestborra 0 VRC B40O c4 expl
|* Test
|* alejandro
|* 30/04/02 [14:13]
|************************************************
|* Script Type: 0
|************************************************
extern string fisier.sursa.work(256,2)
extern long nrfis,naspa
function main()
{
naspa = select.file("",1,fisier.sursa.work,nrfis,2)
message(fisier.sursa.work(1,1))
message(fisier.sursa.work(1,2))
}

Little explanation:

- I guess this function always returns 0
- I gave more room to string contaning files
- Number of files selected has to have the same value as the second fisier.sursa.work dimension. 2 in my example
- If you put "" as the init path, or a wrong path, the browser will begin in ${HOME} user's folder.
- multi.select.allowed=1 means true - multi.select.allowed=0 means false

In my system this works. If not in yours cannot understand why


If you want to know object information use
ttadv2439m000, but if the programmer did not write function's use in script, you only will see function definitions, but not use. This is the case for tgbrg0019.

Hope this will help you,

Alejandro

MrMarco
30th April 2002, 17:13
Hi Bogdan,

I used this peice of code and it works on our B40C c4 system:

domain tgfile path
domain tcmcs.long result,
no.of.selected,
max.selected

domain tcmcs.str80 z.selected(100)



path = "/baan/multisite/"
no.of.selected = 0
max.selected = 10

result = select.file(path, 1, z.selected, no.of.selected, max.selected)

Don't forget to include the DLL in the list of libraries on the session.

Have fun!

mark_h
30th April 2002, 17:25
I found a sample of where this is used - in the script tgbrg1245. The second parameter is a true/false field.

It looks like the gif's on our system are in a different directory, not sure what I am going to do about that. I keep getting a permission error.


Mark

evesely
30th April 2002, 18:42
Here is some more info


The function does always return zero, but the 4th argument is set to the number of items selected (hence, it will be zero if nothing is picked)
In 4c4 (and perhaps elsewhere), there is an optional 6th parameter that, if non-zero, only shows and allows selection of directories

NPRao
30th April 2002, 18:47
Hi Ed,

we are on the Beta-BaaN-5.2 and here is the function prototype-

long default.func.id | Default function id for enter/double click on leaf

function extern select.file(domain tgfile path,
long multi.select.allowed,
ref string selected(,),
ref long no.of.selected,
long max.selected)
{
DLLUSAGE
Expl.: - select file
ENDDLLUSAGE

long ignore, def.options
long exit.value
long i, ret
string session.desc(60)

I think there are only 5 parameters to this function, I will have to check the BaaN-5.2-GA code if there are any changes to this function.

evesely
30th April 2002, 19:19
I looked on one of our ERP systems here, and it only has the five arguments. That's interesting since the 4c4 change was made back in 1998 as part of solution 15855.

Bogdan
30th April 2002, 21:39
Hi,

Well, about those gif's, I just copied them to GBF.gif folder; until now nothing seems to be wrong.

But I still think something else is also missing or is in the wrong place. My sys is BaaN IVc3; maybe something is different from IVc4, but this function is used in IVc3 also (e.g. audit sequence).

I tried also the code provided by alejandro and mrmarco, but no result.
I'll keep digging.

Thank you all

evesely
30th April 2002, 22:14
I think there is a problem with this functionality in IVc3. I have tried the session Mark alluded to (tgbrg1245m000) on four different systems: IVc3 unix, IVc3 NT, IVc4 unix, and IVc4 NT. The IVc4 versions worked, and the IVc3 versions gave the brief "flash" effect that others have noted. I don't get any BW errors and can't see any log activity.

BTW, it seems to work fine on V, too.

mark_h
30th April 2002, 22:35
Evesely said:
I think there is a problem with this functionality in IVc3. I have tried the session Mark alluded to (tgbrg1245m000) on four different systems: IVc3 unix, IVc3 NT, IVc4 unix, and IVc4 NT. The IVc4 versions worked, and the IVc3 versions gave the brief "flash" effect that others have noted. I don't get any BW errors and can't see any log activity.

After the brief flash I did get some errors. For the session I mentioned a log.tgbrg was created. The errors in it pointed to the fact that the gif files that it used were not under ${BSE}/gif/GBF.gif directory. So I have a request in with our admin to move the gif files or call Baan. I am not sure what he is going to try, but will get back to the group when I know something.

I forgot - yes we are on 4c3.

Mark

alejandro
1st May 2002, 00:44
Mark,
If you develop a session in tccom package-module, for example, that call this function, logs will be created in log.tccom file.

So sure that you called the function from tgbrg, so your log is log.tgbrg.

We saw the same errors with files. These files are used to put the graphics on the screen's icons. These icons are for going to the next file or the first, etc... similar than every standard BaaN form.

What we did with these graphics files was to put them in a especific folder, in order to know which were copied, and put them (copying) in the right folder.

Also in log.ppmmm file , you will see:
- Session that called this function dll
- User, time, etc...
-Unix error if aplicable, no permissioin, etc...

Alejandro

mark_h
1st May 2002, 21:34
Our application admin has placed a call with Baan. The solution he was given did not work. Hopefully they will find a solution for us 4c3 users and I will post it when I have it.

Mark

Bogdan
2nd May 2002, 00:56
Hi,

Yes, the session I made and where is used select.file did not make any error log after I copied the missing gif's. But if I try to use the session tgbrg1245m000 I got an error log witch looks like that:
02-03-06[00:38:09]baan: ******* S T A R T of Log message ******
02-03-06[00:38:09]baan: Session: tgbrg1245m000 (foreground), process = 5
02-03-06[00:38:09]baan: File : ptggbfsrvlib0, line: 4093
02-03-06[00:38:09]baan: Errors : e = 0, db.error = 0, lang: 2, comp: 0
02-03-06[00:38:09]baan: init.text.gc(TEXT_GC)
02-03-06[00:38:09]baan: failed, return value = UNIX ERROR 77 (-77), return
02-03-06[00:38:09]baan: *********** E N D of Log message ******

02-03-06[00:38:09]baan: ******* S T A R T of Log message ******
02-03-06[00:38:09]baan: Session: tgbrg1245m000 (foreground), process = 5
02-03-06[00:38:09]baan: File : ptggbfsrvlib0, line: 1074
02-03-06[00:38:09]baan: Errors : e = 0, db.error = 0, lang: 2, comp: 0
02-03-06[00:38:09]baan: init.gc()
02-03-06[00:38:09]baan: failed, return value = UNIX ERROR 77 (-77), return
02-03-06[00:38:09]baan: *********** E N D of Log message ******

02-03-06[00:38:09]baan: ******* S T A R T of Log message ******
02-03-06[00:38:09]baan: Session: tgbrg1245m000 (foreground), process = 5
02-03-06[00:38:09]baan: File : ptgbrg00190, line: 58
02-03-06[00:38:09]baan: Errors : e = 0, db.error = 0, lang: 2, comp: 0
02-03-06[00:38:09]baan: gbf.init()
02-03-06[00:38:09]baan: failed, return value = UNIX ERROR 77 (-77), return
02-03-06[00:38:09]baan: *********** E N D of Log message ******
It seems that some functions are missing or not working in tgbrgsrvlib and tgbrg0019; tgbrgsrvlib is used by tgbrg0019.

Maybe somebody who has the sources for tgbrg0019 and tgbrgsrvlib can take a look to see what's the point with these functions ;) ?

See you soon

alejandro
2nd May 2002, 01:14
Bogdan,

In your log appear this:
02-03-06[00:38:09]baan: Errors : e = 0, db.error = 0, lang: 2, comp: 0

Are you executing tgbrg1245m000 from company 0?

If so I think that in company 0 there are not any tgbrg tables defined.

Bogdan
2nd May 2002, 01:41
Hi Alejandro,

yes in my example the company was 000, but i tried with other companies too and is not working (there are the same errors). It could be a configuration error? On the sistems I've been tested the enterprise modeler is installed but not configured. After all the dll is tgBRG0019. Do you use E.M. ?

See you soon

alejandro
2nd May 2002, 14:21
Yes, we use DEM in our company. With dynamic nenu browser. When exporting and then importing models to other companies, i saw that zoom in tgbrg1245m000. When the menu browser appeared I began to investigate and...

I think all your problems come from your BaaN version. You are in c3. Let us wait Mark Holland's report to support or better, I suggest you to open a case in Support. Sometimes solutions are different in different installations.

I have heared that DEM c4 can be installed in c3. Do not know it comes with a patch or with a set of them. Support will tell you.

I have not access to c3, so i cannot help you very much, but am going see if in c4 those log messages can appear and when.

But you started this thread asking for a bidirectional browser?

If so, here is the other browser direction, local to server: Code (http://www.baanboard.com/baanboard/showthread.php?threadid=1910)

Bogdan
4th May 2002, 17:20
Alejandro,

Yes indeed, I started this thread for both directions local and server (or even local and other ftp host, why not?); I saw the other thread you post for local side; I'll count on it, but what I'm bothering now is why this function is not working; I don't think it's a version bug; after all there is a genuine BaaN session calling this function; it must be a setting problem; I zoomed the tgbrg0019 dll and I found it's using 3 tables (ttdsk900, ttdsk903 and ttgfd400); the last one is not filled in my system, it' empty; also there are 2 refered tables (ttgfd100 and ttgfd101); both are empty.
Can you check your system to see if these tables are filled? It's no hurry, I just want to reduce the unknown aspects.

Thanks a lot for your support.

P.S. maybe it's better to programm "from the begining" all this stuff?
I don't know how to integrate both pieces of "browsers" into one form even if the tgbrg0019 will work.

alejandro
4th May 2002, 18:17
In my system those tables you mentioned are empty too.

In table ttdsk900 there first two rows read:

Icons Group:GBF
Description :Generic Browser Framework
Files: : ${BSE}/gif/GBF.gif

And the second only change Icons Group named GBF.gif

We have not maken modifications in these tables.
I still think your problem comes froom your BaaN software, you are in c3, I am in c4.

On the other side of your question, I think it is not very difficult to put both browsers in the same session. You can create a new session. Two fields, one for server folders / files and one second for local folders / files. Put zoom on those fields to tgbrg0019 for the first field and a second zoom to the local PC dialog code posted on the second field.

A buttom to execute ftp with functions client2server or server2client, and maybe a checkbox to select the direction of ftp you want.

I think it can be a good project to share in the forum. Le us wait Vamsi, for example as moderator, what says and maybe he can lead this. I'm not an expert, but can collaborate. I think all pieces of the puzzle are in the board, only rest some "joiners" of these pieces.

Let us wait.

I suggest you again to contact support in order to solve those problems you have with tgbrg0019.

Alejandro

mark_h
8th May 2002, 15:59
I just thought I would let everyone know that this works on 4c3.
We received this from baan:


I see what you're saying. I checked it on my system and the zoom seems to work fine. Maybe you're having an older version of tgbrg1245m000. If you would take a look at solution 109412, you will find the latest version of this session.

In addition, solution 15855 provides the latest version of the tgbrg0019.


With these two solution the tgbrg1245m000 session works fine. My zoom also works - but I do get an error. I am out of town and will not get a chance to work on my code until tomorrow. I will post another update as soon as possible.

Mark

evesely
8th May 2002, 21:00
After installing 15855 (preceded by 15113, 15459, 15467, 15487, 15504, and 15681 if they are not already installed), the browser seems to work for me on 4c3. The function in the library now also includes the only.directories argument I mentioned earlier in this thread.

Thanks, Mark.

vishbaan
9th May 2002, 10:27
Hi Marco/Alejandro

This thread is interesting.

I think we are looking for something similar to the result of running the session "ttstperrlog".

If you run this,
- it browses all the error log files
- allows you to select the log file
- and selected log file is sent to output device meaning we are
able to open the file, read and print.

How to acheive the same as above using the select.file(...) function of tgbrg0019 dll.

I tried thru a 4GL session type 4; I get a flash(?!); the functions returns 0; But I dont get any browser showing files from the path specified.


extern domain tgfile fv.path
domain tcmcs.str30 var.file(10)
domain tcmcs.long var.filenos
domain tcmcs.long var.ret

choice.cont.process:
on.choice:

var.ret = select.file(fv.path, 0, var.file, var.filenos, 2)


thanks to help me working on it.

VISH

alejandro
9th May 2002, 15:10
I think you have to make this changes:

extern domain tgfile fv.path
STRING var.file(255,2)
domain tcmcs.long var.filenos
domain tcmcs.long var.ret

choice.cont.process:
on.choice:

var.ret = select.file(fv.path, 0, var.file, var.filenos, 2)

Take a try and tell us.

vishbaan
12th May 2002, 09:49
hi a'Jandero,

I tried by declaring the file variable as STRING var.file(255,2).

But still the same problem. I dont get the file browser; It does not list the files...

tks for ur further help. Should I hv to load any patches...

evesely
13th May 2002, 16:24
Vishbaan,

What version of Baan are you running? If it is IVc3, see my post (up 4 from here). There are several solutions. My IVc4 systems are at SP8 and SP9, and they have no problems.

mbowen
13th May 2002, 19:30
Bogdan,
I just used this function. It is very handy.
However, it did work for me at first either.
I had to load a patch for the DLL and then it worked fine.
Check if the object you are using in in your base VRC, if it is, then try loading the patch.

manusatsangi
29th May 2002, 15:11
Hi,
This select.file is useful if one wants an interactive browser.
But, my requierment was to just get the list of files in a directory, something like 'ls' or 'dir'.
I tried

ret = app_start("dir", ...)

but the stdout file gets no data populated even though value of ret = 0 (success). Maybe, because 'dir' is not an exe but an internal windows command.
Could not run shell() or run.prog() command for this.
Nearest to this what I get guess was dll function

tgbrg0019.gbf.get.children()

but no help on this available, and not desired results produced.
In short, pls suggest some function which I can use in BaaN scripts which produces same result as

dir c:\foo\bar > c:\foobaroutput

Warm Regards
Manu

mark_h
29th May 2002, 16:18
Are you looking for a list of files in a directory on the client or the server? What type of OS are on your clients? If on the server what type of system is it(Unix or NT)?

Sorry about all the questions but I hope they help others answer you questions. I do know on a unix server these commands work:

dir.open |Open directory for reading
dir.open.tree |Opens directory tree for reading
dir.entry |Get one directory entry
dir.rewind |Reset read pointer
dir.close |Closes opened directory


These commands allow you to read through a directory.

Mark

manusatsangi
31st May 2002, 11:45
Hi,
Our server is Win 2000 Server, BaaN IV c4. Clients OS is Windows ME.
I could look for list of files on server as well as client.
I could not get help on dir.* commands.

Warm Regards
Manu

manusatsangi
6th June 2002, 13:45
Hi,
Just in case if my post missed attention of all, please send me the detail syntax of dir.* and file.* functions.
I did not find these functions in man pages or any of the dlls.

Warm Regards
Manu

mark_h
6th June 2002, 15:24
I am attaching a word document which contains some help on the commands. The dir.* commands work on the server. If you want something that works on the client your program could create and execute a simple bat. Then read the file it created.

Good Luck!

Mark

r_nagu
17th June 2002, 22:53
Hi,
I am trying to use the tgbrg0019 [File selection] dll to make a file browser. Fortunately we have the source code for this dll and while going though the “select.file” function with in this dll I came across this statement.

retval = gbf.init(gbf.current.library(), "",
bit.or(GBF.MENU.ALL , GBF.MENU.FILE.OPEN),
bit.or(GBF.BUTTON.ALL, GBF.BUTTON.FILE.QUIT),
def.options)

I am trying to find out what gbf.current.library() statement does and which function or dll holds this function. I checked tggbfsrvlib but could not find gbf.current.library(). I am not sure where else it is stored. There are two includes which are specified in dll tfbrg0019, “itggbfdefs" "itgcomlogging" but I can not look at them since we don’t have source for these includes.

Does anybody know what gbf.current.library() is does?

Appreciate your help.

Thanks,
NS

NPRao
18th June 2002, 02:57
Hi NS,

the only info I found from the help manual is -


Syntax
string gbf.current.library()

Description
The gbf.current.library() is a macro, which is defined as: gbf.file.to.library(__FILE__). It makes an educated guess based on the current filename what the object name is.

Arguments
None

Return values
The run time object name of the object file.


I think this function is present in the $BSE/include[baan-version]/bic_gbf file, which is a binary, so we cannot view it.

r_nagu
18th June 2002, 17:16
Hi Rao,
Thanks for the info. If gbf.current.library() is a macro, than I would imagine that I should be able to use this in a program script but, when I compile this following code:

gbf.init(gbf.current.library(), “test’, 1,1,1)

I get compilation error saying “Unresolved reference to function ‘gbf.current.library’”. I had dll tggbfsrvlib attached to the script.

I also checked for file bic_gbf under $BSE/include6.1 but unable to find it.

Any idea what might be causing this?

Thanks,
NS

NPRao
18th June 2002, 21:50
I checked a script which was using the gbf libraries, I found these statements in the declaration section -


|----------------------------------------------------------------------
|Includes for the Graphical Browser Framework Functionality
|----------------------------------------------------------------------
#include <bic_menu>
#include <bic_pulldown>
#include <bic_bsf>
#include <bic_tt>
#include <bic_shell>
#include <bic_gbf> |* GBF defines


#pragma used dll ottgbfprintasc
#pragma used dll ottgbfsrvlib

frigyesg
9th September 2002, 13:32
Originally posted by lbencic
...
You can also issue regular unix commands, and I think local. Such as "ls". So, what I have done it the past is send a directory listing to a temp file, then open the temp file up and parse through it to get the file names in the directory. You can do what you want with it at that point.

Is there a way to use the "ls" command for local directorys? I know about the seq...local commands, but i didn´t find a way to list a local directory to a temp file. But this is exact what i need, to find specific files without any user interaction. I can do this with "appl_start" and a dos "batch" file, but I´m not very happy with this solution.

Best Regards
Frigyes:confused:

mark_h
9th September 2002, 14:42
Not sure if you are aware of this post (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1910), but it uses VB for the local file browser. This is the only other solution I have seen for the client side.

Good Luck!

Mark

Badre Alam
18th September 2002, 07:47
Hi, Bogdan

I tried up your code with bit modification and it is working fine.

here is the actual code :

function Explorer.BaaN()
{
extern string work(32,1)
extern long nr
ret = EXEC_DLL_FUNCTION ("otgbrg0019", "select.file", ret1,
"/usr/users/badre/", 0, work, nr, 0)
}

this will open the BaaN explorer with listing of all the dir. and files.


Rgds

Alam Badre

BaaN/Unix/Informix (Admn.)
Informix Certified Professional

gentercz
18th February 2003, 16:25
hi all,

i tried to round up the previous posts to a small "click and view" logic.

The function lists the content of the folder and lets you select ONE file (last argument of dll).
Then this file will be displayed ... ( of course only ascii files make sense) ...


#pragma used dll ottdllbw
#pragma used dll ottdlldisplay


ret = EXEC_DLL_FUNCTION ("otgbrg0019", "select.file", ret1,
"/baan4c4/", 0, work, nr, 1)
tmp.file = strip$(work(1,1) )
display.file( tmp.file, "File: " & tmp.file, 80, 25, "", "", FALSE)

Cheers,
Jochen

günther
22nd December 2003, 11:17
Now this thread is quit complicated.

@r_ragnu:
I've been successful in getting an erp gbf example (check twiki) on ivc4. You should use:
#include "itggbfdefs" instead of #include <bic_gbf>. Maybe some #defines are missing such as #define GBF.LEAF 3.

Badre Alam
7th January 2004, 09:17
yes, you can use the bic_info6.1 <dllobject>, this will list you all the functions available within the given dll, with proper syntax etc...


Thanks

Alam Badre