Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

TCP3210/TCP3202, *ESCAPE or *COMP, help . . .

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TCP3210/TCP3202, *ESCAPE or *COMP, help . . .

    Ok, I have searched everywhere and all I seem to find are conflicting opinions on this. I have a CL and basically I want to ping a PC and know if the pc is on or off.

    What does TCP3210 as *ESCAPE mean? I thought it meant successful, but I am getting it returned on a pc that I know is off. So does this just mean that the ping executed, but not necessarily that the status of the pc was ok?

    In another situation, I get a TCP3202 on a pc that seems to be off, but may have a DNS validation issue.

  • #2
    *Escape messages are sent in reponse to an error condition. In this case the *Escape message TCP3210 indicates that the remote system was not contacted successfully.

    *Comp messages are sent to provide completion information. This information may indicate success or failure.

    In the case of the PING command the help text for the Message mode (MSGMODE) keyword indicates that:

    If you specify *COMP then you will get a completion message back to indicate success or failure. By receiving the message and examining message replacement data variable &3 you will be able to determine the percentage of successful connections. If the value is 0 then the ping attempt failed, if the value is greater than 0 then the ping attempt worked. This check can be done with:

    Code:
         Pgm                                                          
         Dcl        Var(&MsgDta)   Type(*Char) Len(12)                
         Dcl        Var(&Pct_Good) Type(*Int)  Len(4) +               
                      Stg(*Defined) DefVar(&MsgDta 9)                 
         Dcl        Var(&MsgID)    Type(*Char) Len(7)                 
                                                                 
         Ping       RmtSys(*IntNetAdr) IntNetAdr('192.168.0.15')      
         RcvMsg     MsgType(*Last) Rmv(*No) MsgDta(&MsgDta) +         
                      MsgID(&MsgID)                                   
         If         Cond((&MsgID = TCP3210) *And (&Pct_Good > 0)) +   
                      Then(SndPgmMsg Msg('Found'))                    
         Else       Cmd(SndPgmMsg Msg('Not found'))                   
         EndPgm
    If you specify *Escape then you will get an escape message back to indicate a failure. Though not stated in the help text, you will get TCP3210 sent as a *Comp in the case of success. So if you specify *Escape and your MonMsg for TCP3210 fires then the ping failed. If the MonMsg doesn't fire then the ping did not fail and the remote system was contacted.

    Hope this helps,
    Bruce Vining

    Comment

    Working...
    X