Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get the dropped records from sort step?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vineetjoshi01

New User


Joined: 06 Nov 2009
Posts: 14
Location: Singapore

PostPosted: Tue Nov 10, 2009 6:45 pm    Post subject: How to get the dropped records from sort step?
Reply with quote

I'm trying to filter out some records from a PS based on some conditions. I have written a sort card for that but I also want to have the filtered out records in a separate file. I am not able to get all the filtered out triggers in my second file.
Code:

  SORT FIELDS=(39,10,CH,A,61,02,CH,A,71,10,CH,A,81,6,CH,A)
  OUTFIL FNAMES=OUT1,INCLUDE=((39,4,CH,EQ,C'PACU'),AND,
                      (27,2,CH,EQ,C'EQ'),AND,
                      (61,2,CH,EQ,C'OG',OR,61,2,CH,EQ,C'IG',OR,
                       61,2,CH,EQ,C'SL',OR,61,2,CH,EQ,C'TL',OR,
                       61,2,CH,EQ,C'SD',OR,61,2,CH,EQ,C'TD',OR,
                       61,2,CH,EQ,C'OS',OR,61,2,CH,EQ,C'BS'))
  OUTFIL SAVE,FNAMES=OUT2
  SUM FIELDS=NONE


I'm trying to get all the filtered out records in OUT2.

Thanks,
Vineet
Back to top
View user's profile Send private message

Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue Nov 10, 2009 7:11 pm    Post subject:
Reply with quote

Just off the top of my head, I would assume that the SUM FIELDS=NONE will effectively remove duplicate records from BOTH output files, meaning that yes, you may not see ALL filtered out records in OUT2 - those with duplicate sort fields will be eliminated due to the SUM FIELDS=NONE.
Back to top
View user's profile Send private message
vineetjoshi01

New User


Joined: 06 Nov 2009
Posts: 14
Location: Singapore

PostPosted: Tue Nov 10, 2009 7:14 pm    Post subject:
Reply with quote

I have seen the number of records in both the files and they are mismatching.
I need to have the sum of records for OUT1 and OUT2 equal to my input.
But I am getting lesser number of records in OUT2.

I just need the compliment of OUT1 in OUT2. Kindly help.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 10, 2009 10:01 pm    Post subject:
Reply with quote

Hello,

If there are duplicates in the data and you tell the process to remove the duplicates, the count of records in the output files cannot be the total of records in the input file. . .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Nov 11, 2009 12:35 am    Post subject:
Reply with quote

Vineet,

DFSORT processes your control statements in the following order:

SORT
SUM
OUTFIL

So the summed records will indeed be removed before OUTFIL sees them.

It's not clear what you're really trying to do. Please show an example of the records in your input file (relevant fields only) and what you expect for the output files. Explain the "rules" for getting from input to output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of each relevant field.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us