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

How to display using ICETOOL


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

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Mon Jul 08, 2013 6:57 pm
Reply with quote

Hi ,

I have an input file like
Code:

Apple    A
Apple    A
Apple    B
Apple    C
Orange   A
Orange   B
Orange   C
Orange   C


i am trying to get an Output like,
Code:

Fruits   Name   Count
Apple     A         2
Apple     B         1
Apple     C         1
Orange    A         1
Orange    B         1
Orange    C         2



It would be great for your help.

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

Senior Member


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

PostPosted: Mon Jul 08, 2013 9:52 pm
Reply with quote

shanth555,

Read upon the OCCUR operator here

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA60/7.11?



Model your job based on the example 1 or example 2 shown in the above link.
Back to top
View user's profile Send private message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Tue Jul 09, 2013 12:18 pm
Reply with quote

Hi Kolusu,

Thanks for your Manuals on Occur Operator.

It really helped out me.

How to get the total count with headings like below.
Code:

                 Fruits Available
Month : July                         Year:2013

Fruits   Name   Count
Apple     A         2
Apple     B         1
Apple     C         1
Orange    A         1
Orange    B         1
Orange    C         2
           Total    8





Below is my code
Code:

OCCUR FROM(IN1) LIST(SORTOUT) -           
TITLE('   Fruits Available   ')-       
HEADER('Fruits) ON(1,6,CH)-             
HEADER('Name') ON(10,1,CH)-               
HEADER('TOTAL') ON(VALCNT)-               
BLANK



if i have more no of records in the input dataset its getting split into twp pages and gives the results.. what would be possibilities to get the results in Single page even if we have more no of records?

Thank you,
Back to top
View user's profile Send private message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Tue Jul 09, 2013 6:54 pm
Reply with quote

is there any chances to get the Total count at the bottom with OCCUR operator? If yes please share the syntax

Thank you
Back to top
View user's profile Send private message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Tue Jul 09, 2013 6:57 pm
Reply with quote

There is an Optional Operand "LINES" can be used , But i dont think i will work in OCCUR.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Jul 09, 2013 7:03 pm
Reply with quote

Generally the syntax is in the manual - you just have to read it and experiment. Also, generally, if the manual does not say that something can be done then it means that it cannot be done.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Jul 09, 2013 10:46 pm
Reply with quote

shanth555 wrote:
How to get the total count with headings like below.
Code:

                 Fruits Available
Month : July                         Year:2013

Fruits   Name   Count
Apple     A         2
Apple     B         1
Apple     C         1
Orange    A         1
Orange    B         1
Orange    C         2
           Total    8



Shanth555,

If you need the month name then you need to use FINDREP or CHANGE to convert the numeric month number into a Character Month name.

Quote:

if i have more no of records in the input dataset its getting split into twp pages and gives the results.. what would be possibilities to get the results in Single page even if we have more no of records?


What do you mean single page? If you have a million records in your input file and you end up with 2000 unique keys, how do you expect them to be fit in a single page? Do you mean you don't need the header on every single page? You just need the header once and the rest of the report doesn't have the header?

shanth555 wrote:

is there any chances to get the Total count at the bottom with OCCUR operator? If yes please share the syntax


If you looked at the syntax of OCCUR operator you would have noticed that you don't have TOTAL field.

If you are clear about the requirement , I would have suggested something else. You need to be clear with your requirements. If you wanted the total count of records at the end, then you will have to use REPORTING features (Sections and Trailerx) to get the desired results.

shanth555 wrote:

There is an Optional Operand "LINES" can be used , But i dont think i will work in OCCUR.


What makes you think it wouldn't work? If you have read upon the documentation about Lines you would have found this

DFSORT wrote:

LINES(n) - Specifies the number of lines per page for the list data set (overriding the default of 58). n must be greater than 9, but less than 1000.
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