f



GT.M Socket GT.M v.6.3

Hello !

I have never worked with a socket version 6.2 GT.M supremely
I tried to run, but it gives an error:

%GTM-E-JOBFAIL, JOB command failure,%GTM-I-TEXT, Job error in routine specification. Label and offset not found in created process
		At M source location LOOP+13^webFC
%GTM-W-NOTPRINCIO, Output currently directed to device |TCP|9999

I used code snippet from https://github.com/shabiel/M-Web-Server
(Sam Habiel)

Here is my code:
****************
start
 ; Start the Socket server.
 new port
 set port=9999
 job listen^webFC(port)
 quit
listen(port)
 ;k (tcpdev,port,nr)
 s timeo=15
 s:port="" port=9999
 s ver=$e($zv,1,10)
 s nr=0
 o 0:(nowrap)
 d apiInit($j,port)
 s tcpdev="|TCP|"_port
 o tcpdev:(LISTEN=port_":TCP":DELIMITER="":attach="server":NOWRAP):15:"socket" e  q 
 ;o tcpdev:(ZLISTEN=port_":TCP":DELIMITER="":ATTACH="listener":NOWRAP):timeo:"SOCKET"
 u tcpdev
 w /listen(5)
 n CHILDSOCK
 u 0 w "opened"_tcpdev,!
LOOP ;
   s nr=0
   u 0 w "Waiting....",! u tcpdev W /WAIT(10) s k=$KEY i k'["CONNECT" g LOOP
   ;s socket=$p($key,"|",2)
   ;c tcpdev:(SOCKET="listener") job listen^webFC(port) ;close listener and start another GT.M Link to listen port
 s ver=+$p($zv,"GT.M V",2)
 i +$p($zv,"GT.M V",2)'<6.1 do
 . s flag=0
 . s CHILDSOCK=$P($KEY,"|",2)
 . u tcpdev:(detach=CHILDSOCK)
 . n Q s Q=""""
 . n ARG s ARG=Q_"SOCKET:"_CHILDSOCK_Q
 . n J s J="CHILD:(input="_ARG_":output="_ARG_")"
 . j @J 
 i +$p($zv,"GT.M V",2)<6.1 do
 . s flag=1
 . s socket=$p($key,"|",2)
 . c tcpdev:(SOCKET="listener")
 . u tcpdev:(SOCKET=socket) 
 . j listen^webFC(port) 
 u 0 w k,!

 ....
0
Valeriu
12/21/2016 1:26:39 PM
comp.lang.mumps 1621 articles. 0 followers. Post Follow

2 Replies
852 Views

Similar Articles

[PageSpeed] 57

On Wednesday, December 21, 2016 at 5:26:40 AM UTC-8, Valeriu Gontia wrote:
> Hello !
> 
> I have never worked with a socket version 6.2 GT.M supremely
> I tried to run, but it gives an error:
> 
> %GTM-E-JOBFAIL, JOB command failure,%GTM-I-TEXT, Job error in routine specification. Label and offset not found in created process
> 		At M source location LOOP+13^webFC
> %GTM-W-NOTPRINCIO, Output currently directed to device |TCP|9999
> 
> I used code snippet from https://github.com/shabiel/M-Web-Server
> (Sam Habiel)
> 
> Here is my code:
> ****************
> start
>  ; Start the Socket server.
>  new port
>  set port=9999
>  job listen^webFC(port)
>  quit
> listen(port)
>  ;k (tcpdev,port,nr)
>  s timeo=15
>  s:port="" port=9999
>  s ver=$e($zv,1,10)
>  s nr=0
>  o 0:(nowrap)
>  d apiInit($j,port)
>  s tcpdev="|TCP|"_port
>  o tcpdev:(LISTEN=port_":TCP":DELIMITER="":attach="server":NOWRAP):15:"socket" e  q 
>  ;o tcpdev:(ZLISTEN=port_":TCP":DELIMITER="":ATTACH="listener":NOWRAP):timeo:"SOCKET"
>  u tcpdev
>  w /listen(5)
>  n CHILDSOCK
>  u 0 w "opened"_tcpdev,!
> LOOP ;
>    s nr=0
>    u 0 w "Waiting....",! u tcpdev W /WAIT(10) s k=$KEY i k'["CONNECT" g LOOP
>    ;s socket=$p($key,"|",2)
>    ;c tcpdev:(SOCKET="listener") job listen^webFC(port) ;close listener and start another GT.M Link to listen port
>  s ver=+$p($zv,"GT.M V",2)
>  i +$p($zv,"GT.M V",2)'<6.1 do
>  . s flag=0
>  . s CHILDSOCK=$P($KEY,"|",2)
>  . u tcpdev:(detach=CHILDSOCK)
>  . n Q s Q=""""
>  . n ARG s ARG=Q_"SOCKET:"_CHILDSOCK_Q
>  . n J s J="CHILD:(input="_ARG_":output="_ARG_")"
>  . j @J 
>  i +$p($zv,"GT.M V",2)<6.1 do
>  . s flag=1
>  . s socket=$p($key,"|",2)
>  . c tcpdev:(SOCKET="listener")
>  . u tcpdev:(SOCKET=socket) 
>  . j listen^webFC(port) 
>  u 0 w k,!
> 
>  ....

