If your input file is strictly in the format you described with only the
occasional empty variable data field, then this might work:

'PIPE < TTCUST DATA A',
   '| inside /FORM:/ /$UpdatedBy:/',
   '| not chop after /:/',
   '| strip',
   '| join 3 /*;*/',
   '| > TTCUST DATA2 A'

TTCUST DATA2:
Some Customer1*;*Jane Doe*;*xxx.xxx.xxxx*;*[email protected]
Some Customer2*;*John Doe*;**;*[email protected]


Cheers,

Mark Llewellyn


-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:[email protected]]
On Behalf Of Frank M. Ramaekers
Sent: Friday, August 20, 2010 1:00 PM
To: [email protected]
Subject: Re: [CMS-PIPELINES] Null/blank value

Running this, I get:

Some Customer1                                                  ;

Jane Doe                                                              ;

xxx.xxx.xxxx
;
[email protected]

Some Customer2                                                  ;

John Doe                                                              ;


;
[email protected]




Are you getting this as well?


Frank M. Ramaekers Jr.



-----Original Message-----
From: CMSTSO Pipelines Discussion List
[mailto:[email protected]] On Behalf Of Mark Pace
Sent: Friday, August 20, 2010 2: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

_____________________________________________________

This message contains information which is privileged and confidential and
is solely for the use of the

intended recipient. If you are not the intended recipient, be aware that any
review, disclosure,

copying, distribution, or use of the contents of this message is strictly
prohibited. If you have

received this in error, please destroy it immediately and notify us at
[email protected].

Reply via email to