Mainframe Utility: EXPERT

Return to Mainframe Utilities Page

Module


/******************************************************************/
/* CLIST EXPERT - THIS CLIST SCANS THE CAS EXPERT LIST AND        */
/*               RETURNS THE LINE CONTAINING THE STRING SELECTED. */
/*               THE GROUP EXPERT LIST IS IN SLSS.WORK.LIST       */
/*               IN MEMBER "EXPERT".                              */
/******************************************************************/
PROC 1 NAME_TO_SEARCH_FOR +
       COMMON('''SLSS.WORK.LIST(EXPERT)''')
/**** 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 EXPERT 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 EXPERT LISTS FOR &NAME_TO_SEARCH_FOR ***

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

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

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

FREE DDNAME(EXPERT)
ALLOCATE DDNAME(EXPERT) +
         DSNAME(&EXPERTDSN) +
         SHR KEEP

OPENFILE EXPERT INPUT
SET EOF = NO

ERROR DO
    IF &LASTCC = 400 THEN +
        DO
            SET EOF = YES
            RETURN
         END
    ELSE +
        DO
            CLEAR
            WRITE
            WRITE *** UNEXPECTED ERROR IN CLIST EXPERT ***
            WRITE
            WRITE *** RETURN CODE WAS : &LASTCC ***
            WRITE
            WRITE *** PROGRAM VARIABLES ARE :
            WRITE A = &A
            WRITE B = &B
            WRITE EOF = &EOF
            WRITE EXPERT = &EXPERT
            CLOSFILE EXPERT
            FREE DDNAME(EXPERT)
            EXIT
        END
END

GETFILE EXPERT

SET A = 0

/**********************************************************************
/* WRITE MATCHING LINES FROM THE EXPERT DATASET(S).                   *
/**********************************************************************
DO WHILE &EOF = NO
    IF &SYSINDEX(&STR(&NAME_TO_SEARCH_FOR),&STR(&EXPERT)) > 0 AND +
       &SUBSTR(1:1,&STR(&EXPERT)) ¬= &STR(*) THEN +
        DO
            WRITE &EXPERT
            SET A = &A + 1
        END
    GETFILE EXPERT
END

ERROR OFF

CLOSFILE EXPERT
FREE DDNAME(EXPERT)

/**********************************************************************
/* WRITE MATCHING LINES FROM THE EXPERT LINES IN THE PROJECT          *
/* TABLE.                                                             *
/**********************************************************************
/* ISPEXEC CONTROL ERRORS RETURN
/* ISPEXEC TBOPEN PROJECT NOWRITE
/* IF &LASTCC > 4 THEN GOTO CONTINUE
/*
/* ISPEXEC TBTOP PROJECT
/* ISPEXEC TBSKIP PROJECT NUMBER(1)
/* SET SAVECC = &LASTCC
/*
/* DO WHILE &SAVECC = 0
/*     IF (&SYSINDEX(&STR(&NAME),&STR(&PRJPARM)) > 0 OR +
/*         &SYSINDEX(&STR(&NAME),&STR(&PRJQUAL)) > 0) AND +
/*         &STR(&PRJELEM) = &STR(EXPERT #) THEN +
/*         DO
/*             SET A = &A + 1
/*             IF &TESTPROD = T THEN +
/*                 WRITE DSEC STAFF EXT : &PRJQUAL ===== &PRJPARM
/*             ELSE +
/*                 WRITE ACCOUNT STAFF EXT : &PRJQUAL ===== &PRJPARM
/*         END
/*     ISPEXEC TBSKIP PROJECT NUMBER(1)
/*     SET SAVECC = &LASTCC
/* END
/*
/* ISPEXEC TBEND PROJECT

CONTINUE: +
IF &A = 0 THEN +
    WRITE *** NO EXPERT INFO FOUND FOR &NAME_TO_SEARCH_FOR ***

EXIT

HELPSEC: +
CLEAR
WRITE *** HELP FOR THE EXPERT CLIST ***
WRITE
WRITE THIS CLIST ALLOWS THE USER TO LIST EXPERT INFORMATION BY
WRITE PASSING A STRING TO THE CLIST AND THE CLIST WILL SEARCH THE
WRITE PROJECT EXPERT LIST AND THE INDIVIDUALS PHONE LIST (IF ONE EXISTS).
WRITE
WRITE BASIC SYNTAX :
WRITE
WRITE COMMAND ===> TSO EXPERT
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 EXPERT 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 EXPERT LIST (E.G. "SUPPORT")
WRITE
WRITE SPECIAL NOTES : THE PROJECT EXPERT 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..EXPERT'
WRITE                 THIS DATASET SHOULD BE AN 80 BYTE RECORD TO
WRITE                 DISPLAY THE INFORMATION PROPERLY.
WRITE
WRITE                 IN YOUR PERSONAL EXPERT 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 EXPERT LIST BY
WRITE                 ENABLING YOU TO "SECTION" YOUR EXPERT INTO
WRITE                 DIFFERENT GROUPS.
WRITE
WRITE *** END OF HELP *** NO PROCESSING PERFORMED ***

EXIT
            


Documentation


 The EXPERT utility scans SLSS.WORK.LIST(EXPERT) and displays all the lines in
 which the argument string passed at invocation time is found.

 SLSS.WORK.LIST(EXPERT) contains a list of who is an "expert" or considers
 themselves knowledgeable about a specific technical dicipline or specific type
 of hardware/software.

 What the EXPERT utility allows you to do is to type in the name of a given
 technical dicipline or software (e.g. CICS, JCL, COBOL, TSO, etc.), and a list
 of those people who consider themselves at least knowledgeable about that
 subject area will be displayed to you.  You could also use EXPERT in a
 "converse" way and type in a name (e.g. Nuechterlein) and find out what that
 person is an expert in.

 You may also maintain your own personal expert list in addition to the common
 one if you wish.  If you have a sequential 80 byte dataset named
 yourtsouserid.EXPERT, the EXPERT utility will scan it as well as the one in
 SLSS.WORK.LIST(EXPERT).

 It should also be noted that EXPERT will ignore lines with a "*" in column one
 in both the common and personal expert lists.  This allows for "commenting" or
 "annotateing" of these lists as you desire.

 To invoke EXPERT, you can type TSO EXPERT xxxxxx (where "xxxxxx" is the subject
 matter you're interested in) at any ISPF command line and press ENTER.  That's
 it.
            


Leave a Reply

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