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

To Omit records based n SORT condition


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Chidane

New User


Joined: 25 Nov 2021
Posts: 19
Location: India

PostPosted: Tue Jul 16, 2024 2:29 pm
Reply with quote

Hi Team,

I have a flat file of 13 byte with following data

123ABC 234ABC
234DEF 123DEF
123XYZ 123ABC

If the value of position 1-3 byte and also position 8 - 10 is 123 or 234, THEN check if the value of pos 4 - 6 is same as value of pos 11 - 13. If same, then ignore that record else dont ignore.
The value in position 1-3 and position 8 - 10 will be aalways 123 or 234. The values in position 4 - 6 and 11 - 13 will be changing.

In the above example, only first 2 records should be ignored.
Could you please help with the SORT card for the above requirement

Thanks
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Jul 16, 2024 4:31 pm
Reply with quote

This is quite an easy task to OMIT certain records. What have you tried and with what results?

Garry.
Back to top
View user's profile Send private message
Chidane

New User


Joined: 25 Nov 2021
Posts: 19
Location: India

PostPosted: Tue Jul 16, 2024 7:43 pm
Reply with quote

Hi Garry,

I was able to write only OMIT condition.

OMIT COND = (1,3,CH,EQ,C'123',OR,1,3,CH,EQ,C'234' OR
8,3,CH,EQ,C'123',OR,8,3,CH,EQ,C'234' )

I am confused about the second part of checkign if the value of post 4 - 6 is same as value in pos 11 - 13

Can you please help me here.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Jul 16, 2024 7:47 pm
Reply with quote

When showing your code, please use the code tags and paste the screenshot. You're amost there icon_smile.gif You need to add an AND to match the positions in 4-6 & 11-13 .

Code:
  OMIT COND=((1,3,CH,EQ,C'123',OR,1,3,CH,EQ,C'234',OR,   
              8,3,CH,EQ,C'123',OR,8,3,CH,EQ,C'234'),AND,
              4,3,CH,EQ,11,3,CH)                         


Garry.
Back to top
View user's profile Send private message
Chidane

New User


Joined: 25 Nov 2021
Posts: 19
Location: India

PostPosted: Tue Jul 16, 2024 7:54 pm
Reply with quote

Thanks very much Garry.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Tue Jul 16, 2024 8:48 pm
Reply with quote

Code:
  OMIT COND=((1,3,CH,EQ,L(C'123',C'234'),
           OR,8,3,CH,EQ,L(C'123',C'234')),
          AND,4,3,CH,EQ,11,3,CH)                         
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1335
Location: Bamberg, Germany

PostPosted: Tue Jul 16, 2024 8:52 pm
Reply with quote

That SYNCSORT Lists do not work in DFSORT, use SS instead.
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 JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
Search our Forums:

Back to Top