gfasbender
29th November 2001, 18:07
See http://www.baanboard.com/node/1767
NPRao
29th November 2001, 19:17
Hi,
I am curious to know, why would you like to use the C language when you can develop the same tool in baan tools using the various functions as -
long file.stat( string file_name(256), ref long file_size [, ref long ctime, ref long mtime, ref long atime ] )
long seq.unlink( string path_name(128) )
Description
This deletes the file indicated by the path_name argument.
mark_h
30th November 2001, 03:58
Hi NPRao2000,
That is a good question, but in this forum the tools are not limited to just Baan tools coding. This may be useful to a system or application admin type. In some cases we may need to post more info with the script - like why and how we use it. I can see several possiblities for the code - but I do not have access to a C compiler. I would convert it into a Baan library or function to be called by one of my sessions. Thanks for the question and hopefully Gordon will clarify this.
Thanks
Mark
gfasbender
30th November 2001, 17:21
I guess I have to address this as a consultant. Traveling around to different companies and sites, it's a lot easier to port and install a utility 'C' program on the clients Unix box, under my own id, than it is to get the customer's approval to install a "Baan Customization".
Also, during certain periods, I work considerably more in a Unix shell than I do in Baan, and it's quicker to start the 'C' program from the command line than it is to execute a Baan session that does the same thing.
I guess, if I worked as a developer for one company, I would create a utility Baan session, instead of the 'C' program.
I hope this helps.
Gordon
NPRao
30th November 2001, 20:29
Hi Gordon,
I cannot comment much on portability issues between operating systems as I have always worked with BaaN on Unix.
Yes I agree that we can develop good shell scripts on Unix. But I prefer to write in Baan Tools if possible for the portability of Baan tools on Unix and Windows. If the baan tools cannot support some functions depending on the operating systems then I would then look in for the operating system specific tools/utilities. I mostly start developing them as a 3-GL programs and if they are good and useful for others I make it into a session with some UI.
Ofcourse I seen few shell scripts which are better in Unix and I dont know how to put them in baan tools.
KlayVessel
30th December 2001, 06:41
Wow, that's a lot of work for both the programmer and the system. If you're sticking with Unix, why not:
#!/usr/bin/ksh
DIR=${1:-"."}
find $DIR -size 0c -type f | xargs rm -f
(only the last line is really needed, the DIR var is included for clarity).