TRAILER3 - TOTAL function formatting



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

TRAILER3 - TOTAL function formatting

Postby jimscholes » Thu Sep 24, 2009 2:17 pm

Hi,

I am using reporting function TOT to sum up column (offset 20-21) which is a 2-byte field defined as PIC S9(4) COMP in COBOL. In output record, I want to have the total field remains S9(4) COMP, I tried not to use edit mark Mxx but it gives me error. How do I preserve the original data type after the addition?

//CTL2CNTL DD *
SORT FIELDS=(1,19,CH,A)
OUTFIL FNAMES=MYOUTFL,REMOVECC,NODETAIL,
SECTIONS=(1,19,
TRAILER3=(1,19,TOT=(20,2,ZD,LENGTH=2)))

Regards,
Jim
jimscholes
 
Posts: 6
Joined: Tue Sep 15, 2009 12:06 am
Has thanked: 0 time
Been thanked: 0 time

Re: TRAILER3 - TOTAL function formatting

Postby skolusu » Thu Sep 24, 2009 5:53 pm

jimscholes,

S9(4) COMP is BInary format and not ZD format. Check this link for the equivalent DFSORT formats for various COBOL data types

http://publibz.boulder.ibm.com/cgi-bin/ ... E1CA20/C.3

if all your input data is having positive numbers then use BI , and if you have both positive and negative numbers use FI format

Use the following control cards
//CTL2CNTL DD *
  SORT FIELDS=(1,19,CH,A)
  OUTFIL FNAMES=MYOUTFL,REMOVECC,NODETAIL,
  SECTIONS=(1,19,
  TRAILER3=(1,19,TOT=(20,2,BI,TO=BI,LENGTH=2)))
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post