S
PL_
PL_
PL_TCP_POST_LISTEN {%},{%},{%} {WTHEN\ELSE}
*
      T$$$ = OCONV(FIELD({%1},'.',1),'MCDX') 'R%2' : OCONV(FIELD({%1},'.',2),'MCDX') 'R%2' : OCONV(FIELD({%1},'.',3),'MCDX') 'R%2' : OCONV(FIELD({%1},'.',4),'MCDX') 'R%2'
*
      S$ = CALLFN('00':         \
                  {*FNR.52}:                 \ ;* Function code
                  T$$$:                      \ ;* LocalIP
                  OCONV({%2},'MCDX')'R%4':   \ ;* LocalPort
                  OCONV({%3},'MCDX')'R%4'    \ ;* Port Number 
                  )
*
      IF S$[3,4] = IPX.SOCKET.NO THEN
         RES = OCONV(S$[7,4],'MCXD')
         IF RES > 32768 THEN
            RES = RES - 65536
         END
         ERR = 0
      END ELSE
         ERR = 1
         RES = 0
      END
*
      IF NOT(ERR) AND RES >= 0 {%4}
