Need help with INCLUDE, OMIT for SUMmed records



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Need help with INCLUDE, OMIT for SUMmed records

Postby RockinRiles » Thu Nov 01, 2012 9:31 pm

I've looked thru the first 5 pages but, have not found my questions.

Here's my situation:
Input records will have multiple records per SSN.
Inrecs have a flag field for out-of-state earnings.
Summing on Salary into one Outrec per SSN.

I want to do:
1. Not include Inrecs with out-of-state flag = 1 in summing
2. Only write Outrecs for Summed earnings > 250000

My confusion is this: Do Includes and Omits relate to only Inrecs?

Can I perform edits on individual inrecs as well as summed outrecs?
If yes, how so?

I hope I've explained this well enough for ya'll to understand.

Thanks,

Rockin Riles
User avatar
RockinRiles
 
Posts: 12
Joined: Thu Aug 16, 2012 12:35 am
Has thanked: 8 times
Been thanked: 0 time

Re: Need help with INCLUDE, OMIT for SUMmed records

 

Re: Need help with INCLUDE, OMIT for SUMmed records

Postby Pandora-Box » Thu Nov 01, 2012 9:36 pm

I would suggest you to post the sample input and the output you are expecting

As that would help everyone to understand the problem easliy than trying to narrate theoritically ( I am sorry I hardly got your problem )

Please clarify
User avatar
Pandora-Box
 
Posts: 65
Joined: Fri Feb 10, 2012 8:30 pm
Location: Mars
Has thanked: 3 times
Been thanked: 6 times

Re: Need help with INCLUDE, OMIT for SUMmed records

Postby dick scherrer » Thu Nov 01, 2012 9:39 pm

Yup, totally agree.

Also, please post the Syncsort release you are running.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Need help with INCLUDE, OMIT for SUMmed records

Postby RockinRiles » Thu Nov 01, 2012 10:33 pm

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:
123456789250001

Sort 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
User avatar
RockinRiles
 
Posts: 12
Joined: Thu Aug 16, 2012 12:35 am
Has thanked: 8 times
Been thanked: 0 time

Re: Need help with INCLUDE, OMIT for SUMmed records

Postby BillyBoyo » Fri Nov 02, 2012 1:52 am

I think you are looking at two different includes.

You can INCLUDE COND=( for the "out of state records" as you have.

Then, once the SUM is completed, you can have OUTFIL INCLUDE=( for the SUMmed amount GT 25000.

The first INCLUDE gets rid of records you don't want to process, the second, on OUTFIL, is used to select records you want on the output file.

These users thanked the author BillyBoyo for the post:
RockinRiles (Fri Nov 02, 2012 2:29 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Need help with INCLUDE, OMIT for SUMmed records

Postby RockinRiles » Fri Nov 02, 2012 2:33 am

Thanks BillyBoyo! :D

I'll post my solution soon.

Rockin Riles
User avatar
RockinRiles
 
Posts: 12
Joined: Thu Aug 16, 2012 12:35 am
Has thanked: 8 times
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post