>>> RFC 822 allows any displayable USASCII character if it's surrounded by 
quotation  marks.  But phsiii points out that so many sites disallow it 
that 
 it's hardly a concern.

Paul,

Well even though it is NOT a concern, I fixed the job not to depend on the 
delimiters. Just move the name to the end and have the domain up front. By 
doing so we don't have to worry having delimiters or parsing into domain 
data.  So here are the updated control cards

//SYSIN    DD * 
  INREC IFTHEN=(WHEN=INIT, 
         PARSE=(%01=(ENDBEFR=C'@',FIXLEN=50),   $ Get Field Before @ 
                %02=(ENDBEFR=C'>',              $ Get Field Before < 
                     ENDBEFR=C',',              $ Get Field Before , 
                     ENDBEFR=C' ',FIXLEN=50)),  $ Get Field Before ' ' 
   OVERLAY=(081:%02,TRAN=LTOU,                  $ Put Domain AT 081 
            131:%01,TRAN=LTOU)),                $ Put Name  AT 131 
 
   IFTHEN=(WHEN=INIT, 
          PARSE=(%03=(ABSPOS=131,STARTAFT=C'<', $ Reparse The Name 
                     FIXLEN=50)), 
   OVERLAY=(181:%03)),                          $ Put Name AT 181 
 
  IFTHEN=(WHEN=INIT, 
   FINDREP=(STARTPOS=181,INOUT=(C'"',C''))),    $ REPLACE THE " 
 
  IFTHEN=(WHEN=(181,50,CH,GT,C' '), 
  BUILD=(001,80,                                $ Original Rec 
         181,50,                                $ Name 
         081,50)),                              $ Domain 
 
  IFTHEN=(WHEN=NONE, 
  BUILD=(001,80,                                $ Original Rec 
         131,50,                                $ NAME 
         081,50))                               $ DOMAIN 
 
  SORT FIELDS=(081,50,CH,A,                     $ Name 
               131,50,CH,A),EQUALS              $ Domain 
/* 

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <[email protected]> wrote on 
07/19/2017 09:40:11 AM:

> From: Paul Gilmartin <[email protected]>
> To: [email protected]
> Date: 07/19/2017 09:40 AM
> Subject: Re: Sort Question
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> On Wed, 19 Jul 2017 08:57:49 -0700, Sri h Kolusu wrote:
> 
> >>> #$%& is indeed delimiter, any character set, anything which cannot 
be 
> >found in real email address.
> > 
> RFC 822 allows any displayable USASCII character if it's surrounded 
> by quotation
> marks.  But phsiii points out that so many sites disallow it that 
> it's hardly a concern.
> 
> -- gil
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to