Join this group to access featured content and participate in discussions related to all Syncsort Mainframe Products.

98 Members
Join Us!

Parse and dedupe

I receive a delimited file from a client that I parse the first field which is an email address and then I dedupe the file.  My problem is that some of the data they are sending me is quote surrounded.  I am not sure how I can parse the file on two separate ENDBEFR. I am thinking I have to use a combination of ENDBEFR and ENDAT but have not figured out the correct logic.

Data example

john.doe@gmail.com|John Doe|123 Maple St....

"john.doe@gmail.com"|"John Doe"|"123 Maple St"....

Here is my current SYSIN I am using.

INREC PARSE=(%1=(ENDBEFR=C'|',FIXLEN=100)),
         BUILD=(01:%1)
SORT FIELDS=(1,100,CH,A)
DUPKEYS FIRSTDUP,NODUPS,XDUP

You need to be a member of Syncsort Community to add comments!

Join Syncsort Community

Email me when people reply –

Replies

  • I think I figured it out.  Was to caught up i thinking I had to use ENDBEFR and ENDAT

    INREC PARSE=(%1=(ENDBEFR=C'|',FIXLEN=100)),
          BUILD=(01:%1,SQZ=(SHIFT=LEFT,PREBLANK=C'"'))
    SORT FIELDS=(1,100,CH,A)
      DUPKEYS FIRSTDUP,NODUPS,XDUP

This reply was deleted.

To access Syncsort Knowledge Base, visit:

My Support