Hey Guys,


I'm not a skilled plumber. I'm much more familiar with CMS REXX. Many years ago 
I created a FINDIT EXEC REXX program in CMS that programmers use often to 
search CMS members for a specified string. I later migrated to use Pipelines 
I/O rather than EXECIO as pipelines is much more storage friendly. Here is a 
sample of the locate and specs used for output:



'<' fn ft fm,             /* Input file                  */

'| casei locate ~'strg'~',      /* Locate the string           */

'| specs ~'inrec'~ 1 1-130 25',  /* File info                   */

'| >> FINDIT OUTPUT A '    /* Put results in file         */



Sample output :



  Searched '* JCL C' for 'PGM=FTP'  Ignore Case



                        
00000000011111111112222222222333333333344444444445555555555666666666677777777778

   Files Found          
12345678901234567890123456789012345678901234567890123456789012345678901234567890

---------------------  
--------------------------------------------------------------------------------

CIGL1000 JCL      C1    // EXEC PGM=FTP,SIZE=(FTP,256K),PARM='IP=FPRD'

CIGL1005 JCL      C1    // EXEC PGM=FTP,SIZE=(FTP,256K),PARM='IP=GLPROD'

CIGL1021 JCL      C1    // EXEC PGM=FTP,SIZE=(FTP,256K),PARM='IP=IFHHICK'



It has been requested that I also output the line/record number that the string 
was found on (as some members locate strings in multiple locations). I have 
been looking through pipelines reference but have not figured out the best way 
to do this without a lot of additional preprocessing of input data. Any 
suggestions would be appreciated.



Tim Joyce

Alex Lee Inc.

Systems Administrator

Reply via email to