Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-24 Thread Rob van der Heij
On 24 July 2014 01:30, Michael Harding mhard...@us.ibm.com wrote:

 I think you're expecting the results to flow out of the bottom of the
 pipe.  If you moved the  stage after the faninany (dropping the : a2
 connection) you'd probably have what you want.  That after all is where
 you're feeding the records selected by the locates.


That's where we find a cascade of locate stages to become tedious with more
than a few criteria (a few being a personal threshold). For simple lookup
cases like this, when I'm still bending my pipes it can be elegant to use
'not lookup' like this:

 ..
| x: not lookup 29.4 1.4\ literal 0609 1090 ... | split | x:
| ..

The matching records now show at the end of this segment. This way you can
insert or remove the segment without further changes to the pipeline. A
similar piece of scaffolding is to do some destructive display in the
pipeline (my pipes tend to be too complicated for PIPEDEMO - sorry Mike)

| z: fanout | fmtdump | cons \ z:

Sir Rob the Plumber
http://rvdheij.wordpress.com/


Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-24 Thread Jonathan Scott
Ref:  Your note of Thu, 24 Jul 2014 14:09:35 +

I made my ANYOF / ALLOF stages available some time ago for
download:

  http://vm.marist.edu/%7Epipeline/#anyof

As it says on that page:

These simply provide a compact notation for logical OR and
logical AND between selection stages without needing extra
pipeline segments and labels. Of course, under the covers,
that's exactly what they generate.

They can be combined with the existing NOT stage to form
general logical expressions. I personally find them particularly
convenient when combined with the IF stage, in that
combinations of selection conditions can be written using IF
ANYOF or IF ALLOF.

Jonathan Scott
IBM Hursley, UK


Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-24 Thread Miguel Soltero Diaz
My apologies guys for the late response.
Got tied up with something else...

I don't want to miss any name but I am extremely grateful to all of you.
Was able to get what I want following Michael suggestion.
Got intrigued by Rob's suggestion and will comeback to it later on in same 
project, albeit for some other purposes.
Lookup to me, it looks like a powerful stage.

more to come...

Thank you again...  :)

Miguel


Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-23 Thread Miguel Soltero Diaz
I added the Stage character before the last b:...
didn't make a difference...


Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-23 Thread Ronald van der Laan
Miguel,

What you do right now, is give the 0690 records to the primary input of
logbyftp and give the 1090 records to its secondary stream.
Then you discard its primary output, but write its secondary output to the
file.
Only, pipes can't find a logbyftp pipestage.

Please look at the all stage to do an or like locate, or better, and that
what you actually want, use the pick stage.

Op woensdag 23 juli 2014 heeft Miguel Soltero Diaz mig...@live.com het
volgende geschreven:

 Hi guys,
 I am a new plumber, and hitting some bumps...

 I am trying to select only records with 0690 or 1090 from a file and move
 the records to a second file.

 So I literally copied Locate example 5 from the Reference...
 I just appended the last line... and got...

 FPLSCB027E Entry point LOGBYFTP not found
 FPLSCA003I ... Issued from stage 3 of pipeline 1
 FPLSCA001I ... Running logbyftp

 here is the pipe...
 'pipe (endchar ?)',
   ' AUDIT EXTRCT1',
   '| a:locate (29-32) /0690/ ',
   '| b:logbyftp',
   '?',
   'a:',
   '| locate (29-32) /1090/ ',
   'b:',
   '|  AUDIT SUBSET '

 I am not quite understanding how to link both Locates
 What did I do wrong?


 Thanks

 Miguel



--
Ronald van der Laan


Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-23 Thread Rob van der Heij
In that case you'd be better off using 'lookup' like this:

 input file
| l: lookup 29.4 1.4 detail
| cons
\ literal 0690 1090 ... | split | l:

Rob


On 23 July 2014 23:10, Miguel Soltero Diaz mig...@live.com wrote:

 Thanks Ronald...
 I tried the All Stage, and worked excellent!!!

 I am trying to your second suggestion, because I need to include several
 other codes besides 0690/1090...

 Thanks for your help...

 Miguel



Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-23 Thread Mike Walter
Miguel,

Sir Rob The Plumber is one of z/VM's Master Plumbers, and a generous VM 
Community contributor.

With some explanatory comments (stage names and arguments UPPERCASE to 
distinguish them from variable text, default arguments included) , Rob's sample 
again:
‘PIPE (ENDCHAR ?)’ ,
‘|  input file fm’ ,   /* Primary input to LOOKUP are the 
“DETAIL” records */
‘| L: LOOKUP NOPAD 29.4 1.4 DETAIL’ , /* Look in column 1 for 4 chars 
for record with any of the strings passed from the LITERAL stage */
 ,  /* Keep only the DETAIL records with 
matching MASTER records (from below) in cols 1 for 4 */
‘| CONSOLE’ ,   /* Display the results on the console, 
you can change this to write to a file, etc. */
‘? LITERAL 0690 1090 ’ ,/* Add more 4-char codes in place of 
the ‘’ */
  ‘| SPLIT AT BLANK’ ,  /* Split the literal at into separate 
records
 ‘ | L:’/* Shunt that “MASTER” records to the 
label “L:” as the secondary input to LOOKUP */

Mike Walter
Aon Corporation
The opinions expressed herein are mine alone, not necessarily those of my 
employer.

-Original Message-
From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On 
Behalf Of Miguel Soltero Diaz
Sent: Wednesday, July 23, 2014 17:12
To: CMS-PIPELINES@VM.MARIST.EDU
Subject: Re: Trying to use the Locate

Thanks Rob...
Need to read first about lookup... not following ... yet :)

You guys are that efficient always? LOL

Miguel



Re: [CMS-PIPELINES] Trying to use the Locate

2014-07-23 Thread Michael Harding
I think you're expecting the results to flow out of the bottom of the
pipe.  If you moved the  stage after the faninany (dropping the : a2
connection) you'd probably have what you want.  That after all is where
you're feeding the records selected by the locates.

--
Mike Harding
z/VM System Support
/sp


CMSTSO Pipelines Discussion List CMS-PIPELINES@vm.marist.edu wrote on
07/23/2014 03:03:20 PM:

 From: Miguel Soltero Diaz mig...@live.com
 To: CMS-PIPELINES@vm.marist.edu
 Date: 07/23/2014 03:04 PM
 Subject: Re: Trying to use the Locate
 Sent by: CMSTSO Pipelines Discussion List CMS-PIPELINES@vm.marist.edu

 Hi Ronald,
 After further review with All Stage, I couldn't find a way to
 specify the location of the codes 0690/1090. So it gave me all
 records where the codes were found.

 So, I tried again with LOCATE as suggested.
 I must be missing something important, because I got all input
 records, ignoring the Locate stage

 here is my code
 'pipe (endchar ?)',
   ' AUDIT EXTRCT1',
   '| a1: locate (29-32) /0690/ ',
   '| b: faninany',
   '? a1:',
   '| a2: locate (29-32) /1090/ ',
   '| b: ',
   '? a2:',
   '|   AUDIT SUBSET a '

 what am I missing?

 Thanks