× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Rob,

Although there is a certain amount of schadenfreude to obtained from watching this series of appends I've decided to put you out of your misery.

The host does not know whether an emulator or browser is being used. That is because all the host sees is the virtual terminal. The terminal is associated with a real interactive job and is no different from any other interactive job hence no magic environment variables or settings. The reason there is such a thing for WebFacing is because they deliberately do something to track whether a device is a WebFacing device. However, WSG does not

IP address won't work either because it should be set to the IP address of the client. Both the Telnet and WSG servers set this properly as do other properly written virtual terminal applications. Therefore any client that creates a virtual device will set the IP address to the same value--that of the client.

IP port might work but seems clumsy. If you do take this approach then ensure you determine the current telnet port from the services table rather than presuming port 23. You will also have to allow for SSL Telnet which uses a different port. The getservbyname() API will give you the appropriate ports.

The WSG sign-on validation exit program is unlikely to work because it appears the exit program is invoked before a device is allocated. It is also intended to allow automatic sign-on rather than be a generic exit program. However, you may be able to put it to use.


A method that may work:

Use CHGWSGA to activate logging and get the device name from the QATMLOG file in QUSRSYS. You will need to know some value from the interactive job but the device name or client IP address will do. You can get the device name from the job field in the PSDS and the IP address from the device description. This file gets a record for session start and another for session end. The file in unkeyed so you may have to build your own logical over it. Be sure you don't set a unique key that will break WSG. Although unless you expect large numbers of users to be signing on at the same same time time you should be able to position to the end of the file and read backwards until you find the starting record for the current device.

The reason I say 'may' work is because WSG will rename this file when it becomes full. You'll need to experiment a bit to determine exactly what WSG does with this file. There is some documentation in the TCP/IP Configuration Reference but it's sparse.


A method that will work:

Use the DSM APIs to query the device capabilities and if it supports the HTML keyword then it must be a browser (or at least a suitable device). This approach is probably the best because that is what you really want to know. Does the device support HTML. This will work with WSG and any other client that supports HTML such as Arterial Software's aXesTS client. Note: You might want to consider this as a replacement for WSG rather than embarking on a complete CGI implementation.


Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists

   http://www.flybynight.com.au/
   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.