|
Hi. I'm nearly desperate with my multi threaded issue :( ... see below. I checked the QTOGINTD job descriptor: => WRKACTJOB JOB(QTOGINTD) ---- Opt Subsystem/Job User Type CPU % Function Status 5 QTOGINTD QTCP BCH .0 PGM-QTOGINTD SELW ---- -> Menu => 2 (Display job definition attributes): ---- Job description . . . . . . . . . . . . . . . . . : QTOINETD Library . . . . . . . . . . . . . . . . . . . . : QSYS ... Allow multiple threads . . . . . . . . . . . . . : *YES ... ---- I did a simple C program: ---- #include <stdlib.h> #include <unistd.h> // usleep() #include <stdio.h> // fprintf() int main(void) { int i=0; for (i=0; i<120; i++) { fprintf(stdout, "Test output...\n"); fflush(NULL); usleep(500000); // 0.5 s } // for ... return 0; } // main() ---- The compilation generated the following PGM: /qsys.lib/MYLIB.lib/mysrv.pgm I defined a new TCP service: => CFGTCP -> Menu => 21 (Configure related tables) => 1 (Work with service table entries): ---- Opt Service Port Protocol 1 my-test-service 10002 tcp ---- Later I added the below line to the INETD config file (/QIBM/UserData/OS400/INETD/inetd.conf): ---- my-test-service stream tcp nowait QTCP /qsys.lib/MYLIB.lib/mysrv.pgm mysrv ---- and restarted the INETD service: => ENDTCPSVR *INETD => STRTCPSVR *INETD When I opened a telnet connection to the TCP port 10002, the connection was closed immediately. Unfortunately I'm a new bee to OS/400 and I don't know how to check the error message. So ...: => DSPOBJAUT OBJ(MYLIB/MYSRV) OBJTYPE(*PGM) ---- Object --Object--- -Data-- User Group Authority O M E A R R A U D E *PUBLIC *CHANGE X X X X X X DAMIRD *ALL X X X X X X X X X X *GROUP D_G *ALL X X X X X X X X X X ---- As this seams good to me, I changed the INETD service username (I changed the INETD config): ---- my-test-service stream tcp nowait QUSER /qsys.lib/MYLIB.lib/mysrv.pgm mysrv ---- and restarted the INETD. This time when telneting to the TCP port 10002, I got some output (of course it was unreadable - EBCDIC - I opened an telnet window from Linux). So I checked the created job definition: => WRKACTJOB JOB(MYSRV) ---- Opt Subsystem/Job User Type CPU % Function Status 5 MYSRV QTCP BCI .0 PGM-MYSRV TIMW ---- => 2 (Display job definition attributes): ---- Job description . . . . . . . . . . . . . . . . . : QTOINETD Library . . . . . . . . . . . . . . . . . . . . : QSYS ... Allow multiple threads . . . . . . . . . . . . . : *NO ... ---- => DSPJOBD JOBD(QSYS/QTOINETD) ---- ... Allow multiple threads . . . . . . . . . . . . . : *YES ... ---- I can't understand why the job was started without the Multi Threaded attribute set?!?! Please help - I'm going crazy with this :) BTW: It would be great to get a hint (maybe with some examples) how to use (display) messages too. Thanks and best regards, Dezo
As an Amazon Associate we earn from qualifying purchases.
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.