/* REXX */ /*********************************************************************** * * * Name: REXXPG05 * * Author: Venkat Srinivasan * * Modeled after the SAMPLIB member to search catalog for DB2 dataset * * extent computation. This may not work for you without customization * * * Description: Call the Catalog Search Program * * * ***********************************************************************/ "execio * diskr SYSIN (stem key. finis" x=time('R') r=0 do i=1 to key.0 key.i=strip(translate(key.i)) x=iggcsi(key.i) say right(x, 4) "Records written for Key <"key.i">." r=r+x end /* do i=1 to key.0 */ say "Wrote" r "Records in" time('E') "seconds." "execio * diskw CSIDATA (finis" exit 0 iggcsi: procedure arg inputs vcat = substr(inputs,1,8) dbname = substr(inputs,9,8) obname = substr(inputs,17,8) dsnum = substr(inputs,25,4) dsn = vcat|| '.DSNDBD.'|| dbname || '.'||obname ||'.I0001.' ||dsnum Say dsn key = dsn /*********************************************************************** * Initialize the Parm List * ***********************************************************************/ modrsnrc=substr(' ',1,4) /* clear module/return/reason */ csifiltk=substr(key,1,44) /* move filter key into list */ csicatnm=substr(' ',1,44) /* clear catalog name */ csiresnm=substr(' ',1,44) /* clear resume name */ csidtyps=substr(' ',1,16) /* clear entry types */ csicldi =substr('Y',1,1) /* indicate data and index */ csiresum=substr(' ',1,1) /* clear resume flag */ csis1cat=substr(' ',1,1) /* indicate search > 1 catalogs*/ csiresrv=substr(' ',1,1) /* clear reserve character */ csiflds= "NOEXTNT " csinumen='0001'X /********************************************************************* * Build the selection criteria fields part of parameter list *********************************************************************/ csiopts =csicldi || csiresum || csis1cat || csiresrv csifield=csifiltk || csicatnm || csiresnm || csidtyps || csiopts csifield=csifield || csinumen || csiflds /******************************************************************* * Initialize and build Work Area output part of parameter list ********************************************************************/ worklen = 27984 dwork = d2c(worklen, 4) || copies('C3'x, worklen-4) r=0 do until substr(csifield, 150, 1)\='Y' /* Resume Flag */ address LINKPGM 'IGGCSI00 MODRSNRC CSIFIELD DWORK' iggrc=rc if iggrc\=0 then do say "RC=" iggrc", MODRSNRC="c2x(modrsnrc) exit 12 end dsvars = substr(inputs,29,30) CSI.1=substr(dwork,1,240)||' '||dsvars "execio 1 diskw CSIDATA (stem CSI." r=r+1 end /* do until substr(csifield, 150, 1)\='Y' */ return r