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

Arithmetic operations wit tot=


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

New User


Joined: 26 Jul 2013
Posts: 7
Location: Germany

PostPosted: Wed Jul 31, 2013 6:43 pm
Reply with quote

i create a volume report using dcollect data.
I am also using dcollect symbol records.
the following statements are used:
Code:
  SORT     FIELDS=(87,8,CH,A,DCVVOLSR,A,DCVDVNUM,A)             
  OUTFIL   CONVERT,                                             
  FNAMES=REPORT,                                               
  INCLUDE=(DCURCTYP,EQ,C'V '),                                 
  HEADER2=(001:'Dasd - Statistik vom:',                         
           023:DATE(DM4.),' ',TIME,                             
           102:'SEITE: ',                                       
           111:PAGE,/,                                         
           001:'System: ',DCUSYSID,/,                           
           001:116C' ',/,                                       
           001:'Volume ADR  Dev-Type STG-Name SMS Atr FSP-%   ',
             '  Free-KB     Alloc-KB     Total-KB  FRG  ',     
             '# Ext   Lgx-KB F-DSCB F-VIRS',/,                 
           001:116C'-'),                                       
 TRAILER1=(001:'Dasd - Statistik vom:',                   
           023:DATE(DM4.),' ',TIME,/,                     
           001:'System: ',DCUSYSID,                       
           102:'Seite: ',                                 
           111:PAGE,/,                                     
           001:116C' ',/,                                 
           001:116C'-',/,                                 
           001:'Volumss Gesamt:   ',                       
           026:COUNT=(M10,LENGTH=5),/,                     
           001:'Gesamt Kapazität: ',                       
           020:TOT=(DCVVLCAP,BI,ZD,LENGTH=11),/,           
           001:'Gesamt allokiert: ',                       
           020:TOT=(DCVALLOC,BI,ZD,LENGTH=11),/,           
           001:'Gesamt Free Space: ',                     
           020:TOT=(DCVFRESP,BI,ZD,LENGTH=11),/,           
           001:'Free Space in %:  '),                     
 SECTIONS=(29,3,SKIP=3L,87,8,SKIP=3L,                     
 TRAILER3=(013:C'Total:',                                 
           022:87,8,                                       
           034:COUNT=(M10,LENGTH=4),                       
           045:TOT=(DCVFRESP,BI,LENGTH=12),               
           058:TOT=(DCVALLOC,BI,LENGTH=12),               
           071:TOT=(DCVVLCAP,BI,LENGTH=12))),             
  OUTREC=(DCVVOLSR,                                                               
          X,DCVDVNUM,HEX,                           
          X,DCVVLCAP,                               
            CHANGE=(8,X'002A4A2C',C'3390-3 ',                           
                      X'007EDE85',C'3390-9 ',                           
                      X'019EEB0F',C'3390-27'),                         
            NOMATCH=(C'3390    '),                                     
          X,87,8,                                   
            CHANGE=(8,C'        ',C'NON-SMS '),                         
            NOMATCH=(87,8),                                             
         2X,DCVFLAG1,                               
            CHANGE=(1,B'......11',C'Y'),                               
            NOMATCH=(C'N'),                                             
         2X,DCVFLAG1,                               
            CHANGE=(3,B'..1.....',C'PRV',                               
                      B'...1....',C'PUB',                               
                      B'....1...',C'STG'),                             
            NOMATCH=(C'   '),                                           
         2X,DCVPERCT,BI,                             
         4X,DCVFRESP,BI,LENGTH=9,                   
         4X,DCVALLOC,BI,LENGTH=9,                   
         4X,DCVVLCAP,BI,LENGTH=9,                   
          X,DCVFRAGI,FI,LENGTH=4,                   
         3X,DCVFREXT,FI,LENGTH=4,                   
          X,DCVLGEXT,BI,LENGTH=8,                   
         3X,DCVFDSCB,FI,LENGTH=4,                   
         3X,DCVFVIRS,FI,LENGTH=4,                   
          X,132:X)       


My question is: is it possible to use arithmetic operations with the TOT= Columns. I want to show an average usage in the storagegroup.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 31, 2013 6:50 pm
Reply with quote

The manual will show you several options that you can use as well as TOT. Did you look in the manual?
Back to top
View user's profile Send private message
Roland Brosio

New User


Joined: 26 Jul 2013
Posts: 7
Location: Germany

PostPosted: Wed Jul 31, 2013 7:19 pm
Reply with quote

thank you for the answer.
i looked into the manual but i cannot find a solution
what i want to do is the following:
in the trailer1-section
Code:
TRAILER1=(001:'Dasd - Statistik vom:',                   
           023:DATE(DM4.),' ',TIME,/,                     
           001:'System: ',DCUSYSID,                       
           102:'Seite: ',                                 
           111:PAGE,/,                                     
           001:116C' ',/,                                 
           001:116C'-',/,                                 
           001:'Volumss Gesamt:   ',                       
           026:COUNT=(M10,LENGTH=5),/,                     
           001:'Gesamt Kapazität: ',                       
           020:TOT=(DCVVLCAP,BI,ZD,LENGTH=11),/,           
           001:'Gesamt allokiert: ',                       
           020:TOT=(DCVALLOC,BI,ZD,LENGTH=11),/,           
           001:'Gesamt Free Space: ',                     
           020:TOT=(DCVFRESP,BI,ZD,LENGTH=11),/,           
           001:'Free Space in %:  '),             
i want to calculate the total of freespace divided by the total of capacity by 100
Code:
           020:TOT=(DCVFRESP,BI,ZD),DIV,                 
           (DCVVLCAP,BI,ZD),DIV,(+100),LENGTH=4)),
here i get a syntax error
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 31, 2013 10:04 pm
Reply with quote

Hello and welcome to the forum,

It will help us help you if you post the job submitted and the diagnostic information generated by the run.

Notice that your last post has been "Code'd". You should use the code tag when posting things that need to stay in alignment.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Jul 31, 2013 10:34 pm
Reply with quote

Roland Brosio,

You canNOT perform Arithmetic on Reporting parms (Header/Trailer). However I suggest that you use DISPLAY Operator to produce the report which has the option of division before formatting. Check this link for

Using /x of DISPLAY operator to specify division of the numeric data for this field before formatting.
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 Arithmetic division using Syncsort SYNCSORT 6
No new posts Help this REXX Rookie-Bad arithmetic ... CLIST & REXX 7
No new posts how to do bit operations from CHAR PL/I & Assembler 3
No new posts Bad arithmetic conversion when assign... CLIST & REXX 4
No new posts HEADER1 with Date arithmetic DFSORT/ICETOOL 4
Search our Forums:

Back to Top