Verify connectivity to critical servers

Use PINGER to quickly verify connectivity to all critical servers within your organization.

You Can View User Feedback To This Tip

Use PINGER to quickly verify connectivity to all critical servers within your organization.

 
 

             PGM
             DCLF       FILE(PINGERFM)
/*Initialize*/
             RTVJOBA    USER(&@SUSER)
 DISPLAY:    SNDRCVF    RCDFMT(PINGER1)
             IF         COND(&IN03 *EQ '1') THEN(GOTO CMDLBL(ENDCLPGM))
/*Initialize*/
             CHGVAR     VAR(&@SPL1) VALUE(' ')
             CHGVAR     VAR(&@SOMF) VALUE(' ')
             CHGVAR     VAR(&@SDBN) VALUE(' ')
             CHGVAR     VAR(&@SOAKW) VALUE(' ')
             CHGVAR     VAR(&@SDBNS) VALUE(' ')
             CHGVAR     VAR(&@SSOMF) VALUE(' ')
             CHGVAR     VAR(&@SSOCC) VALUE(' ')
             CHGVAR     VAR(&@SSOPD) VALUE(' ')
/*Plant1*/   PLANT1:
             VFYTCPCNN  RMTSYS('192.168.0.1') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SPL1) VALUE('*** Error connecting to +
                          Plant 1 0.1')
             GOTO       CMDLBL(OMF)
             ENDDO
             CHGVAR     VAR(&@SPL1) VALUE('Plant 1 connection is OK')
/* OMF */    OMF:
             VFYTCPCNN  RMTSYS('192.168.24.1') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SOMF) VALUE('*** Error connecting to +
                          OMF 24.1')
             GOTO       CMDLBL(DBN)
             ENDDO
             CHGVAR     VAR(&@SOMF) VALUE('OMF connection is OK')
/*Dearborn*/ DBN:
             VFYTCPCNN  RMTSYS('192.168.32.1') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SDBN) VALUE('*** Error connecting to +
                          Dearborn 32.1')
             GOTO       CMDLBL(OAKWOOD)
             ENDDO
             CHGVAR     VAR(&@SDBN) VALUE('Dearborn connection is OK')
/*OAKWOOD*/  OAKWOOD:
             VFYTCPCNN  RMTSYS('192.168.0.7') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SOAKW) VALUE('*** Error connecting to +
                          OAKWOOD Server 0.7')
             GOTO       CMDLBL(DBNSRV)
             ENDDO
             CHGVAR     VAR(&@SOAKW) VALUE('OAKWOOD Server +
                          connection is OK')
/*DEARBORN*/ DBNSRV:
             VFYTCPCNN  RMTSYS('192.168.0.6') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SDBNS) VALUE('*** Error connecting to +
                          DEARBORN Server 0.6')
             GOTO       CMDLBL(MALSRV)
             ENDDO
             CHGVAR     VAR(&@SDBNS) VALUE('DEARBORN Server +
                          connection is OK')
/*MAIL*/     MALSRV:
             VFYTCPCNN  RMTSYS('192.168.0.8') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SMALS) VALUE('*** Error connecting to +
                          MAIL Server 0.8')
             GOTO       CMDLBL(INTIN)
             ENDDO
             CHGVAR     VAR(&@SMALS) VALUE('MAIL Server +
                          connection is OK     ')
/*INTERNET*/ INTIN:
             VFYTCPCNN  RMTSYS('192.168.0.4') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SINTI) VALUE('*** Error connecting to +
                          DSL Gateway 04.2')
             GOTO       CMDLBL(SPEDEOMF)
             ENDDO
             CHGVAR     VAR(&@SINTI) VALUE('DSL Gateway connection +
                          is OK')
/*SPEDE OMF*/SPEDEOMF:
             VFYTCPCNN  RMTSYS('192.168.24.248') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SSOMF) VALUE('*** Error connecting to +
                          SPEDE OMF 24.248')
             GOTO       CMDLBL(SPEDEOCC)
             ENDDO
             CHGVAR     VAR(&@SSOMF) VALUE('SPEDE OMF +
                          connection is OK')
/*SPEDE OCC*/SPEDEOCC:
             VFYTCPCNN  RMTSYS('192.168.8.249') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SSOCC) VALUE('*** Error connecting to +
                          SPEDE OCC 8.249')
             GOTO       CMDLBL(OPD)
             ENDDO
             CHGVAR     VAR(&@SSOCC) VALUE('SPEDE OCC +
                          connection is OK')
/* OPD */    OPD:
             VFYTCPCNN  RMTSYS('192.168.0.247') MSGMODE(*QUIET *ESCAPE)
             MONMSG     MSGID(TCP0000) EXEC(DO)
             CHGVAR     VAR(&@SSOPD) VALUE('*** Error connecting to +
                          SPEDE OPD 0.247')
             GOTO       CMDLBL(END)
             ENDDO
             CHGVAR     VAR(&@SSOPD) VALUE('SPEDE OPD connection is OK')
END:         GOTO       CMDLBL(DISPLAY)
ENDCLPGM:     ENDPGM



     A*******************************************************A
DSPSIZ(24 80 *DS3)
     A                                      MSGLOC(24)
     A                                      PRINT
     A                                      HELP
     A                                      CA03(03 'EXIT')
     A          R PINGER1
     A*%%TS  SD  20031113  154803  BOWLIN      REL-V5R1M0  5722-WDS
     A                                      BLINK
     A                                      OVERLAY
     A                                  1  2'PINGER'
     A                                      COLOR(BLU)
     A                                  1 32'The Oakwood Group'
     A                                      COLOR(WHT)
     A                                  1 72DATE
     A                                      EDTWRD('  /  /  ')
     A                                      COLOR(BLU)
     A            @SUSER        10A  O  2  2COLOR(BLU)
     A                                  2 32'Verify Connections'
     A                                      COLOR(WHT)
     A                                  2 72TIME
     A                                      EDTWRD('  :  :  ')
     A                                      COLOR(BLU)
     A                                  5 12'Plant 1  . . . . :'
     A            @SPL1         40A  O  5 31
     A                                  6 12'OMF  . . . . . . :'
     A            @SOMF         40A  O  6 31
     A                                  7 12'Dearborn . . . . :'
     A            @SDBN         40A  O  7 31
     A                                 10 12'OAKWOOD  . . . . :'
     A            @SOAKW        40A  O 10 31
     A                                 11 12'DEARBORN . . . . :'
     A            @SDBNS        40A  O 11 31
     A                                 12 12'Mail Server  . . :'
     A            @SMALS        40A  O 12 31
     A                                 15 12'Internet IN  . . :'
     A            @SINTI        40A  O 15 31
     A                                 18 12'SPEDE OMF  . . . :'
     A            @SSOMF        40A  O 18 31
     A                                 19 12'SPEDE OCC  . . . :'
     A            @SSOCC        40A  O 19 31
     A                                 20 12'SPEDE OPD  . . . :'
     A            @SSOPD        40A  O 20 31
     A                                 23  2'F3=Exit'
     A                                      COLOR(BLU)
     A                                  4 12'Plants'
     A                                      COLOR(WHT)
     A                                  9 12'Servers'
     A                                      COLOR(WHT)
     A                                 14 12'Internet'
     A                                      COLOR(WHT)
     A                                 17 12'SPEDE Servers'
     A                                      COLOR(WHT)

  
  



USER FEEDBACK TO THIS TIP

  • Auto-refresh with simpler configuration is easily customized. Compile DSPF with DTAQ (*libl/ccdq1090) and DFRWRT(*NO) for this to work.

      
                 PGM
                 DCLF       FILE(CCFD1090)
                 DCL        VAR(&IP1) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP2) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP3) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP4) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP5) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP6) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP7) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP8) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IP9) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IPA) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IPB) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&IPC) TYPE(*CHAR) LEN(32)
                 DCL        VAR(&L1) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L2) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L3) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L4) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L5) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L6) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L7) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L8) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&L9) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&LA) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&LB) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&LC) TYPE(*CHAR) LEN(12)
                 DCL        VAR(&ERR) TYPE(*CHAR) LEN(5)
                 DCL        VAR(&COL) TYPE(*CHAR) LEN(2)
                 DCL        VAR(&OKK) TYPE(*CHAR) LEN(2)
                 DCL        VAR(&DSPQ) TYPE(*CHAR) LEN(10)
                 DCL        VAR(&DSPL) TYPE(*CHAR) LEN(10)
                 DCL        VAR(&DFLD) TYPE(*CHAR) LEN(80)
                 DCL        VAR(&TEST) TYPE(*CHAR) LEN(4)
                 DCL        VAR(&DLEN) TYPE(*DEC) LEN(5 0)
                 DCL        VAR(&WAIT) TYPE(*DEC) LEN(5 0)
    /*Initialize*/
                 CHGVAR     VAR(&DSPQ) VALUE('CCDQ1090  ')
                 CHGVAR     VAR(&DSPL) VALUE('*LIBL     ')
                 CHGVAR     VAR(&DFLD) VALUE('          ')
                 CHGVAR     VAR(&TEST) VALUE('*DSPF')
                 CHGVAR     VAR(&DLEN) VALUE(0)
                 CHGVAR     VAR(&WAIT) VALUE(30)
                 CHGVAR     VAR(&@LOC1) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC2) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC3) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC4) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC5) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC6) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC7) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC8) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOC9) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOCA) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOCB) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&@LOCC) VALUE('INITIALIZING...')
                 CHGVAR     VAR(&IP1)   VALUE('192.168.0.1')
                 CHGVAR     VAR(&IP2)   VALUE('69.11.181.22')
                 CHGVAR     VAR(&IP3)   VALUE('PING.SYMANTEC.COM')
                 CHGVAR     VAR(&IP4)   VALUE('192.168.0.100')
                 CHGVAR     VAR(&IP5)   VALUE('192.168.0.128')
                 CHGVAR     VAR(&IP6)   VALUE('192.168.0.160')
                 CHGVAR     VAR(&IP7)   VALUE('192.168.0.172')
                 CHGVAR     VAR(&IP8)   VALUE('192.168.0.224')
                 CHGVAR     VAR(&IP9)   VALUE('192.168.0.80')
                 CHGVAR     VAR(&IPA)   VALUE('192.168.0.144')
                 CHGVAR     VAR(&IPB)   VALUE('192.168.0.64')
                 CHGVAR     VAR(&IPC)   VALUE('216.165.1289.157')
                 CHGVAR     VAR(&L1)    VALUE('GATEWAY. . .')
                 CHGVAR     VAR(&L2)    VALUE('ROUTER . . .')
                 CHGVAR     VAR(&L3)    VALUE('PUBLIC NET .')
                 CHGVAR     VAR(&L4)    VALUE('WIFI 802.11G')
                 CHGVAR     VAR(&L5)    VALUE('MARBLE . . .')
                 CHGVAR     VAR(&L6)    VALUE('SLATE. . . .')
                 CHGVAR     VAR(&L7)    VALUE('MICA . . . .')
                 CHGVAR     VAR(&L8)    VALUE('DIAMOND. . .')
                 CHGVAR     VAR(&L9)    VALUE('GRANITE. . .')
                 CHGVAR     VAR(&LA)    VALUE('MOONSTONE. .')
                 CHGVAR     VAR(&LB)    VALUE('DOODLE . . .')
                 CHGVAR     VAR(&LC)    VALUE('DNS. . . . .')
                 CHGVAR     VAR(&ERR)   VALUE('ERROR')
                 CHGVAR     VAR(&COL)   VALUE(': ')
                 CHGVAR     VAR(&OKK)    VALUE('OK')
                 RTVJOBA    USER(&@SUSER)
    
                 GOTO       CMDLBL(NOKEY)
    
    /* DISPLAY:    SNDRCVF    RCDFMT(PINGER1)  */
     DISPLAY:
                 CALL       PGM(QRCVDTAQ) PARM(&DSPQ &DSPL &DLEN &DFLD +
                              &WAIT)
                 IF         COND(&DLEN *EQ 0) THEN(GOTO CMDLBL(NOKEY))
                 RCVF       RCDFMT(PINGER1)
                 IF         COND(&IN03 *EQ '1') THEN(GOTO CMDLBL(ENDCLPGM))
     NOKEY:
                 SNDF       RCDFMT(PINGER1)
    
     /*=================================================================*/
                                   LOC1:
                 VFYTCPCNN  RMTSYS(&IP1) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC1) +
                              VALUE(&L1 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC2)
                 ENDDO
                 CHGVAR      VAR(&@LOC1) VALUE(&L1 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC2:
                 VFYTCPCNN  RMTSYS(&IP2) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC2) +
                              VALUE(&L2 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC3)
                 ENDDO
                 CHGVAR      VAR(&@LOC2) VALUE(&L2 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC3:
                 VFYTCPCNN  RMTSYS(&IP3) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC3) +
                              VALUE(&L3 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC4)
                 ENDDO
                 CHGVAR      VAR(&@LOC3) VALUE(&L3 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC4:
                 VFYTCPCNN  RMTSYS(&IP4) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC4) +
                              VALUE(&L4 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC5)
                 ENDDO
                 CHGVAR      VAR(&@LOC4) VALUE(&L4 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC5:
                 VFYTCPCNN  RMTSYS(&IP5) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC5) +
                              VALUE(&L5 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC6)
                 ENDDO
                 CHGVAR      VAR(&@LOC5) VALUE(&L5 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC6:
                 VFYTCPCNN  RMTSYS(&IP6) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC6) +
                              VALUE(&L6 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC7)
                 ENDDO
                 CHGVAR      VAR(&@LOC6) VALUE(&L6 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC7:
                 VFYTCPCNN  RMTSYS(&IP7) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC7) +
                              VALUE(&L7 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC8)
                 ENDDO
                 CHGVAR      VAR(&@LOC7) VALUE(&L7 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC8:
                 VFYTCPCNN  RMTSYS(&IP8) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC8) +
                              VALUE(&L8 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOC9)
                 ENDDO
                 CHGVAR      VAR(&@LOC8) VALUE(&L8 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOC9:
                 VFYTCPCNN  RMTSYS(&IP9) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOC9) +
                              VALUE(&L9 *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOCA)
                 ENDDO
                 CHGVAR      VAR(&@LOC9) VALUE(&L9 *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOCA:
                 VFYTCPCNN  RMTSYS(&IPA) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOCA) +
                              VALUE(&LA *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOCB)
                 ENDDO
                 CHGVAR      VAR(&@LOCA) VALUE(&LA *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOCB:
                 VFYTCPCNN  RMTSYS(&IPB) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOCB) +
                              VALUE(&LB *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOCC)
                 ENDDO
                 CHGVAR      VAR(&@LOCB) VALUE(&LB *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOCC:
                 VFYTCPCNN  RMTSYS(&IPC) MSGMODE(*QUIET *ESCAPE)
                 MONMSG                  MSGID(TCP0000) EXEC(DO)
                 CHGVAR      VAR(&@LOCC) +
                              VALUE(&LC *BCAT &COL *CAT &ERR)
                 GOTO       CMDLBL(LOCD)
                 ENDDO
                 CHGVAR      VAR(&@LOCC) VALUE(&LC *BCAT &COL *CAT &OKK)
     /*=================================================================*/
                                   LOCD:
    
                 GOTO       CMDLBL(DISPLAY)
    
    ENDCLPGM:     ENDPGM
    
    
    
         A*%%TS  SD  20040831  223425  ICHANDLER   REL-V4R4M0  5769-PW1
         A*******************************************************
         A*%%EC
         A                                      DSPSIZ(24 80 *DS3)
         A                                      MSGLOC(24)
         A                                      PRINT
         A                                      INVITE
         A                                      HELP
         A                                      CA03(03 'EXIT')
         A          R PINGER1
         A*%%TS  SD  20040831  212340  ICHANDLER   REL-V4R4M0  5769-PW1
         A                                      BLINK
         A                                      OVERLAY
         A                                  1  2'CCPING'
         A                                      COLOR(BLU)
         A                                  1 31'Curbstone Corporation'
         A                                      COLOR(WHT)
         A                                  1 72DATE
         A                                      EDTWRD('  /  /  ')
         A                                      COLOR(BLU)
         A            @SUSER        10A  O  2  2COLOR(BLU)
         A                                  2 32'Verify Connections'
         A                                      COLOR(WHT)
         A                                  2 72TIME
         A                                      EDTWRD('  :  :  ')
         A                                      COLOR(BLU)
         A            @LOC1         70A  O  6  8
         A            @LOC2         70A  O  7  8
         A            @LOC3         70A  O  8  8
         A            @LOC4         70A  O 10  8
         A            @LOC5         70A  O 11  8
         A            @LOC6         70A  O 12  8
         A            @LOC7         70A  O 14  8
         A            @LOC8         70A  O 15  8
         A            @LOC9         70A  O 16  8
         A            @LOCA         70A  O 18  8
         A            @LOCB         70A  O 19  8
         A            @LOCC         70A  O 20  8
         A                                 23  2'F3=Exit'
         A                                      COLOR(BLU)
         A                                  4  8'Locations'
         A                                      COLOR(WHT)
    
    
    
      
      
    
    
    & ; Ira Chandler

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Read this Search400.com Featured Topic: Monitoring your iSeries system .

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.


This was first published in August 2004

Dig deeper on Performance

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchEnterpriseLinux

SearchDataCenter

Close