Understood. I'm home with my sick son so, I don't have any info on our Syncsort version info.
Please don't kill me for syntax errors.
Note: I'm not looking for the specific code (although welcome) as much as an explanation
if I can do what I want to do in one step.
Inrec record format:SSN 1,9
filler 10,1
Out-of-State 11,1
filler 12,1
Salary 13,6
Inrecs:123456789 1 125000 <--- Will NOT be included in INCLUDE for summing: Out-of-State flag = 1
123456789 0 150000 <--- Will be included in INCLUDE and Summing, Out-of-State flag = 0
123456789 0 100001 <--- Will be included in INCLUDE and Summing, Out-of-State flag = 0
::: Salary total = 250001. Write to Outrec as Summed Salary > 250000
987654321 0 200000 <--- Will be included in INCLUDE and Summing, Out-of-State flag = 0
987654321 1 100000 <--- Will NOT be included in INCLUDE and Summing, Out-of-State flag = 1
987654321 0 020000 <--- Will be included in INCLUDE and Summing, Out-of-State flag = 0
::: Salary total = 220000. Do NOT Write to Outrec as Summed Salary NOT > 250000
Desired Outrecs:123456789250001Sort code:SORT FIELDS=(1,9,PD,A)
SUM FIELDS=(13,6,PD)
OUTREC FIELDS=(1,9,PD,
13,6,PD)
INCLUDE (11,1,EQ,0) <--- Want this to INCLUDE Out-of-State flags = 0
INCLUDE (13,6,GT,250000)
<--- This is my challenge! I want this to "only" include SUMmed record if total > 250000. Hope this helps.
Thanks,
Rockin Riles