I bet if you PAD 80 to insure data follows the colon AND add a strip to
your specs stage, happiness will reign.

/*  */
signal on novalue
'PIPE (end \ name TTCUST.EXEC:12)',
   '|< ttcust data a ',
   "| pad 80 ",
   '| sy: find Customer ',
   '| spec fs : f 2 strip 1 /;/ n',
   '| fin: faninany',
   '| cons            ',
   '\ sy:',
   '| ph: find SysProg ',
   '| spec fs : f 2 strip  n /;/ n ',
   '| fin:',
   '\ ph:',
   '| em: find Phone ',
   '| spec fs : f 2 strip  n /;/ n',
   '| fin:',
   '\ em:',
   '| find email ',
   '| spec fs : f 2 strip n',
   '| fin:'
 
return 0
____________________
Jim Hughes
603-271-5586
"It is fun to do the impossible."
-----Original Message-----
From: CMSTSO Pipelines Discussion List
[mailto:[email protected]] On Behalf Of Mark Pace
Sent: Friday, August 20, 2010 3:39 PM
To: [email protected]
Subject: [CMS-PIPELINES] Null/blank value

I have a file that contains my customer information formated as such
FORM:  Customer
Customer_Name:  Some Customer1
SysProg:  Jane Doe
Phone:  xxx.xxx.xxxx
email:  [email protected]
$UpdatedBy:  CN=Mark Pace/O=Mainline

"
FORM:  Customer
Customer_Name:  Some Customer2
SysProg:  John Doe
Phone:
email:  [email protected]
$UpdatedBy:  CN=Mark Pace/O=Mainline

I want to put it in a file as such
Some Customer1*;*Jane Doe*;*xxx.xxx.xxxx*;*[email protected]
So basically a CVS file using an *;* as the delimiter.

I have this pipe
'PIPE (end \ name TTCUST.EXEC:12)',
   '|< ttcust data a ',
   '| sy: find Customer ',
   '| spec 17-* 1 /;/ n',
   '| fin: faninany',
   '| > ttcust data2 a',
   '\ sy:',
   '| ph: find SysProg ',
   '| spec 11-* n /;/ n ',
   '| fin:',
   '\ ph:',
   '| em: find Phone ',
   '| spec 9-* n /;/ n',
   '| fin:',
   '\ em:',
   '| find email ',
   '| spec 9-* n',
   '| fin:'

And it mostly works.  If a field is missing I would expect a record with
only a ; delimiter, but I am getting nothing, the field is just missing.
I
realize in the test exec that each filed comes out as a seperate line
and I
only have to do a JOIN after the faninany to create the one record.
 My question is why I don't get a record if say the phone number is
blank?


--
Mark D Pace
Senior Systems Engineer
Mainline Information Systems

Reply via email to