Verifying from the Command Entry Screen in Batch

You can verify the TIBCO EMS Client for IBM i installation from the command entry screen in batch by running the provided C sample programs.

Prerequisites

Ensure that the TIBCO EMS server is running on port 7222 on server url-id1, where url-id1 is the hostname where your TIBCO EMS server is running.

Procedure

  1. Run the tibemsMsgConsumer sample program (SXJ3MC) as follows:
    SBMJOB CMD(CALL PGM(prodlib/SXJ3MC) PARM('-server''tcp://url-id1:7222' '-topic' TEST1)) ALWMLTTHD(*YES)

    where prodlib is the name of the library into which the product was restored using the RSTLICPGM command. If no LIB parameter was used with the RSTLICPGM command then the default library name is TIBEMSLIB

    Note the job number, for example, 403517/USER1/USER1.

  2. Run the tibemsMsgProducer sample program (SXJ3MP) with a message parameter:
    SBMJOB CMD(CALL PGM(prodlib/SXJ3MP) PARM('-server' 'tcp://url-id1:7222' '-topic' TEST1 'Hello World')) ALWMLTTHD(*YES)
  3. Run the tibemsMsgProducer program again with a different message parameter:
    SBMJOB CMD(CALL PGM(prodlib/SXJ3MP) PARM('-server' 'tcp://url-id1:7222' '-topic' TEST1 'A World Apart')) ALWMLTTHD(*YES)
  4. Optional: If you have another EMS client on Windows, run the tibemsMsgProducer sample program as follows:
    First change directory: cd <directory-where-Windows-client-binary-resides>
    Then run: tibemsMsgProducer -server tcp://url-id1:7222 -topic TEST1 "From Windows"
  5. Run the ENDJOB command with the IMMED option:
    ENDJOB JOB(403517/USER1/USER1) OPTION(*IMMED)
  6. Run the DSPJOB command:
    DSPJOB 403517/USER1/USER1
  7. Select option 4 to display the spooled files of the Job.
  8. Select option 5 next to the QPRINT file.
    The contents of printer file contain the following:
    ------------------------------------------------------------------
    tibemsMsgConsumer SAMPLE
    ------------------------------------------------------------------
    Server....................... tcp://url-id1:7222
    User......................... (null)
    Destination.................. TEST1
    ------------------------------------------------------------------
    Subscribing to destination: 'TEST1'
    Received TEXT message: Hello World
    Received TEXT message: A World Apart
    Received TEXT message: From Windows