|
View previous topic :: View next topic
|
| Author |
Message |
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi,
I have a I/P file as below:
| Code: |
AAAAAAA 1111111111111111 00000101
AAAAAAA 2222222222222222 00000201
AAAAAAA 1223 00000301
BBBBBBB 33333333 00000401
BBBBBBB 5555555555555555 00000501
CCCCCCCCCC66666666666 00000601 |
I want to create a report from the file & provide, Maximum, Minimum, Average & Total based on values present in the first 10 characters.
I have used the below DISPLAY statement using ICETOOL
| Code: |
DISPLAY FROM(INDD01) LIST(SPOOLDD) -
ON(1,10,CH) ON(11,30,CH) ON(41,8,ZD) BREAK(1,10,CH) -
TITLE('SAMPLE TITLE SHOULD BE PROVIDED HERE FOR REF') -
BTITLE('BREAK TITLE PRINTED HERE REF') -
HEADER('PART1 DATA') HEADER('PART 2 DATA') HEADER('PART 3') -
BTOTAL('TOTAL') BMINIMUM('MINIMUM') BMAXIMUM('MAXIMUM') -
BAVERAGE('AVERAGE') |
Now, the O/P is printing the BREAK values along with BTITLE.
A section of O/P file is provided below:
| Code: |
1SAMPLE TITLE SHOULD BE PROVIDED HERE FOR REF
AAAAAAA BREAK TITLE PRINTED HERE REF
PART1 DATA PART 2 DATA PART
-------------------- ------------------------------ ---------------
AAAAAAA 1111111111111111 +00000000000010
AAAAAAA 2222222222222222 +00000000000020
AAAAAAA 1223 +00000000000030
TOTAL +00000000000060
MINIMUM +00000000000010
MAXIMUM +00000000000030
AVERAGE +00000000000020
1SAMPLE TITLE SHOULD BE PROVIDED HERE FOR REF
BBBBBBB BREAK TITLE PRINTED HERE REF
PART1 DATA PART 2 DATA PART
-------------------- ------------------------------ ---------------
BBBBBBB 33333333 +00000000000040
BBBBBBB 5555555555555555 +00000000000050
TOTAL +00000000000090
MINIMUM +00000000000040
MAXIMUM +00000000000050
AVERAGE +00000000000045
1SAMPLE TITLE SHOULD BE PROVIDED HERE FOR REF
CCCCCCCCCC BREAK TITLE PRINTED HERE REF
PART1 DATA PART 2 DATA PART
-------------------- ------------------------------ ---------------
CCCCCCCCCC 66666666666 +00000000000060
TOTAL +00000000000060
MINIMUM +00000000000060
MAXIMUM +00000000000060
AVERAGE +00000000000060 |
Here you may see that "AAAAAAA" or "BBBBBBB" or "CCCCCCCCCC" is printed before each break title. I want to suppress these values.
Is there a way it can be done using the same DISPLAY statement?
Thanks |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
RTFM: DFSORT Application Programming Guide
| Quote: |
| Optional break operands can be used to modify the break title for each section (the break value is always printed as part of the break title) |
The designers assumed it should look like this:
| Code: |
| XXXXXXXXX - group description section |
FYI: If you are interested, the sectioning of reports is designed differently in SYNCSORT (moderators prohibit mentioning SYNCSORT in DFSORT topics, and vice versa) |
|
| Back to top |
|
 |
magesh23586
Active User

Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
You may try SORT instead of ICETOOL.
| Code: |
//STEP01 EXEC PGM=SORT
//SORTIN DD *
AAAAAAA 1111111111111111 00000101
AAAAAAA 2222222222222222 00000201
AAAAAAA 1223 00000301
BBBBBBB 33333333 00000401
BBBBBBB 5555555555555555 00000501
CCCCCCCCCC66666666666 00000601
//SORTOUT DD DISP=(,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DSN=UROUTPUT
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL BUILD=(01,10,13X,
11,30,03X,
41,8,ZD,EDIT=(STTTTTTTTTTTTTTT),
SIGNS=(+,-),80:X),
SECTIONS=(1,10,
HEADER3=('SAMPLE TITLE SHOULD BE PROVIDED HERE FOR REF',2/,
'BREAK TITLE PRINTED HERE REF',2/,
'PART1 DATA ',
'PART 2 DATA ',
'PART 3 ',2/,
'-------------------- ',
'------------------------------ ',
'---------------- '),
TRAILER3=(/,'TOTAL ',49X,
TOT=(41,8,ZD,EDIT=(STTTTTTTTTTTTTTT),
SIGNS=(+,-)),2/,
'MINIMUM',49X,
MIN=(41,8,ZD,EDIT=(STTTTTTTTTTTTTTT),
SIGNS=(+,-)),2/,
'MAXIMUM',49X,
MAX=(41,8,ZD,EDIT=(STTTTTTTTTTTTTTT),
SIGNS=(+,-)),2/,
'AVERAGE',49X,
AVG=(41,8,ZD,EDIT=(STTTTTTTTTTTTTTT),
SIGNS=(+,-))))
|
|
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
| Quote: |
| moderators prohibit mentioning SYNCSORT in DFSORT topics, and vice versa |
nobody prohibits anything...
it is just basic good sense in order to avoid useless waste of resources
there is no reason to provide a OTHER PRODUCT solution that will not work in the TS environment |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|