Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us