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

How to Display TOTAL of records TYPE-CH with ICETOOL


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

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 07, 2008 4:18 pm
Reply with quote

Hello to everyone,

I have an Input like:

PV011_CTT
PV012_AGR
PV013_REP
PV014_MIX
PV015_FULL
PV012_AGR
PV013_REP
PV014_MIX
PV015_FULL
PV012_AGR
PV013_REP
PV014_MIX
PV015_FULL
PV012_AGR
PV013_REP
PV014_MIX
PV015_FULL

The OUTPUT desired is:

PV011_CTT 1

PV012_AGR 1
PV012_AGR 1
PV012_AGR 1

PV013_REP 1
PV013_REP 1
PV013_REP 1

PV014_MIX 1
PV014_MIX 1
PV014_MIX 1

PV015_FULL 1
PV015_FULL 1
PV015_FULL 1

Total of all: 13


I tryed with the following ICETOOL card:

Code:
//ICESTAT  EXEC PGM=ICETOOL,COND=(4,LE)                       
//*                                                           
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//INSTDEF  DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=*                                         
//INP      DD DSN=TASP.ICEDISP.MGGRF017.SEQ,DISP=SHR           
//OUT      DD SYSOUT=*                                         
//TOOLIN   DD *                                               
  OCCUR FROM(INP) LIST(OUT) INDENT(5) BETWEEN(35) -           
        TITLE('STATISTICS PGM-MGGRF017') DATE(DM4/) TIME PAGE -
        HEADER('TABLE NAME') ON(1,25,CH) -                     
        HEADER('COUNT') ON(VALCNT,A2,N08) -                   
        BTITLE('TABLE:') BREAK(1,25,CH) -                     
        TOTAL('TOTAL OF ALL:')                                 

but gave me a stopping error :
Code:
********************************* TOP OF DATA **********************************
ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED                                   
                                                                               
ICE650I 0 VISIT http://www.ibm.com/storage/dfsort FOR ICETOOL PAPERS, EXAMPLES A
                                                                               
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS:  TOOLIN                               
                                                                               
                                                                               
ICE630I 0 MODE IN EFFECT:  STOP                                                 
                                                                               
            OCCUR FROM(INP) LIST(OUT) INDENT(5) BETWEEN(35) -                   
                  TITLE('STATISTICS PGM-MGGRF017') DATE(DM4/) TIME PAGE -       
                  HEADER('TABLE NAME') ON(1,25,CH) -                           
                  HEADER('COUNT') ON(VALCNT,A2,N08) -                           
                  BTITLE('TABLE:') BREAK(1,25,CH) -                             
                  $                                                             
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER                             
                  TOTAL('TOTAL OF ALL:')                                       
ICE602I 0 OPERATION RETURN CODE:  12                                           
                                                                               
                                                                               
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE:  12                   
******************************** BOTTOM OF DATA ********************************


May be in ICETOOL it's not possible making statistics of CHAR fields ? Can anyone helps me out ? Thanks in advance.


Denis
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: Mon Apr 07, 2008 7:34 pm
Reply with quote

denis.dhimitri wrote:

Code:
                  BTITLE('TABLE:') BREAK(1,25,CH) -                             
                  $                                                             
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER                             
I think it is tring to tell you that it doesn't know what 'BTITLE' is...
Where in the OCCUR Operator did you find it?
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 07, 2008 7:52 pm
Reply with quote

Well, I didn't find it in the OCCUR syntax and that's why of that error, but how can I reach the output desired ? Do I have to use DISPLAY or RANGE in my case or propably do a COBOL program for thi report ? Thanks in advance

Denis
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: Mon Apr 07, 2008 8:00 pm
Reply with quote

denis.dhimitri wrote:
Well, I didn't find it in the OCCUR syntax and that's why of that error, but how can I reach the output desired ?
What result do you get when you remove the 'B'?
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 07, 2008 8:05 pm
Reply with quote

Well, I get another Error as below:

Code:
********************************* TOP OF DATA **********************************
ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED                                   
                                                                               
ICE650I 0 VISIT http://www.ibm.com/storage/dfsort FOR ICETOOL PAPERS, EXAMPLES A
                                                                               
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS:  TOOLIN                               
                                                                               
                                                                               
ICE630I 0 MODE IN EFFECT:  STOP                                                 
                                                                               
            OCCUR FROM(INP) LIST(OUT) INDENT(5) BETWEEN(35) -                   
                    TITLE('STATISTICS PGM-MGGRF017') DATE(DM4/) TIME PAGE -     
                    HEADER('TABLE NAME') ON(1,25,CH) -                         
                    HEADER('COUNT') ON(VALCNT,A2,N08) -                         
                    TITLE('TABLE:') BREAK(1,25,CH) -                           
                    $                                                           
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER                             
                    TOTAL('TOTAL OF ALL:')                                     
ICE602I 0 OPERATION RETURN CODE:  12                                           
                                                                               
                                                                               
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE:  12                   
******************************** BOTTOM OF DATA ********************************
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: Mon Apr 07, 2008 8:18 pm
Reply with quote

According to the OCCUR Operator description, while HEADER might be repeatable, TITLE is not....
What are you trying to accomplish with two of them?
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 07, 2008 8:26 pm
Reply with quote

The result I'm trying to heve is the total count of all input data from my input. I tryed the following ICETOOL card :
//TOOLIN DD *
//OCCUR FROM(INP) LIST(OUT) INDENT(5) BETWEEN(35) -
// TITLE('STATISTICS PGM-MGGRF017') DATE(DM4/) TIME PAGE -
// HEADER('TABLE NAME') ON(1,25,CH) -
// HEADER('COUNT') ON(VALCNT,A2,N08)

