Page 2 of 2

Re: Outrec When match with spaces.

PostPosted: Wed Aug 13, 2014 10:19 pm
by Squashman
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
//SYSIN    DD *                                                                 
  SORT FIELDS=(091,15,CH,A,171,20,CH,A)                                         
  SUM FIELDS=NONE                                                               
  OUTREC IFTHEN=(WHEN=(171,11,CH,EQ,C'WEST REGION'),OVERLAY=(740:C'1')),       
                 IFTHEN=(WHEN=NONE,OVERLAY=(740:C'2'))                         
//*                                                                             
//*********************************************                                 
//* END OF SORT1                                                               
//*********************************************                                 

Re: Outrec When match with spaces.

PostPosted: Wed Aug 13, 2014 10:26 pm
by BillyBoyo
Yes, your comma is in column 72. A non-blank is column 72 is a continuation, so your comma was ignored.

  SORT FIELDS=(091,15,CH,A,171,20,CH,A)                                         
  SUM FIELDS=NONE                                                               
  OUTREC IFTHEN=(WHEN=(171,11,CH,EQ,C'WEST REGION'),
                      OVERLAY=(740:C'1')),       
         IFTHEN=(WHEN=NONE,
                      OVERLAY=(740:C'2')) 


I always break the code up, makes it easier (for me) to read.

Re: Outrec When match with spaces.

PostPosted: Wed Aug 13, 2014 10:36 pm
by Squashman
I am usually pretty anal about code indentation. Just wasn't aware of the continuation column. Still new to SyncSort.

I prefer to keep things that are bracketed together on the same line if I can.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
//SYSIN    DD *                                                                 
 SORT FIELDS=(091,15,CH,A,171,20,CH,A)                                         
 SUM FIELDS=NONE                                                               
 OUTREC IFTHEN=(WHEN=(171,11,CH,EQ,C'WEST REGION'),OVERLAY=(740:C'1')),         
        IFTHEN=(WHEN=NONE,OVERLAY=(740:C'2'))                           
//                                                                             
//*********************************************                                 
//* END OF SORT1                                                               
//*********************************************