ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Example of running a Client Access program (CWBPING.exe) from a Command Line program

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

  • Example of running a Client Access program (CWBPING.exe) from a Command Line program

    Hi All,

    Hope life is going well in the IBM i World.

    I need to ping to a specific IP address from a command line language and based on the reply sent back . Send out an email with the reply message. Does anyone have an example of a command line language that I can accomplish this task. I was hoping I could run a Client Access program(CWBPING.exe) and email me the results.

    Thanks,

    DAC

  • #2
    Re: Example of running a Client Access program (CWBPING.exe) from a Command Line prog

    There are various examples out there on the Internet of programs that ping. I've written one in the past in CL.

    Something like this would work: http://search400.techtarget.com/tip/...in-a-batch-job

    You can insert a SNDDST for the e-mail need if your system is set up for it.

    Comment


    • #3
      Re: Example of running a Client Access program (CWBPING.exe) from a Command Line prog

      Are you just trying to see if the remote system is available? If so, you could do the PING command in CL

      PING RMTSYS(SOMEHOST) MSGMODE(*VERBOSE *ESCAPE)
      MONMSG MSGID(TCP3202 ) EXEC(DO)
      ... something...
      ENDDO

      Chris Ringer

      Comment


      • #4
        Re: Example of running a Client Access program (CWBPING.exe) from a Command Line prog

        What system needs to be the source system for the "ping"? CWBPING is a PC command, and it's not really a "ping" at all. What do you actually need? A "ping" from the server or a "CWBPING" from a PC in your network? The PC should also be able to run a "ping".
        Last edited by tomliotta; February 10, 2016, 11:21 PM. Reason: Correct punctuation and "PAC" s/b "PC"
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment

        Working...
        X