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

OMIT COND to remove non-numeric items while sorting


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

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Mon Apr 19, 2004 7:40 pm
Reply with quote

HI all,

By using omit cond can we remove non-numeric items while sorting.

Thanks
Anu
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 150
Location: Tokyo, Japan

PostPosted: Wed Apr 21, 2004 5:55 am
Reply with quote

Though it is tedious process...I can use INCLUDE condition as below to select Numeric items and omits nonnumeric items -

Code:
 INCLUDE COND=(1,1,CH,GE,C'0',
             AND,1,1,CH,LE,C'9',
             AND,2,1,CH,GE,C'0',
             AND,2,1,CH,LE,C'9',
             AND,3,1,CH,GE,C'0',
             AND,3,1,CH,LE,C'9',
             AND,4,1,CH,GE,C'0',
             AND,4,1,CH,LE,C'9',
             AND,5,1,CH,GE,C'0',
             AND,5,1,CH,LE,C'9',
             AND,6,1,CH,GE,C'0',
             AND,6,1,CH,LE,C'9')
This rather involved INCLUDE statement keeps only

Regards,
Sandip.
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Wed Apr 21, 2004 12:28 pm
Reply with quote

hello,

here is a omit statement :
SORT FIELDS=COPY
OMIT COND=(60,4,CH,LE,C'9999')


BUT you should check in the ICETOOL manual to see into the matter.
The link to icetool manual was passed in one of the posts in this thread (by me). So look for it If you don't have this manual.
AND... there goes the link :
www.storage.ibm.com/software/sort/mvs/uq90053/pdf/sortpaug.pdf
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Fri Apr 23, 2004 10:05 pm
Reply with quote

hi bluebird,

i tried with your omit condition.but it didn't work for me.Actually the variable is packed decimal of 17 character length.somehow iam getting spaces in that field and also some values like 0402634517543.tif. so while sorting i thought of removing these kind of records.i tried many ways. sandip suggested some thing using include cond.but that one is very tedious one,which i cant use.

But there is another alternative for me.I skipped those records while reading that file in the program.So my problem is solved.


Just curious.Is there any other alternative thru omit condition to remove non numeric items.For removal of blank line i can give.but for .tif value what can i give.

Thanks
Anu
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: Thu Apr 27, 2006 2:42 am
Reply with quote

With z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006), you can use DFSORT's new NUM function to include or omit records based on whether they contain character, packed decimal or zoned decimal numerics or non-numerics. For your example of a 17-byte PD field, you can use this INCLUDE statement (p is the starting position of the PD field):


Code:

   INCLUDE COND=(p,17,PD,EQ,NUM)


or this OMIT statement:

Code:

   OMIT COND=(p,17,PD,NE,NUM)



For complete details of all of the new DFSORT/ICETOOL functions available with the April, 2006 PTFs, see:

Use [URL] BBCode for External Links
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Remove leading zeroes SYNCSORT 4
Search our Forums:

Back to Top