Works perfectly! Thanks!
-----Original Message-----
From: CMSTSO Pipelines Discussion List <[email protected]> On Behalf
Of Kris Buelens
Sent: Monday, February 4, 2019 10:34 AM
To: [email protected]
Subject: Re: How to output line number of locate
External Email
What about this
'<' fn ft fm, /* Input file */
'|SPECS Recno 1 1-* 11', /* add recordnr *.
'| locate AnyCase 11-* ~'strg'~', /* Locate the string */
'| specs ~'inrec'~ 1 1-130 25', /* File info */
'| >> FINDIT OUTPUT A ' /* Put results in file */
Kris Buelens,
--- VM/VSE consultant, Belgium ---
-----------------------------------------------------------------------
Op ma 4 feb. 2019 om 16:19 schreef Tim Joyce <[email protected]>:
> 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
>
>
>
>
> 0000000001111111111222222222233333333334444444444555555555566666666667
> 7777777778
>
> Files Found
> 1234567890123456789012345678901234567890123456789012345678901234567890
> 1234567890
>
> ---------------------
> ----------------------------------------------------------------------
> ----------
>
> 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
>