dbTalk Databases Forums  

Re: Wintegrate - how to detect if a session is using it - D3/NT

comp.databases.pick comp.databases.pick


Discuss Re: Wintegrate - how to detect if a session is using it - D3/NT in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian Speirs
 
Posts: n/a

Default Re: Wintegrate - how to detect if a session is using it - D3/NT - 03-02-2007 , 10:39 PM






The only problem with this solution is that it REQUIRES BOTH Wintegrate
and Accuterm to be installed on every client. Otherwise it will fall
over on one of the CALL statements.

Joe provided a link earlier in this thread which gave an escape sequence
that would return a Wintegrate response. There is an equivalent Accuterm
escape sequence too. So a better general purpose routine would use these
escape sequences.

Cheers,

Brian


pickd3 (AT) mchsi (DOT) com wrote:
Quote:
I have a combination of Accuterm and wIntegrate sessions and need to
know the difference. I run this routine at the login to set the
emulator flag for use by other applications.

001 * PROGRAM (EMULATOR) Determines emulator
002 * R.Cathcart 20070213
003 INCLUDE SBP INCLUDES
004 PROMPT ''
005 OPEN 'PORTS' TO PORTS.FILE ELSE STOP
006 WINTEG = 0
007 ACCUTERM = 0
008 CRT @(0,0):
009 ECHO OFF
010 ***
011 * CHECK FOR WINTEGRATE
012 CALL WIN.COMSUB("Enter 1")
013 INPUT WINTEG FOR 10 ELSE
014 WINTEG = 0
015 END
016 IF WINTEG > 0 THEN GO UPDATE.PORTS
017 ***
018 * CHECK FOR ACCUTERM
019 CALL FTVSINF(ACCUTERM,'','','','','','','')
020 ***
021 * POST FINDING TO PORTS RECORD
022 UPDATE.PORTS: *
023 CRT @(0,23):EEOS:
024 ECHO ON
025 READU PORTS.REC FROM PORTS.FILE,PORT ELSE PORTS.REC = ''
026 PORTS.REC<3> = ''
027 IF WINTEG > 0 THEN PORTS.REC<3> = 'WINTEG'
028 IF ACCUTERM > 0 THEN PORTS.REC<3> = 'ACCUTERM'
029 WRITE PORTS.REC ON PORTS.FILE,PORT
030 STOP


Reply With Quote
  #2  
Old   
Joe
 
Posts: n/a

Default Re: Wintegrate - how to detect if a session is using it - D3/NT - 03-03-2007 , 09:02 AM






Brian, I agree. There could be anything including a DOS command window
connecting to the system. We've found that the best overall solution is
to throw the escape sequence at the emulator and see what comes back.
If it's the expected result for that given emulator, then everything's
wonderful. If not, then we have logic that disables emulator-specific
functionality for unexpected emulators.

Regards,
Joe


Brian Speirs <bss59 (AT) REMOVETHISparadise (DOT) net.nz> wrote in news:45e8fc0b$1
@clear.net.nz:

Quote:
The only problem with this solution is that it REQUIRES BOTH
Wintegrate
and Accuterm to be installed on every client. Otherwise it will fall
over on one of the CALL statements.

Joe provided a link earlier in this thread which gave an escape
sequence
that would return a Wintegrate response. There is an equivalent
Accuterm
escape sequence too. So a better general purpose routine would use
these
escape sequences.

Cheers,

Brian


pickd3 (AT) mchsi (DOT) com wrote:

I have a combination of Accuterm and wIntegrate sessions and need to
know the difference. I run this routine at the login to set the
emulator flag for use by other applications.

