Ah, apologies, you're right, failed to provide that piece:
original record is desired at the end.

--Shawn S.



-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On 
Behalf Of John P. Hartmann
Sent: Wednesday, October 31, 2018 10:07
To: CMS-PIPELINES@VM.MARIST.EDU
Subject: Re: [CMS-PIPELINES] Wildcard searching

Use CHOP 30|COPY|SPLIT|WILDCARD and JUXTAPOSE to prefix the remainder of the 
record by each word.  It should be pretty easy to adapt WILDCARD to serach for 
the keyword, as you suggest.  You'll have to do a bit of contortion to get the 
topology just right.

I'm sure Rob can elaborate and also get the juxtapose timing just right, 
perhaps to reverse the record and then CHOP -30.

You need to make up your mind as to whether you want the original record or 
just the bytes beyond column 30, or something else indeed.



-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On 
Behalf Of Rob van der Heij
Sent: Wednesday, October 31, 2018 09:33
To: CMS-PIPELINES@VM.MARIST.EDU
Subject: Re: [CMS-PIPELINES] Wildcard searching

Shawn,

The approach I would take is to take that part of the records where you want to 
search, and split those parts into words. That puts the words at the start of 
the record. I suppose you could get multiple hits from the original record, so 
PREDSELECT would be your friend to do the vetting of the input records.

But if you're looking for multiple keywords, FIND may get tedious since you'd 
need a cascade to check them. I have been known to load a LOOKUP table with all 
the possible forms of the keyword, but that's only realistic when you're 
dealing with abbreviations.

Sir Rob the Plumber



On 10/31/2018 03:17 PM, Stanislawski, Shawn (National VM Capability) wrote:
> Want to filter a stream of records, letting only certain ones through based 
> on a keyword in each record.
> What we know:
> -the keyword could be anywhere in the first 30 characters -the keyword
> is space delineated (no leading space if keyword is first word) -the
> first and last part of that keyword -the count of unknown characters
> separating  the first and last parts of the keyword
>
> For an example:
> Within the first 30 characters of the record is the keyword : 'HCP??????E ' , 
> with exactly 6 unknown characters (no blanks) between 'HCP' and 'E '.
>
> I know XEDIT's LOCATE can perform a similar search via the arbitrary 
> character option 'SET ARBCHAR ON ?'.
> I know PIPE's FIND can do this with blanks, but only if the keyword
> begins in column 1. (Or a static column (not a range) using ZONE.)
>
> Aside from creating a sipping stage/custom filter, is there any provision for 
> performing natively in PIPE such an action as this?
>
> --Shawn S.


DXC Technology Company -- This message is transmitted to you by or on behalf of 
DXC Technology Company or one of its affiliates.  It is intended exclusively 
for the addressee.  The substance of this message, along with any attachments, 
may contain proprietary, confidential or privileged information or information 
that is otherwise legally exempt from disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended recipient 
of this message, you are not authorized to read, print, retain, copy or 
disseminate any part of this message. If you have received this message in 
error, please destroy and delete all copies and notify the sender by return 
e-mail. Regardless of content, this e-mail shall not operate to bind DXC 
Technology Company or any of its affiliates to any order or other contract 
unless pursuant to explicit written agreement or government initiative 
expressly permitting the use of e-mail for such purpose. --.

Reply via email to