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

DFSORT: difference in comp-3 field format


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

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Thu Nov 23, 2006 3:01 am
Reply with quote

in DFSORT is there any difference between the two formats. I am trying to remove records with packed decimal field <= 10.00

Comp-3 Field : position=508, length=6 defined as S9(09)V9(02) COMP-3

SORT FIELDS=COPY
OMIT COND=(508,6,PD,LE,10,AND,
36,2,CH,EQ,C'15')

and

SORT FIELDS=COPY
OMIT COND=(508,6,PD,LE,+10.00,AND,
36,2,CH,EQ,C'15')
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 Nov 23, 2006 3:16 am
Reply with quote

508,6,PD,LE,10 won't work and 508,PD,LE,+10.00 is invalid. What you need is this DFSORT OMIT statement:

Code:

  OMIT COND=(508,6,PD,LE,+1000,AND, 
    36,2,CH,EQ,C'15')               


A S9(09)V9(02) COMP-3 field is a 6-byte PD field, but COBOL does NOT store the decimal point. 10.00 is stored as X'00000001000C'. So you need to use +1000 as the actual constant for the implied value of +10.00.

Your constant of 10 would be treated as an implied value of 0.10 which is not what you want. A constant of +10.00 would be flagged as a syntax error since a decimal point is not allowed.
Back to top
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Thu Nov 23, 2006 3:32 am
Reply with quote

Thanks Frank for the quick reply. It works now. Thanks for your help.
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 Populate last day of the Month in MMD... SYNCSORT 2
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 Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top