001 * PROGRAM (EMULATOR) Determines emulator
002 * R.Cathcart 20070213
003 INCLUDE SBP INCLUDES
004 PROMPT ''
005 OPEN 'PORTS' TO PORTS.FILE ELSE STOP
006 WINTEG = 0
007 ACCUTERM = 0
008 CRT @(0,0):
009 ECHO OFF
010 ***
011 * CHECK FOR WINTEGRATE
012 CALL WIN.COMSUB("Enter 1")
013 INPUT WINTEG FOR 10 ELSE
014 WINTEG = 0
015 END
016 IF WINTEG > 0 THEN GO UPDATE.PORTS
017 ***
018 * CHECK FOR ACCUTERM
019 CALL FTVSINF(ACCUTERM,'','','','','','','')
020 ***
021 * POST FINDING TO PORTS RECORD
022 UPDATE.PORTS: *
023 CRT @(0,23):EEOS:
024 ECHO ON
025 READU PORTS.REC FROM PORTS.FILE,PORT ELSE PORTS.REC = ''
026 PORTS.REC<3> = ''
027 IF WINTEG > 0 THEN PORTS.REC<3> = 'WINTEG'
028 IF ACCUTERM > 0 THEN PORTS.REC<3> = 'ACCUTERM'
029 WRITE PORTS.REC ON PORTS.FILE,PORT
030 STOP




Reply With Quote
  #3  
Old   
Peter Schellenbach
 
Posts: n/a

Default Re: Wintegrate - how to detect if a session is using it - D3/NT - 03-03-2007 , 11:22 AM



First, the two calls in the solution from pickd3 are calls to
subroutines on the host, not on the client, therefore you do not need
to have both AccuTerm and Wintegrate installed on each PC. I cannot
speak for the WIN.COMSUB routine, but AccuTerm's FTVSINF subroutine
returns a status that indicates whether AccuTerm is present, and a
variety of information about the version and capabilities of the
connected AccuTerm. It will work with a dumb terminal, and other
emulators (as far as I know). It has a timed INPUT statement so if
something other than AccuTerm is connected, it will simply return with
a "AccuTerm not found" status.

It uses the same approach recommended by Brian, but the details are
already written for you.

Thanks,

Peter Schellenbach



Reply With Quote
  #4  
Old   
Brian Speirs
 
Posts: n/a

Default Re: Wintegrate - how to detect if a session is using it - D3/NT - 03-03-2007 , 10:48 PM



Yes - If I'd thought about that for a moment longer, I would have
realised that the subroutines are on the host!

So this approach works in the specific instance where the organisation
uses both Wintegrate and Accuterm, but wouldn't work in a program that
had to work across a number of organisations.

Brian

Peter Schellenbach wrote:
Quote:
First, the two calls in the solution from pickd3 are calls to
subroutines on the host, not on the client, therefore you do not need
to have both AccuTerm and Wintegrate installed on each PC. I cannot
speak for the WIN.COMSUB routine, but AccuTerm's FTVSINF subroutine
returns a status that indicates whether AccuTerm is present, and a
variety of information about the version and capabilities of the
connected AccuTerm. It will work with a dumb terminal, and other
emulators (as far as I know). It has a timed INPUT statement so if
something other than AccuTerm is connected, it will simply return with
a "AccuTerm not found" status.

It uses the same approach recommended by Brian, but the details are
already written for you.

Thanks,

Peter Schellenbach



Reply With Quote
  #5  
Old   
YellowRex
 
Posts: n/a

Default Re: Wintegrate - how to detect if a session is using it - D3/NT - 03-28-2007 , 09:53 AM



Based on this thread, the linked one, and some digging in code and
manuals, I put together the following code snippet that determines
whether a user is logged in via wIntegrate or AccuTerm (the two most
common terminal emulators in use here).

WINTEG = ""
PRINT CHAR(27):CHAR(1):"Enter stx:Version":CHAR(13)
INPUT WINTEG FOR 1 ELSE END
IF WINTEG <> "" THEN
PRINT "Terminal emulator is wIntegrate: ":WINTEG
END
PRINT CHAR(27):CHAR(2):"I"
ACCUTERM = ""
INPUT ACCUTERM FOR 1 ELSE END
IF ACCUTERM <> "" THEN
PRINT "Terminal emulator is AccuTerm: ":ACCUTERM
END

Simple and it works.


Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.