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 15th April 2002, 17:15
montanac's Avatar
montanac montanac is offline
Junior Member
 
Join Date: Dec 2001
Location: Italy - Reggio Emilia
Posts: 14
montanac is on a distinguished road
Baan: Baan IV & BaanERP 5.0c & LN - DB: Informix, B-ISAM. Oracle, MS-SQL - OS: Linux, Windows, AIX, HP-UX
Client type

I am trying to recognise the operating system of the BW client.

I am using the function get.display.data( ref long server_data(SRVMAXSIZE) )

Microsoft operating system srv.display.os.type(server_data) DSBW_WIN_311
DSBW_WIN_NT
DSBW_WIN_95
NT4


But it seems that the function always gives back DSBW_WIN_95.

Did you get to the same problem?

By the way, is there a solution to get the IP address and computer name of the client without having to use cumbersome batch script on the client side?


Ciao.
Claudio.
Reply With Quote
  #2  
Old 15th April 2002, 19:34
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,905
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Yep - samething.

On our 98, W2K and XP machines this appears to always return DSBW_WIN_95. Not really sure what this command is doing. Is this returning info from the server display piece or the client. Looks like the server.

And I do not know of a easy method of getting the IP address of the client. A little more info on what you are attempting to do may help someone come up with a solution.

Good Luck!

Mark
Reply With Quote
  #3  
Old 21st May 2002, 07:07
dbinderbr's Avatar
dbinderbr dbinderbr is offline
Member
 
Join Date: May 2002
Location: Brazil-Sao Paulo
Posts: 81
dbinderbr is on a distinguished road
Baan: Baan IV c3/c4 and V - DB: SQL Server, Oracle, Informix - OS: HP Unix, Windows 2k
Lightbulb Another one...

Hello friends,

You should use the following function:

Syntax

long ostype()

Description

This returns a long value that indicates the operating system environment. The possible values are:

OS_WINDOWS_NT Windows/NT
OS_WINDOWS_95 Windows 95
OS_UNIX All UNIX variants

Context

Bshell function.
__________________
Best Regards,

Daniel C Binder
Reply With Quote
  #4  
Old 21st May 2002, 07:20
~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: ~*~
Hi,

The ostype() is supposed to return the O/S on the server and not the client.
__________________
~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
  #5  
Old 21st May 2002, 08:15
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 am at home that I cannot send the syntactically correct compiled code.

here is the basic logic to get the windows versions or any client versions (maybe a BaaN 4 – Unix ASCII interface), you are working on -

Code:
#pragma used dll ottdllbw

long fp
long ret
string fname(80)
string comd(256)
string buffer(1024)

fname = “tmp” & str$(utc.num())
|* generate a random file name for windows file redirection.
 |* you can use the commands – ver/cmd from DOS/WINDOWS to get the version information.
Quote:
C:\>ver

Microsoft Windows 2000 [Version 5.00.2195]

C:\>cmd
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>
|* If you are using the ver command and redirect the output to a file, then you get 3 lines, 1st and 3rd lines are blanks, and 2nd line contains the windows version. So you need to parse the file to get the version information
|* Alternatively, you can use the command cmd, which gives the 3 lines of output, but we parse only the 1st line to read the version.
Code:
comd = "cmd  > " & fname
ret = app_start(comd, “”, “”,””,””)

if ret > =0 then
|* >=0	success; identification number of the started application is returned
	fp = seq.open.local(fname, “r”, 1)
	if fp < 1 then
		message(“File handling error”)
		exit(1)
	endif
	ret = seq.read.local(buffer, 1024, fp)
	|* buffer now contains  the string –
	|* Microsoft Windows 2000 [Version 5.00.2195]
	seq.close.local(fp)
else 
|* this must be unix os as the cmd isn’t recognized.
|* you can use the ostype() to verify if its  a Unix operating system.
|* long ostype()
|* Description
|* This returns a long value that indicates the operating system environment. The possible |* values are:
|* OS_WINDOWS_NT	Windows/NT
|* OS_WINDOWS_95 	Windows 95
|* OS_UNIX			All UNIX variants
|* To extend the functionality to detect which particular Unix version one is using, you 
|* have to use the unix command – uname, maybe the option -a
	comd = “uname  > ” & fname
	fp = seq.open (fname, “r”)
	if fp < 1 then
		message(“File handling error”)
		exit(1)
	endif
	ret = seq.read(buffer, 1024, fp)
	|* buffer now contains  the string –
|* HP-UX-11.0 – I cannot get the exact unix output now at home.
	seq.close (fp)
	ret = seq.unlink(fname)
endif

Hope you can pick up the clues and try to make it work, I will try to put a better compileable code tommorow.
__________________
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

Last edited by ~Vamsi : 9th June 2002 at 02:48.
Reply With Quote
Sponsored Links
  #6  
Old 13th March 2003, 02:11
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
Claudio,

Better late than never I found the answer
Quote:
By the way, is there a solution to get the IP address and computer name of the
client without having to use cumbersome batch script on the client side?
You can use the tools function -
get.bw.hostname()
to get the Computer Name from which you connect to the BaaN Server.

If you are on the Unix - to get the last connected IP-Address you need to use the
Unix Commands or a 1-line shell script
Code:
last -R -1  <user-name> | tr -s ' ' | cut -f3 -d" "

If you are on Windows then, you can do app_start() with the command - ipconfig and redirect the output to a file. Then parse the file for IP-Address, DNS name, Operating system etc.

You can also find this info from the $BSE/log/log.<bshell-name>
Quote:
2003-02-07[16:23:04(UTC+05:00)]:E:nprao: Pid 15542 Uid 12372 Euid 12372 Gid 1
25 Egid 125 Pset nprao@MBN123456:1144
__________________
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
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
Launching a BW client avpatil Tools Development 6 23rd September 2004 07:50
Baan & Connectware Driver Hangs Rajasekhar Tools Administration & Installation 2 18th February 2004 21:32
HP Vectra VL6/400 type D6945A with Client B40c.065 OmeLuuk Tools Administration & Installation 2 20th March 2003 12:20


All times are GMT +2. The time now is 03:09.


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