Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 26th April 2002, 13:47
Bogdan's Avatar
Bogdan Bogdan is offline
Senior Member
 
Join Date: Aug 2001
Location: Rm. Valcea - Romania
Posts: 130
Bogdan is on a distinguished road
Baan: BaaN IVc4 / INFOR LN 10.3 - DB: Oracle 9i / Oracle 11gR2 - OS: AIX 5L / Windows 2012
File Browser

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.
__________________
Best regards,
Bogdan BACIU
Reply With Quote
  #2  
Old 26th April 2002, 19:33
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
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
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #3  
Old 26th April 2002, 22:10
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,906
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Server Side

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
Reply With Quote
Sponsored Links
  #4  
Old 26th April 2002, 22:30
Bogdan's Avatar
Bogdan Bogdan is offline
Senior Member
 
Join Date: Aug 2001
Location: Rm. Valcea - Romania
Posts: 130
Bogdan is on a distinguished road
Baan: BaaN IVc4 / INFOR LN 10.3 - DB: Oracle 9i / Oracle 11gR2 - OS: AIX 5L / Windows 2012
Lightbulb

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 !
Regarding app_start, I tried some time ago to use it, but with no result; I'll work harder on this side .

Thank you
__________________
Best regards,
Bogdan BACIU
Reply With Quote
  #5  
Old 26th April 2002, 22:38
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
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.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #6  
Old 27th April 2002, 00:26
alejandro's Avatar
alejandro alejandro is offline
Senior Member
 
Join Date: Feb 2002
Location: Madrid - Spain
Posts: 144
alejandro is on a distinguished road
Baan: IV c4 - DB: Oracle 8 - OS: Unix
Server File browser

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.
Reply With Quote
  #7  
Old 27th April 2002, 01:25
~Vamsi's Avatar
~Vamsi ~Vamsi is offline
Guru
 
Join Date: Aug 2001
Location: San Diego CA, USA
Posts: 590
~Vamsi will become famous soon enough
Baan: ~*~ - DB: ~*~ - OS: ~*~
Thumbs up

Alejandro,

Very Cool.
__________________
~Vamsi
Vamsi Potluru
Baan XL Yet another tool to format Baan output in Excel from Baan Board
This one just happens to be free :)

Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #8  
Old 27th April 2002, 20:35
Bogdan's Avatar
Bogdan Bogdan is offline
Senior Member
 
Join Date: Aug 2001
Location: Rm. Valcea - Romania
Posts: 130
Bogdan is on a distinguished road
Baan: BaaN IVc4 / INFOR LN 10.3 - DB: Oracle 9i / Oracle 11gR2 - OS: AIX 5L / Windows 2012
Wow!

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.
__________________
Best regards,
Bogdan BACIU
Reply With Quote
  #9  
Old 29th April 2002, 19:06
MrMarco's Avatar
MrMarco MrMarco is offline
Junior Member
 
Join Date: Oct 2001
Location: Coventry, UK at the moment ...
Posts: 22
MrMarco is on a distinguished road
Smile Tried out the browser

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!
__________________
"And The Geek shall inherit The Earth ..."
Reply With Quote
  #10  
Old 29th April 2002, 19:22
alejandro's Avatar
alejandro alejandro is offline
Senior Member
 
Join Date: Feb 2002
Location: Madrid - Spain
Posts: 144
alejandro is on a distinguished road
Baan: IV c4 - DB: Oracle 8 - OS: Unix
Read-Only?

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.
Reply With Quote
  #11  
Old 29th April 2002, 19:25
~Vamsi's Avatar
~Vamsi ~Vamsi is offline
Guru
 
Join Date: Aug 2001
Location: San Diego CA, USA
Posts: 590
~Vamsi will become famous soon enough
Baan: ~*~ - DB: ~*~ - OS: ~*~
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 .
__________________
~Vamsi
Vamsi Potluru
Baan XL Yet another tool to format Baan output in Excel from Baan Board
This one just happens to be free :)

Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #12  
Old 30th April 2002, 11:06
Bogdan's Avatar
Bogdan Bogdan is offline
Senior Member
 
Join Date: Aug 2001
Location: Rm. Valcea - Romania
Posts: 130
Bogdan is on a distinguished road
Baan: BaaN IVc4 / INFOR LN 10.3 - DB: Oracle 9i / Oracle 11gR2 - OS: AIX 5L / Windows 2012
I'm stucked

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
__________________
Best regards,
Bogdan BACIU
Reply With Quote
  #13  
Old 30th April 2002, 11:37
alejandro's Avatar
alejandro alejandro is offline
Senior Member
 
Join Date: Feb 2002
Location: Madrid - Spain
Posts: 144
alejandro is on a distinguished road
Baan: IV c4 - DB: Oracle 8 - OS: Unix
File Browser

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.
Reply With Quote
  #14  
Old 30th April 2002, 12:56
Bogdan's Avatar
Bogdan Bogdan is offline
Senior Member
 
Join Date: Aug 2001
Location: Rm. Valcea - Romania
Posts: 130
Bogdan is on a distinguished road
Baan: BaaN IVc4 / INFOR LN 10.3 - DB: Oracle 9i / Oracle 11gR2 - OS: AIX 5L / Windows 2012
Not working

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
__________________
Best regards,
Bogdan BACIU
Reply With Quote
  #15  
Old 30th April 2002, 14:34
alejandro's Avatar
alejandro alejandro is offline
Senior Member
 
Join Date: Feb 2002
Location: Madrid - Spain
Posts: 144
alejandro is on a distinguished road
Baan: IV c4 - DB: Oracle 8 - OS: Unix
File Borwser

Here is the small piece of code you asked for, using your same way of working.

I have tested it and worked fine.
Code:
|************************************************
|* 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

Last edited by ~Vamsi : 9th June 2002 at 01:42.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
replicate file system objects across servers Hitesh Shah Code & Utilities 3 28th June 2003 08:41
HP Unix help plse pjohns Operating Systems & Databases 3 16th May 2003 15:10


All times are GMT +2. The time now is 13:55.


©2001-2017 - Baanboard.com - Baanforums.com