IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the dropped records from sort step?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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

Moderator Emeritus


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

PostPosted: Tue Nov 10, 2009 10:01 pm
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 Developer


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

PostPosted: Wed Nov 11, 2009 12:35 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top