Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DFSORT: difference in comp-3 field format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT: difference in comp-3 field format
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 Moderator


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

PostPosted: Thu Nov 23, 2006 3:16 am    Post subject:
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    Post subject: Re: DFSORT: difference in comp-3 field format
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us