Mainframe Utility: PHONE

Return to Mainframe Utilities Page

Module


/******************************************************************/
/* CLIST PHONE - THIS CLIST SCANS THE CAS PHONE LIST AND THE USERS*/
/*               PERSONAL PHONE LIST (IF THEY HAVE ONE), AND      */
/*               RETURNS THE LINE CONTAINING THE STRING SELECTED. */
/*               THE GROUP PHONE LIST IS IN THE "COMMON" CONCAT-  */
/*               ENATION LISTED BELOW.  THE USER'S INDIVIDUAL     */
/*               LIST IS IN "&SYSUID.PHONENUM" (80 BYTE LRECL).   */
/*               AUTHOR - JEFF JONES                              */
/*               MUTATOR - DAVE LEIGH           DATE - 5-23-89    */
/******************************************************************/
/*     COMMON('''SYST.ISPF.DOCLIB(PHONENUM)'' +
/*             ''L [at] ULMH [dot] DOCS [dot] DATA(ADDRESS)''')
PROC 1 NAME_TO_SEARCH_FOR +
       COMMON('''SYST.ISPF.DOCLIB(PHONENUM)'' +
               ''L [at] ULMH [dot] DOCS [dot] DATA(ADDRESS)'' +
               ''SYSP.WORK.LIST(ISSCHED)'' +
               ''SYSP.WORK.LIST(LOGONIDS)''')
/**********************************************************************
/* THE COMMON PHONE LIST IS IN THE LAN IN: V:LANUTILSPHONEUSC.LST   *
/* OFFICE SEERVICES MAINTAINED LIST:       H:PUBLICPHONEALF.DOC     *
/**********************************************************************
/**********************************************************************
/* PLACE EACH DATASET IN THE "COMMON" CONCATENATION IN QUOTES.        *
/**********************************************************************
/**** SET MESSAGE DISPLAY ON/OFF BASED ON THE DEBUG SWITCH ***/
ISPEXEC VGET (DBGSWTCH) PROFILE
IF &DBGSWTCH = &STR(ON) THEN +
    CONTROL MSG LIST CONLIST SYMLIST NOFLUSH
ELSE +
    CONTROL NOMSG NOLIST NOFLUSH NOPROMPT

IF &NAME_TO_SEARCH_FOR = &STR(HELP) THEN GOTO HELPSEC

IF &NAME_TO_SEARCH_FOR = THEN +
    DO
        WRITE ENTER A STRING TO SEARCH FOR IN THE PHONE LIST.
        WRITENR STRING ==>
        READ NAME_TO_SEARCH_FOR
        IF &NAME_TO_SEARCH_FOR = THEN +
            DO
                SET ZEDLMSG = &STR(NO STRING ENTERED *** )+
                              &STR(PROCESSING TERMINATED)
                ISPEXEC SETMSG MSG(UTLZ001)
                EXIT
            END
    END

CLEAR
WRITE *** SCANNING PHONE LISTS FOR &NAME_TO_SEARCH_FOR ***

IF &SYSINDEX(&STR('),&STR(&COMMON)) = 0 AND +
   &STR(&COMMON) >    THEN +
    SET COMMON = &STR('&COMMON')

IF &SYSDSN('&SYSUID..PHONENUM') = OK THEN +
    SET PHONEDSN = &STR(&COMMON '&SYSUID..PHONENUM')
ELSE  +
    SET PHONEDSN = &STR(&COMMON)

IF &STR(&PHONEDSN) =     THEN +
    DO
        SET ZEDLMSG = &STR(*** NO PHONE NUMBER DATASETS TO SEARCH ***)
        ISPEXEC SETMSG MSG(UTLZ001)
        EXIT
    END

ALLOCATE DDNAME(SYSOUD) DSN(*) REUSE
ALLOCATE DDNAME(INFILE) +
         DSN(&PHONEDSN) +
         SHR REUSE

ISPEXEC SELECT PGM(FINDIT) PARM(&NAME_TO_SEARCH_FOR)

FREE DDNAME(INFILE SYSOUD)

EXIT

HELPSEC: +
CLEAR
WRITE *** HELP FOR THE PHONE CLIST ***
WRITE
WRITE THIS CLIST ALLOWS THE USER TO LIST PHONE NUMBER INFORMATION BY
WRITE PASSING A STRING TO THE CLIST AND THE CLIST WILL SEARCH THE
WRITE PROJECT PHONE LIST AND THE INDIVIDUALS PHONE LIST (IF ONE EXISTS).
WRITE
WRITE BASIC SYNTAX :
WRITE
WRITE COMMAND ===> TSO PHONE
WRITE
WRITE WITH THIS SYNTAX, YOU WILL BE PROMPTED FOR A STRING TO SEARCH FOR.
WRITE
WRITE TO PASS THE INFORMATION AT EXECUTION TIME :
WRITE
WRITE COMMAND ===> TSO PHONE SMITH
WRITE
WRITE THIS WILL DISPLAY ANY LINES CONTAINING THE STRING "SMITH".
WRITE
WRITE YOU COULD ALSO USE A STRING OF A NUMBER OR PARTIAL NAME, OR A
WRITE DESCRIPTION THAT IS STORED IN THE PHONE LIST (E.G. "SUPPORT")
WRITE
WRITE SPECIAL NOTES : THE PROJECT PHONE LIST CONSISTS OF THE FOLLOWING
WRITE                 DATASET(S):
WRITE
WRITE &STR(&COMMON)
WRITE
WRITE                 IF YOU WANT A PERSONAL LIST, YOU MUST CREATE A
WRITE                 DATASET CALLED :
WRITE                              '&SYSUID..PHONENUM'
WRITE                 THIS DATASET SHOULD BE AN 80 BYTE RECORD TO
WRITE                 DISPLAY THE INFORMATION PROPERLY.
WRITE
WRITE                 IN YOUR PERSONAL PHONE NUMBER LIST DATASET, AN "*"
WRITE                 IN THE FIRST COLUMN WILL INDICATE A "COMMENT"
WRITE                 LINE.  COMMENT LINES ARE NOT SCANNED FOR THE
WRITE                 SEARCH STRING.  THIS CAN HELP YOU IN THE
WRITE                 MAINTENANCE OF YOUR PERSONAL PHONE LIST BY
WRITE                 ENABLING YOU TO "SECTION" YOUR PHONE NUMBERS INTO
WRITE                 DIFFERENT GROUPS.
WRITE
WRITE *** END OF HELP *** NO PROCESSING PERFORMED ***

EXIT
            


Documentation


 The PHONE utility allows you to query your own phone list for phone numbers and
 any "global" list that exists for every one.  You simply type TSO PHONE xxxxxxx
 where "xxxxxxx" is a string on the line in the file which contains the phone
 number you want.  If you have a line with the name JOE SMITH 999-888-9876 and
 you type in TSO PHONE smi that JOE SMITH line will display.  Your personal
 phone dataset should be youruserid.PHONENUM and should be an FB 80 sequential
 file.
            


Leave a Reply

Your email address will not be published. Required fields are marked *