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

DFSORT OMIT for COMP-3


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

New User


Joined: 07 Jul 2008
Posts: 2
Location: Pune

PostPosted: Tue Jul 22, 2008 12:35 pm
Reply with quote

Hi,

Please let me know the syntax for omit a record depending on the comp-3 value using DFSORT/ICETOOL.

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

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Jul 22, 2008 12:45 pm
Reply with quote

HI,

It is very simple.
Just use the sort card

Code:

   OMIT COND=(24,3,PD,EQ,NUM)


Records will be omitted from the application if the first field (byte 24 to byte 26) is identified as packed decimal numeric.

regards
R KARTHIK
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: Tue Jul 22, 2008 9:36 pm
Reply with quote

Shivashankar,

Assuming you want to check a PD field for a particular value, the general format for the DFSORT control statements would be:

Code:

   OPTION COPY
   OMIT COND=(p,m,PD,op,value)


p is the starting position of the PD field. m is the length of the PD field. op is the comparison operator (EQ, NE, LT, LE, GT, GE) and value is a decimal number (n, +n, -n). So for example, if you wanted to OMIT records with a 2-byte PD value in positions 21-22 equal to +12, you would use:

Code:

    OPTION COPY
    OMIT COND=(21,2,PD,EQ,+12)


If you need more specific help, explain in more detail what you want to do.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
Shivashankar Biradar

New User


Joined: 07 Jul 2008
Posts: 2
Location: Pune

PostPosted: Wed Jul 23, 2008 4:08 pm
Reply with quote

Sorry, forgot to mention info about the field and file.

Actually that field is defined as PIC S9(03) COMP-3 and in the VB file. It is the first field in the 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 Jul 23, 2008 9:14 pm
Reply with quote

Since it's a VB file, the first field in the file starts at position 5 after the RDW. PIC S9(03) COMP-3 is a 2-byte PD value. So use 5 for p and 2 for m in the OMIT statement as shown in my previous post.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top