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
 

 

How to use Display in ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to use Display in ICETOOL
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: 2150
Location: At my coffee table

PostPosted: Tue Sep 02, 2008 8:03 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: How to use Display in ICETOOL
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Sep 03, 2008 2:54 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Sep 03, 2008 9:21 pm    Post subject:
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    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 Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm


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