IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to use Display in ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 30
Location: Bangalore

PostPosted: Tue Sep 02, 2008 6:52 pm
Reply with quote

I have a file with data

L,A,10000
M,B,20000
P,C,30000
L,D,15000
L,E,05000
M,F,30000

I want output in the format

Machine Stream number
L A 10000
L D 15000
L E 05000
------------------------------------
Total for L = 30000
M B 20000
M F 30000
-----------------------------------
Total for M = 50000
P C 30000
-----------------------------------
Total for P = 30000
-----------------------------------

GRAND total (L+M+P) = 110000

How do I create a report of above format using Display of ICETOOL
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 02, 2008 8:03 pm
Reply with quote

Have you looked at the DISPLAY Operator and the DISPLAY Examples provided?
Back to top
View user's profile Send private message
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 30
Location: Bangalore

PostPosted: Tue Sep 02, 2008 8:41 pm
Reply with quote

Yes I did!

I am aware that display can do this.....

But not able to understand how it functions
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 02, 2008 9:25 pm
Reply with quote

neelima.sinha,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                     
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD *                               
L,A,10000                                     
M,B,20000                                     
P,C,30000                                     
L,D,15000                                     
L,E,05000                                     
M,F,30000                                     
//SORTOUT  DD SYSOUT=*                         
//SYSIN    DD *                               
  SORT FIELDS=(1,1,CH,A)                       
  OUTFIL REMOVECC,                             
  SECTIONS=(1,1,                               
  TRAILER3=(25'-',/,'TOTAL FOR ',1,1,C'  = ', 
            TOT=(5,5,ZD,M10,LENGTH=8))),       
  TRAILER1=(25'-',/,'GRAND TOTAL (L+M+P) = ', 
            TOT=(5,5,ZD,M10,LENGTH=8))         
/*                                             


Hope this helps...

Cheers
Back to top
View user's profile Send private message
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 30
Location: Bangalore

PostPosted: Wed Sep 03, 2008 2:49 pm
Reply with quote

Not sure why...but above mentioned solution is not working....
Back to top
View user's profile Send private message
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 30
Location: Bangalore

PostPosted: Wed Sep 03, 2008 2:50 pm
Reply with quote

Also if anybody can explain how to use display to get this report it would be helpful

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 03, 2008 2:54 pm
Reply with quote

neelima.sinha wrote:
Not sure why...but above mentioned solution is not working....

So why not post the output from the failing solution so that we can actually see what is or is not happening.
Back to top
View user's profile Send private message
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 30
Location: Bangalore

PostPosted: Wed Sep 03, 2008 5:52 pm
Reply with quote

Ran fine.... Sortout statement was missing.....

Thanks for this.....

if an alternative solution via DISPLAY of icetool is provided that would be great
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Sep 03, 2008 9:21 pm
Reply with quote

DISPLAY cannot produce a report in exactly the format you showed. That's why Kolusu used OUTFIL which can.

Here's the closest I could get with DISPLAY. Note that you'll need z/OS DFSORT V1R5 PTF UK90013 (July, 2008) to use NOCC (you can remove it if you don't have that PTF).

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN   DD *
L,A,10000
M,B,20000
P,C,30000
L,D,15000
L,E,05000
M,F,30000
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT  DD SYSOUT=*
//TOOLIN   DD *
SORT FROM(IN) TO(T1) USING(CTL1)
DISPLAY FROM(T1) LIST(OUT) NOCC -
  HEADER('Machine') ON(1,1,CH) -
  HEADER('Stream') ON(3,1,CH) -
  HEADER('Number') ON(5,5,ZD,U06) -
  BETWEEN(5) -                                           
  BTITLE('Records for ') BREAK(1,1,CH) -                 
  BTOTAL('Break total') TOTAL('Grand total (L+M+P)')     
/*


OUT would have:

Code:

Records for   L

Machine     Stream      Number
-------     ------     -------
L           A            10000
L           D            15000
L           E             5000

Break total              30000

Records for   M

Machine     Stream      Number
-------     ------     -------
M           F            30000
M           B            20000

Break total              50000

Records for   P

Machine     Stream      Number
-------     ------     -------
P           C            30000

Break total              30000


Machine     Stream      Number
-------     ------     -------

Grand total (L+M+P)     110000
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top