/* REXX */ /* --------------------------------------------------------- */ /* Suchen und Finden von Strings in einer Datei oder */ /* einer Bibliothek (PDS) */ /* */ /* Die gefundenen Member werden auf dem Terminal angezeigt. */ /* */ /* ---------------------------------------------------------- */
Version = "Version 0.50 vom 23.12.2002"
Autor = "JD"
Redakteur1 = "NN"
/* clear foreign stack */ dowhilequeued() >0 pull trash end /* Parameter untersuchen */ arg parm1 parm2 address isredit "ISREDIT MACRO (PARM1 PARM2) NOPROCESS" if parm1 = ""then arg parm1 parm2
uparm2=parm2
upper uparm2 if parm1 = '?'thendo call help exit end
say"Suche nach "parm2" und "uparm2" in "parm1 /* Ermitteln von Dateiinformationen */ call dlist parm1 drop mt.
mt.0=0 do i=1 toqueued()
mt.0=i pull mt.i end do i=1 to mt.0
rc_l=listdsi("'"mt.i"'") if rc_l /= 0 thendo say"RC="rc_l say"last="last" i="i" j="j say"mt."i"="mt.i say"nt."j"="nt.j exit(88) end if sysdsorg='PO'thendo call mlist mt.i drop nt.
nt.0=0 do j=1 toqueued()
nt.0=j pull nt.j
last=nt.j call searchfor end end elsedo
last=mt.i call searchfor end end exit(0)
searchfor: if last = ""thendo say"last="last" i="i" j="j say"mt."i"="mt.i say"nt."j"="nt.j exit(88) end drop FL. address tso "FREE F(IN)" "ALLOC F(IN) DA('"last"') SHR" "EXECIO * DISKR IN (STEM FL. FINIS"/* READ FILE TO STEM */ "FREE F(IN)" do k=1 to FL.0 if (index(FL.k,parm2) > 0) ! (index(FL.k,uparm2) > 0) then say last":"substr(FL.k,1,50) end return
/* */
help: say' ' say'ISPF/PDF edit macro to search a sequential dataset or ' say'partitioned dataset on parm 1 for a string specified in parm2 ' say' ' say'parm 1: ' say' The dataset, which also can contain wildcards. ' say' ' say'parm 2: ' say' The search string without apostrophes ' say' ' say'If you have questions about this command, ' say'contact Hamburg -4244. ' return /*==================================================================*/ /* Subroutine: errorExit */ /* Description: put error-message to screen */ /* terminates the exec */ /* Usage: call errorExit */ /*==================================================================*/
errorExit:
msgNumber = sigl say'Dataset in error RC='rc' sigl='sigl exit 1
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.