View Full Version : Problem mit der Abmeldung von Usern an AS400
mposchardt
15-07-03, 08:58
Sehr geehrte Damen und Herren,
wir setzen in unserem Unternehmen eine AS400 ein und greifen von der PC-Seite aus mit IBM Client Access zu.
Die meisten User melden sich zum Feierabend leider nie richtig ab.
Sie schliessen das Client Access Fenster einfach mit dem "X".
Dadurch haben wir jede Nacht ein problem mit der Reorganisationsmassnahme, da die noch eingeloggten User einige Datensätze auf der AS400 blockieren.
Nun meine Frage:
Gibt es eine Möglichkeit im Client Access ( event. im Operations Navigator ) oder auch eine andere Möglichkeit diese "X" zum Schliessen des Fensters auszublenden? Ich möchte so meine User dazu bringen sich korrekt abzumelden.
Würde mich über eure Hilfe freuen.
M.Poschardt
IT-Department
V.FRAAS AG & Co.
bitte mail an: mposchardt@fraas.com
Hallo !
Die angestrebte Lösung ist wohl eher im Bereich WINDOWS-Programmierung zu sehen. Stelle ich mir nicht ganz so einfach vor. Woher soll das WINDOWS wissen, ob die Emulation gerade ein Anmeldebild anzeigt ?
Aber anderer Vorschlag : auf der AS400 gibt es einen Systemwert QINACTITV. Hier kann eine Überwachungszeit in Minuten für die Inaktivität interaktiver Jobs eingegeben werden.
Im Systemwert QINACTMSGQ kann dann die einzuleitende Aktion festgelegt werden. Trägt man dort *ENDJOB ein, wird der jeweilige Job beendet.
So kann man sich zumindest sicher sein, dass kein interaktiver Job nach Feierabend und Ablauf der eingestellten Minuten mehr blockiert.
Nachteile: wenn jemand tagsüber 2 Stunden nix tut, ist er auch draussen. Und man fliegt auch raus, wenn man halt mitten in einer evtl.kritischen Verarbeitung war.
Nächster Vorschlag: man kann auch Timeouts in die Anwendungen programmieren. Muss man aber je Anwendung machen und ist nicht so ganz einfach.
mposchardt
15-07-03, 12:04
vielen Dank für die schnelle Antwort.
werd ich alles mal ausprobieren.
grüße
mposchardt
1. Der erforderliche Systemwert ist QDEVRCYACN und sollte auf *ENDJOB stehen.
2. Wie merkt die AS/400 überhaupt eine Beendigung der Session ?
CHGTELNA TIMMRKTIMO(60)
Hilfetext hierzu:
Gibt die Anzahl der Sekunden zwischen Verbindungsüberprüfungen an. TCP testet jede TELNET-Verbindung im angegebenen Zeitintervall. Erhält TCP keine Antwort, wird die Verbindung von TCP beendet.
Dieser Parameter bestimmt, wie häufig die Sitzungsverbindung überprüft wird. Bei Angabe eines hohen Werts kann es länger dauern, bis eine verlorengegangene Verbindung festgestellt wird. Bei Angabe eines niedrigeren Werts wird die Sitzung häufiger getestet, aber wenn der Wert zu niedrig festgelegt wird, können normale Verzögerungen im Netz dazu führen, dass Verbindungen als verloren angesehen werden.
Der Defaultwert (*CALC) führt zu einer Überprüfang ca. alle 2 Stunden, d.h., vor Ablauf dieser 2 Stunden stellt die AS/400 keine Unterbrechung fest.
Aber erst nach dieser Feststellung wird der Job nach QDEVRCYACN behandelt.
Da CA/400 zu einem laufenden Job keine Verbindung aufnehmen kann, sollte z.B. 60 Sekunden eingestellt werden.
Wenn also eine Sitzung per X oder ALT+F4 beendet wird, killt die AS/400 den Job nach spätestens 1 Minute.
Hallo,
wir hatten ähnliche Probleme. Einige User melden sich nicht ab und der Rechner des Users wird nicht ausgeschaltet, d.h. die Sitzung wurde nicht beendet.
Bei uns wird jetzt um 20 Uhr das Subsystem QINTER um 20 Uhr mit *immed beendet und um 6 Uhr am nächsten Morgen wieder gestartet.
Billy the Mountain
Hallo,
habe folgendes gefunden, vielleicht eine weitere Möglichkeit:
My users keep forgetting to log off of their AS/400 sessions at the end of the day before they go home. Is there any way we can programmatically address this problem? Perhaps a technique that will automatically log off a user?
You are in luck, Ted. I just happen to have a great solution for logging off inactive workstations!
You must code your DDS with the INVITE keyword. INVITE allows your RPG IV program to "invite," or allow, input from devices other than the keyboard. In this case, we'll be sending input to the device from the RPG program without pressing a key on the keyboard, if the session goes beyond the allowable time. Code the INVITE keyword at the file level of your display file. Use the following code as a guide.
A************************************************* **
A*
A* CRTDSPF FILE(XXX/DSP00D1) SRCFILE(XXX/QDDSSRC) +
A* MBR(DSP00D1) WAITRCD(20)
A*
A************************************************* **
A DSPSIZ(24 80 *DS3)
A CA01(01 'HELP')
A CA03(03 'EXIT')
A INVITE
A R SCREEN1
A 1 19'Test Waitrcd Paramter To Timeout D-
A isplay'
A DSPATR(HI)
A DSPATR(UL)
A 9 28'Input:'
A INPUT 1A B 9 35
A 22 7'F3=Exit'
A COLOR(BLU)
When you create the display file, prompt the Create Display File (CRTDSPF) command and press F9 to display all of the parameters. Look for the WAITRCD (Wait Record) parameter. This parameter, when used in combination with the INVITE keyword, specifies how long the display file should wait before checking for a keyboard response. Enter a value of 20 here, for 20 seconds for testing. In your real-world application, you'll want to make this value a reasonable time limit, say 30 minutes. Create the display file.
In the RPG IV program, specify the number of devices for this display file by coding the MAXDEV parameter on the F-spec. In addition, we need to access the display file's Information File Data Structure (INFDS), so let's code this as well on the F-spec. Given a display file name of DSP00D1, your F-spec in your RPG program will look similar to the following:
FDsp00d1 CF E Workstn Infds(Infds)
F Maxdev(*File)
Next, you'll need to code the INFDS data structure on your D-spec, as follows:
D Infds DS
D Status *Status
And, finally, code a simple loop that will be terminated by the user pressing F3 on the keyboard. Note, in the following code, that rather than using the traditional EXFMT op code, we are instead using the WRITE and READ op codes on the display format. We do this because we are using the INVITE keyword in the DDS. When you use INVITE, you must use WRITE and READ for the process to read "other than keyboard" input. In this case, if there was no activity for 20 seconds--the value we placed in the WAITRCD parameter of the CRTDSPF command--then when the RPG program gets to the READ statement, it will "read" that value from the display file and detect that there was no user input. (The INFDS *STATUS will contain a value of 1331 and time-out the display.)
C Dow *IN03 = *Off
C Write Screen1
C Read Dsp00d1 99LR
C If *In99 = *On And Status = 1331
C Eval *IN03 = *On
C Endif
C If *In01 = *On
C Call 'HELP'
C Parm 'SCREEN1' Screen 10
C Parm 9 crow 15 5
C Parm 35 ccol 15 5
C Parm return 2
C Endif
C Enddo
C Eval *Inlr = *On
--Shannon O'Donnell
Gruss TARASIK
@tarasik
Natürlich kann ich mit einer solchen Lösung Timeouts aus der Anwendung zu programmieren. Dies betrifft dann ggf. 100e Programme.
Aber was mache ich , wenn der User keine Lust hat, z.B. den WRKSPLF zu verlassen ?
Auch hier hilft dann nur der bereits oben erwähnte Systemwert QINACTITV und der zugehörige Wert QINACTMSGQ.
Nur damit kann ich mir sicher sein, dass inaktive Job's auch tatsächlich gekillt werden.
PS:
@tarasik
Übrigens, mit einer DTAQ gehts auch, ich muss nur eine DTAQ an die DSPF hängen, einen QRCVDTAQ mit Timer durchführen.
Allerdings erfordert auch dies eine Neuprogrammierung.