[CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Tim Joyce
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 sto

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Rob van der Heij
On Mon, 4 Feb 2019 at 16:19, Tim Joyce wrote: > > 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

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Kris Buelens
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 res

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Tim Joyce
Works perfectly! Thanks! -Original Message- From: CMSTSO Pipelines Discussion List On Behalf Of Kris Buelens Sent: Monday, February 4, 2019 10:34 AM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: How to output line number of locate External Email What about this '<' fn ft fm,

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Joe Parker
It's been ages since I've written any PIPEs code, but I believe this can be accomplished by Spec'ing a RECNUM (or is it RECNO?) somewhere in the records, perhaps at the front, before doing the locate stage, which should be changed to ignore the record number (like "locate w2-* "string), and the

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Kris Buelens
One more word: the fact that you use ' >> FINDIT OUTPUT A' means that for each file you searched, the ouput file is opened too. So, if searching lots of files this is considerable overhead. One v-can solve this, but that requires a much more elaborate pipe. You could also have a look at my LOOK

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Tim Joyce
Thanks Kris, I will look forward to trying this. -Original Message- From: CMSTSO Pipelines Discussion List On Behalf Of Kris Buelens Sent: Monday, February 4, 2019 11:43 AM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: How to output line number of locate External Email One more word: t

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Rob van der Heij
On Mon, 4 Feb 2019 at 17:43, Kris Buelens wrote: > that requires a much more elaborate pipe. > For varying degrees of "much" :-) Mine is 11 stages, and fits on half a command line... https://rvdheij.wordpress.com/2019/02/04/searching-some-files/ Sir Rob the Plumber

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Kris Buelens
Indeed, not that long, just a bit frightning for those that don't master multistream pipelines (they may have a look at http://www.vm.ibm.com/download/packages/descript.cgi?TCVM2 ) I just had a peek at what I created; initially LOOK was pure XEDIT based, now it can use PIPE or XEDIT. And, what I

Re: [CMS-PIPELINES] How to output line number of locate

2019-02-04 Thread Rob van der Heij
On Mon, 4 Feb 2019 at 22:44, Kris Buelens wrote: > And, what I detected: LOOK was much used by my former long-time customer, > where SFS was used a lot too. And, there were procedures that looked at > the last-reference date of the files. So we did not want that executing a > LOOK would be cou