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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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