/**********************************************************************/00000100 /* WHEREIS */00000200 /**********************************************************************/00000100 /* */00000300 /* Copyright 1995 IBM Corporation */00000400 /* No warranty expressed or implied */00000500 /* */00000600 /* */00000700 /* This REXX clist gets passed 2 parameters: member name and ddname */00000800 /* */00000900 /* It will search all data sets concatenated to the "ddname" for */00001000 /* the "member name" and will display the names of the data sets */00001100 /* that contain the "member name". */00001200 /* */00001300 /* Syntax: */00001400 /* WHEREIS member {ddname} */00001500 /* */00001600 /* Where: */00001700 /* member is the member you are trying to locate */00001800 /* */00001801 /* ddname is the JCL ddname of the concatenated */00001810 /* partitioned data sets. It is optional, if not */00001811 /* specified it defaults to DSIPARM. */00001820 /* */00001900 /* 4/01/93 - added new IRX messages to trap statement */00002010 /* 10/21/93 - use PIPES */00002020 /* 01/05/94 - work for STEPLIB (ADEMA) */00002020 /* 04/07/95 - use FNDMBR function if running on V3R1 */00002020 /* */00002100 /* Gary Forghetti */00002110 /* Network Management Products Field Support */00002120 /* Research Triangle Park, North Carolina */00002130 /* */00002200 /**********************************************************************/00002300 00002400 if parmcnt()<1 then 00002500 do 00002600 output.1='Incorrect syntax used.' 00002710 output.2='Correct syntax is: "WHEREIS member ddname"' 00002900 output.0=2 00002910 'pipe stem output. | collect | console only' 00002920 exit 00003000 end 00003100 00003200 arg member ddname 00003300 00003400 if ddname='' 00003410 then 00003411 ddname='DSIPARM' 00003412 00003650 message='Searching for member 'member' in 'ddname' concatenation ...' 00003700 00003800 'pipe var message | console only' 00003801 00003802 output.0=0 00004100 00004200 'pipe netv lista 'ddname' | stem messages.' 00004210 00004220 if messages.1<>'CNM299I' 00004230 then 00004240 do 00004250 'pipe stem messages. | collect | console' 00004260 exit 00004270 end 00004280 00004290 parse var messages.1 msgid msgtext 00004291 00004292 if msgtext<>'' 00004293 then 00004294 do 00004295 start=3 00004296 messages.0=messages.0-1 00004297 end 00004298 else 00006433 start=4 00006434 00006550 okay='y' 00006560 00006580 do i=start to messages.0 00010700 00010701 parse var messages.i dsname . 00010702 00010706 if dsname='CNM299I' 00010707 then 00010708 parse var messages.i . dsname . 00010709 00010710 if dsname=ddname 00010711 then 00010712 parse var messages.i . dsname . 00010713 00010714 call check_dataset 00010715 00010716 end 00010720 00010730 if okay<>'y' 00010731 then 00010732 exit 00010733 00010734 address netvasis 'PIPE LIT /Search Complete/ | STEM output. APPEND' 00010770 'PIPE STEM output. | CONSOLE ONLY' 00010770 00010770 exit 00011000 00013101 00013102 /**********************************************************************/00013103 /* CHECK_DATASET - Check the data set for the pds member. */00013104 /**********************************************************************/00013105 check_dataset: 00013106 00013107 'pipe netv allocate dataset('dsname'('member')) shr | var message' 00013109 00013111 parse var message msgidx ddnamex . 00013112 00013114 if msgidx<>'CNM272I' 00013115 then 00013116 do 00013117 'pipe var message | console' 00013118 okay='n' 00013119 return 00013120 end 00013121 00013122 if netview()<'NV31' 00013122 then 00013122 do 'trap and suppress only messages CNM410E, 00013123 IRX0509E IRX0300E IRX0670E IRX0250E IRX0255E' 00013124 00013125 signal on halt 00013201 00013202 address mvs 'execio 1 diskr 'ddnamex' (FINI' 00013203 00013204 saverc=rc 00013204 00013204 if saverc=0 00013205 then 00013206 pull . 00013208 else do 'wait 5 seconds for messages' if event() = 'M' then do 'msgread' if msgid() = 'IRX0509E' then saverc=0 else nop end else nop end 'flushq' rc=saverc end 00013122 else rc=fndmbr(ddnamex,member) if rc=0 then address netvasis, 'PIPE LIT /Member: 'member' was found in PDS: 'dsname'/', '|STEM output. APPEND' 00013217 'pipe netv free f('ddnamex') | var message' 00013218 00013219 parse var message msgidx . 00013220 00013221 if msgidx<>'CNM272I' 00013222 then 00013223 do 00013224 'pipe var message | console' 00013225 okay='n' 00013226 end 00013227 00013228 return 00013230 00013900 00013910 /**********************************************************************/00014000 /* HALT - This routine traps external interrupts triggered by execio */00014100 /* failures. The likely failure is a 013-18 abend which is */00014200 /* the result of a member not found in a pds during open */00014300 /* processing. */00014400 /**********************************************************************/00014500 halt: 00014600 return 00014700