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
 
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

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