× 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.


  • Subject: RE: Routing a telnet device to a subsystem
  • From: "Rich Duzenbury" <rduz@xxxxxxxx>
  • Date: Fri, 17 Sep 1999 23:00:11 -0500
  • Importance: Normal

Well, I just did this, but by user ID.

Say you have two subsystems, SBS1 and SBS2.  Set them up so the workstation 
entry is *ALL, but change it to at *ENTER.

Then, I added a routing entry to each subsystem (high in the list), including 
QINTER, to call a program whose job it is to check to see if the job is running 
in the right subsystem.  The QUSRJOBI api provides the subsystem that the job 
is running in.  

If the job is running in the right subsystem, then I issue a TFRCTL to 
QSYS/QCMD, and the job takes off as if nothing happened.  If it's not, then I 
issue TFRJOB to jobq SBS1 or SBS2 (or wherever) which causes the job to move to 
the proper subsystem.  Take note that the routing entry is again fired in the 
new subsystem!

As far as by IP address, it seems that someone recently posted which API you 
can call to get the IP address of your job.  Something to do with the device 
description, I suppose.  Perhaps someone can mention this again...

Here is my bit of code for the subsystem routing entry:
PGM                                                                             
                                                                                
             DCL        VAR(&SBSID) TYPE(*CHAR) LEN(10)                         
             DCL        VAR(&TARGET) TYPE(*CHAR) LEN(10)                        
             DCL        VAR(&FRLIB) TYPE(*CHAR) LEN(10) +                       
                          VALUE('WMCDUZ') /* LIB FOR ALL FLYRIGHT OBJECTS */    

| This is a simple call to QUSRJOBI.  
                                                                                
             /* GET CURRENT SUBSYSTEM */                                        
             CALL       PGM(&FRLIB/FLYRIGHTJ) PARM(&SBSID)                      
                                                                                
|This is where you code your routine to decide which subsystem.  I store my 
|stuff |in the FLYPARM file, and look up target based on the user ID.  I 
|suppose you would |want to use IP address as your key.

             /* GET TARGET LOCATION */                                          
             OVRDBF     FILE(FLYPARM) TOFILE(&FRLIB/FLYPARM)                    
             CALL       PGM(&FRLIB/FLYRIGHTT) PARM(&TARGET)                     
             DLTOVR     FILE(FLYPARM)                                           

|Also note here that I assume the subsystem name and it's jobq are the same.  
|On my system they are.  E.G.  QINTER subsystem has QINTER jobq.  If that's 
|not the case, you would need to enhance this a bit.  
                                                                                
 
             /* GOT A NEW TARGET? TFRJOB TO THE NEW JOBQ */                     
             IF         COND((&SBSID *NE &TARGET) *AND (&SBSID *NE +            
                          ' ')) THEN(DO)                                        
             TFRJOB     JOBQ(&TARGET)                                           
             ENDDO                            
                                              
             TFRCTL     PGM(QSYS/QCMD)        
ENDPGM                                        
-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of York, Albert
Sent: Friday, September 17, 1999 10:57 AM
To: 'MIDRANGE-L@midrange.com'
Subject: Routing a telnet device to a subsystem


Does anybody know a way to route a telnet device to a particular subsystem
based on the IP address? 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.