Actually, what you should do to run with the big dogs is to read
Melinda's papers.  http://vm.marist.edu/~pipeline/#MWV

Just keep in mind that they are all at least ten years old.  A few new
things have crept in, particularly in SPEC.

On 04/22/2015 09:43 PM, Gentry, Steve wrote:
" SPEC can do anything.  You only have to find out how :-)"
Which reinforces my belief, that once you master specs you can run with the big 
dogs
  . .  or, in "pipe" speak . .
. . once you master specs you can run with the big plumbers

I'm starting to get tired of carrying the tools.  8-)


-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:[email protected]] On 
Behalf Of John P. Hartmann
Sent: Wednesday, April 22, 2015 3:37 PM
To: [email protected]
Subject: Re: SPEC and PAD

On 04/22/2015 09:08 PM, Gentry, Steve wrote:
I've found that SPEC has a PAD option/function.

Correct.

 From what I've read it is used to pad a field with a leading character.

Not quite.  It is the character inserted between fields, and also the one used 
to pad out an output field that is larger than the actual input source.

I have a word, in a stream, that can be up to 8 characters long, however, if it 
isn't 8 characters, I'd like to append a dot/period to complete the 8 
characters.  I can use the PAD stage and in the grand scheme of things the time 
is insignificant.

You can do that with pad, but you might have to turn it off again:

... | spec pad . 1.3 7.5 | ...

Will get you lots more dots than you want.  Here the idiom is

... | spec // 7 pad . 1.3 7.5 | ...

This pads out with blanks to column 7.  Then you can get the pad you want and 
then you can turn it off again to write another field somewhere else.  Rather 
fiddly:

... | spec // 7 pad . 1.3 7.5 centre pad blank 4.3 10.5 centre| ...

However, I was wondering if the PAD function in the SPEC stage can do such a 
thing.

SPEC can do anything.  You only have to find out how :-)

Thanks,
Steve

Reply via email to