Well, it's saying that CHILD isn't found in the code; and I can't see it either.

--The original author Sam
0
Sam
12/21/2016 9:12:34 PM
=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 21 =D0=B4=D0=B5=D0=BA=D0=B0=D0=B1=D1=80=D1=
=8F 2016 =D0=B3., 23:12:35 UTC+2 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=
=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Sam Habiel =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=
=B0=D0=BB:
> On Wednesday, December 21, 2016 at 5:26:40 AM UTC-8, Valeriu Gontia wrote=
:
> > Hello !
> >=20
> > I have never worked with a socket version 6.2 GT.M supremely
> > I tried to run, but it gives an error:
> >=20
> > %GTM-E-JOBFAIL, JOB command failure,%GTM-I-TEXT, Job error in routine s=
pecification. Label and offset not found in created process
> > 		At M source location LOOP+13^webFC
> > %GTM-W-NOTPRINCIO, Output currently directed to device |TCP|9999
> >=20
> > I used code snippet from https://github.com/shabiel/M-Web-Server
> > (Sam Habiel)
> >=20
> > Here is my code:
> > ****************
> > start
> >  ; Start the Socket server.
> >  new port
> >  set port=3D9999
> >  job listen^webFC(port)
> >  quit
> > listen(port)
> >  ;k (tcpdev,port,nr)
> >  s timeo=3D15
> >  s:port=3D"" port=3D9999
> >  s ver=3D$e($zv,1,10)
> >  s nr=3D0
> >  o 0:(nowrap)
> >  d apiInit($j,port)
> >  s tcpdev=3D"|TCP|"_port
> >  o tcpdev:(LISTEN=3Dport_":TCP":DELIMITER=3D"":attach=3D"server":NOWRAP=
):15:"socket" e  q=20
> >  ;o tcpdev:(ZLISTEN=3Dport_":TCP":DELIMITER=3D"":ATTACH=3D"listener":NO=
WRAP):timeo:"SOCKET"
> >  u tcpdev
> >  w /listen(5)
> >  n CHILDSOCK
> >  u 0 w "opened"_tcpdev,!
> > LOOP ;
> >    s nr=3D0
> >    u 0 w "Waiting....",! u tcpdev W /WAIT(10) s k=3D$KEY i k'["CONNECT"=
 g LOOP
> >    ;s socket=3D$p($key,"|",2)
> >    ;c tcpdev:(SOCKET=3D"listener") job listen^webFC(port) ;close listen=
er and start another GT.M Link to listen port
> >  s ver=3D+$p($zv,"GT.M V",2)
> >  i +$p($zv,"GT.M V",2)'<6.1 do
> >  . s flag=3D0
> >  . s CHILDSOCK=3D$P($KEY,"|",2)
> >  . u tcpdev:(detach=3DCHILDSOCK)
> >  . n Q s Q=3D""""
> >  . n ARG s ARG=3DQ_"SOCKET:"_CHILDSOCK_Q
> >  . n J s J=3D"CHILD:(input=3D"_ARG_":output=3D"_ARG_")"
> >  . j @J=20
> >  i +$p($zv,"GT.M V",2)<6.1 do
> >  . s flag=3D1
> >  . s socket=3D$p($key,"|",2)
> >  . c tcpdev:(SOCKET=3D"listener")
> >  . u tcpdev:(SOCKET=3Dsocket)=20
> >  . j listen^webFC(port)=20
> >  u 0 w k,!
> >=20
> >  ....
>=20
> Well, it's saying that CHILD isn't found in the code; and I can't see it =
either.
>=20
> --The original author Sam

Yes, i did not notice ...
Thanks, i'll try to understand ... more
A simple example is not enough to understand the essence of the work.
I used to use xinetd service and there was no need use.=20
Using FCGI and nginx i no longer cant use this service, here and decided to=
 investigate.
0
Valeriu
12/22/2016 7:08:11 AM
Reply: