Include

I'm using DFSORT.

In this snippit, I'm looking at the include statement. Can you give some explanation on it?
SORT FIELDS=(53,5,CH,A)(50,2,CH,A)                                               
  OUTFIL FNAMES=USA,                                                    
   TRAILER1=(/,20:'USA Areas 2009 Quarterly Budget Balance',/,          
   /,20:'Total Number of Areas:    ',8930,/,                            
   /,10:'Quarter 1',30:'Quarter 2',50:'Quarter 3',70:'Quarter 4',       
   /,1:TOT=(53,5,PD,M12),TOT=(58,5,PD,M12),                             
       TOT=(63,5,PD,M12),TOT=(68,5,PD,M12),/,                           
   /,10:'Minimum',30:'Minimum',50:'Minimum',70:'Minimum',               
   /,9:MIN=(53,5,PD,M12),29:MIN=(58,5,PD,M12),                          
    49:MIN=(63,5,PD,M12),69:MIN=(68,5,PD,M12),/,                        
   /,10:'Maximum',30:'Maximum',50:'Maximum',70:'Maximum',               
   /,9:MAX=(53,5,PD,M12),29:MAX=(58,5,PD,M12),                          
    49:MAX=(63,5,PD,M12),69:MAX=(68,5,PD,M12),/,                        
   /,10:'Average',30:'Average',50:'Average',70:'Average',               
   /,9:AVG=(53,5,PD,M12),29:AVG=(58,5,PD,M12),                          
    49:AVG=(63,5,PD,M12),69:AVG=(68,5,PD,M12),/)                        
  OUTFIL FNAMES=VI1,                                                    
   INCLUDE COND=(50,2,CH,EQ,C'AK',AND,53,1,CH,EQ,C'2'),                     
   TRAILER1=(/,20:'Virgina Cities 2009 Quarterly Budget Balance',/,

Open in new window

JCW2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
This statement selects input records based on conditions (COND):

Column 50 and 51 ("2" is the length) contain in character format ("CH") the characters 'AK'
AND
Column 53 (length is "1") contains in character format ("CH") the character '2'.

One could as well have written:

INCLUDE COND=(50,3,CH,EQ,C'AK2'),

Basically, it's an input record filter.

wmp


woolmilkporcCommented:
SORRY,

my second statement is of course WRONG!

Seems I forgot how to count!
We're talking about columns 50, 51 ,and 53 here, so please forget what I wrote!.

By the way, the opposite of INCLUDE would be OMIT, with the same syntax, to select records NOT to appear in the output.

Sorry again!

wmp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JCW2Author Commented:
Thank you for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Mainframe Languages

From novice to tech pro — start learning today.