/* REXX */ /* process arguments */ Arg lvl confirm If lvl = '' then Do Say '>> A dataset filter must be supplied' Say '>> A second parameter of Y confirms dataset recalls' Exit 4 End If confirm \= 'Y' then Do Say '>> Running in simulation mode' Say '>> A second parameter of Y confirms dataset recalls' End /* initialize parm list for IGGCSI00 */ xdetail = Substr('VOLSER',1,8,' ') Xdetailnum = 1 modrsnrc = ' ' /* clear return info */ csifiltk = Substr(lvl,1,44) /* set filter key */ csicatnm = Substr(' ',1,44) /* set catalog name */ csiresnm = Substr(' ',1,44) /* clear resume name */ csidtyps = Substr('AHC',1,16) /* non-vsam,gds, vsam */ csicldi = ' ' /* no data/index */ csis1cat = ' ' /* search multi cats */ csiresrv = ' ' /* reserved */ csiresum = ' ' /* resume flag */ csiopts = csicldi || csiresum || csis1cat || csiresrv csifield = csifiltk || csicatnm || csiresnm || csidtyps || csiopts csifield = csifield || X2C(Right(D2X(xdetailnum),4,'0')) || , xdetail If confirm = 'Y' then , sim = '' Else , sim = ' (simulated)' /* set up work area */ worklen = 32000 dwork = '00007D00'x || Copies('00'x,worklen-4) /* Initialize work variables */ csiresum = 'Y' recalls = 0 /* count how many recalls */ dscount = 0 do while csiresum = 'Y' /* call catalog servicer interface */ address LINKPGM "IGGCSI00 MODRSNRC CSIFIELD DWORK" csirc = rc if csirc >= 8 then Do Say 'Catalog search interface error 'rc Say 'Diagnostic info 'C2X(modrsnrc) Exit rc End csiresum = substr(csifield,150,1) /* get resume flag */ csiusdln = C2D(Substr(dwork,9,4)) /* get work area used */ pos1=15 /* start position */ /* Process data returned in work area */ do while pos1 < csiusdln /* Repeat until all data is processed */ /* Check csictype, if catalog, get its name from csicname */ if Substr(dwork,pos1+1,1) = '0' then , pos1 = pos1 + 50 if pos1 >= csiusdln then Iterate /* Assign entry name */ csiename = Strip(Substr(dwork,pos1+2,44)); /* Convert csietype to full DS type in words for output */ pos1 = pos1 + 46; flentot = C2D(Substr(dwork,pos1,2)); posf = pos1 + 4; flen = C2D(Substr(dwork,posf,2)); posf = posf + 2; /* Have field lengths, get data from fields */ if old_csiename = csiename then iterate old_csiename = csiename dataset = csiename field = Strip(Substr(dwork,posf,flen)) posf = posf + flen; /* if dataset migrated then recall it */ If field = 'MIGRAT' then Do If confirm = 'Y' then , Address TSO , "HRECALL '"dataset"'" Say 'Recall issued for 'dataset sim recalls = recalls+1 End dscount = dscount + 1; /* Get position of next entry */ pos1 = pos1 + C2D(Substr(dwork,pos1,2)); end; /* do while pos1 < csiusdln */ end; /* do while csiresum = 'Y' */ if dscount = 0 then Do Say 'No datasets found' Exit 4 End Else Say dscount' datasets found ' Say recalls' recalls issued' Exit 0