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
 

 

summing on cobol comp-2 fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Wed Jun 21, 2006 2:48 pm    Post subject: summing on cobol comp-2 fields
Reply with quote

I need to sum up fields that are defined as comp-2 in cobol.

so my sort cardl ooks like

sort fields=(1,7,ch,a)
sum fields=(27,8),format=??

what should the format be as in this case..?? in teh copybook the sum field is defined as Comp-2
Back to top
View user's profile Send private message

sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed Jun 21, 2006 5:38 pm    Post subject:
Reply with quote

Hi,
Try with format 'FL' .

Thank you
Krishy
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: Wed Jun 21, 2006 8:18 pm    Post subject:
Reply with quote

red,

Krishy is right. See the table of COBOL data types vs DFSORT formats at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/srtmacfm.html

Note that comp-2 is an 8-byte FL (floating point) value, so you can use these DFSORT control statements:

Code:

  SORT FIELDS=(1,7,CH,A)
  SUM FIELDS=(27,8),FORMAT=FL
Back to top
View user's profile Send private message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Wed Jun 21, 2006 9:00 pm    Post subject:
Reply with quote

thnx
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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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