which gave the result :
Code:
********************************* TOP OF DATA **********************************
     STATISTICS PGM-MGGRF017        07/04/2008        16:05:30        - 1 -     
                                                                               
     TABLE NAME                                                        COUNT   
     -------------------------                                   -----------   
     PV010_ASSOCIARAPPO                                                1.000   
     PV011_CONTRATTO                                                       4   
     PV012_TESTA                                                       1.000   
     PV014_COPERTURA                                                   1.000   
     PV015_MOVIMENTO                                                   2.000   
     PV020_PAGLIQUIDAZ                                                     2   
     PV021_BENEFPAG                                                        1   
     PV036_NUMERATORI                                                      4   
     PV038_SOVRAPPREMIO                                                    6   
     PV043_SINISTRO                                                        2   
     PV044_RINNOVOGRUP                                                 1.000   
     PV046_DEROGAGRUPPO                                                    3   


without the TOTAL COUNT at the end of the Report and I was trying to do it by trying with other options that may be in ICETOOL utility are not possible. Do you know how I can reach this ? Thanks a lot by the way

Denis
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: Mon Apr 07, 2008 8:54 pm
Reply with quote

Denis,

You're incorrectly mixing up parameters of DISPLAY and OCCUR.

Your posts make it difficult to know what you really want.

Do you actually want the '1' count after each record? Do you want a blank line after each key? Do you want the keys in sorted order? Or are you just looking for the count of all of the records?

Please show a good example of the output you actually want rather than what you got with various attempts.
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 07, 2008 9:03 pm
Reply with quote

Hello Sir,

I'm looking to have at the bottom of my Report 1 blank line and after it the count of all records which should be the sum of all values on the right of the report that are shawn. Thanks in advance

Denis
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: Mon Apr 07, 2008 9:03 pm
Reply with quote

Have you thought of just sorting and totaling (with or without sum) with a footer?
Have you looked at the possibility of using the DISPLAY Operator
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Mon Apr 07, 2008 9:12 pm
Reply with quote

I thought of totaling on the right for each table-name on the left and a footer which give the TOTAL COUNT of all table-names. With the DISPLAY Operator I can't have both VALCNT for each table-name and the TOTAL COUNT of all table-names at the bottom. Am I wrong ? If yes do you have a syntax sample ready for me please ? Thanks a lot

Denis
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: Mon Apr 07, 2008 9:20 pm
Reply with quote

Not me, but I'm sure that Frank or Skolusu will.....
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: Mon Apr 07, 2008 9:32 pm
Reply with quote

Quote:
I'm looking to have at the bottom of my Report 1 blank line and after it the count of all records which should be the sum of all values on the right of the report that are shawn. Thanks in advance


I don't know what you mean by "sum of all values on the right of the report that are shawn" - which report? what values - the 1s? You're really wasting time here by not giving clear information.

Please go back to my previous post and answer my questions and show me an example of the complete output you want. (Don't describe the output you want - show the output you want.) I could have given you what you needed after your first post if you had just showed clearly what you wanted rather than what you tried that didn't work.
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Tue Apr 08, 2008 1:07 pm
Reply with quote

Sorry MR.Yaeger for not giving enough information. The output desired is :

Code:
********************************* TOP OF DATA **********************************
     STATISTICS PGM-MGGRF017        07/04/2008        16:05:30        - 1 -     
                                                                               
     TABLE NAME                                                        COUNT   
     -------------------------                                   -----------   
     PV010_ASSOCIARAPPO                                                1.000   
     PV011_CONTRATTO                                                       4   
     PV012_TESTA                                                       1.000   
     PV014_COPERTURA                                                   1.000   
     PV015_MOVIMENTO                                                   2.000   
     PV020_PAGLIQUIDAZ                                                     2   
     PV021_BENEFPAG                                                        1   
     PV036_NUMERATORI                                                      4   
     PV038_SOVRAPPREMIO                                                    6   
     PV043_SINISTRO                                                        2   
     PV044_RINNOVOGRUP                                                 1.000   
     PV046_DEROGAGRUPPO                                                    3   
     Total of Tables                                                             6.022



Wish this is what you need for helping me out. Thanks a lot for your time and for your assistance Mr.Yaeger.


Regards
Denis
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: Tue Apr 08, 2008 9:43 pm
Reply with quote

Here's a DFSORT job that will give you the report you asked for:

Code:

//S1   EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  SORT FIELDS=(1,25,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    BUILD=(80X),
    HEADER1=(6:'STATISTICS PGM-MGGRF017',37:DATE=(DM4/),
      55:TIME,66:'- ',PAGE=(EDIT=(IIT)),' -',/),
    HEADER2=(6:'TABLE NAME',72:'COUNT',/,
             6:25'-',66:11'-'),
    SECTIONS=(1,25,
      TRAILER3=(6:1,25,69:COUNT=(EDIT=(I.III.IIT)))),
    TRAILER1=(6:'Total of Tables',69:COUNT=(EDIT=(I.III.IIT)))
/*
Back to top
View user's profile Send private message
denis.dhimitri

New User


Joined: 25 Mar 2008
Posts: 14
Location: milan, italy

PostPosted: Wed Apr 09, 2008 1:18 pm
Reply with quote

Thank you very much Mr.Yaeger, it helped me a lot. It's what i wanted to get in Output from my report. Sorry again for not being clear with my request from the begining. I really appreciate your effort.

Regards
Denis
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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
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
Search our Forums:

Back to Top