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

How to divide total of Two different fields Thru trailer


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
brit_ch01

New User


Joined: 24 Dec 2007
Posts: 13
Location: Mumbai

PostPosted: Tue May 27, 2008 8:03 pm
Reply with quote

Hi,

Consider below example
There are two fields one is number of Times card number swipe at particular merchant and total amount now I need to find the average Card member spent at each merchant. How can I do by Sysnccort

Example:
Code:
CM              Number of Swipes      total Amount  merchant
0001                     2                      100                 Pizza hut
0001                     3                      200                 Dominzos
0001                     5                      1000                Shoppers stop

Now should create the trailer records in the below format
Total no of swipes : 10
Total amount : 1300
Average amount : 130 (1300/10)


For this I have used the below Syntax but it is giving error can you please
help to resolve:
Code:
TRAILER1=(001:132C'-',                                 
          /,                                           
          001:C'|',                                     
          002:C'TOTALS          ',                     
          018:C'|',                                     
          037:TOTAL=(011,005,PD,                       
              EDIT=(IIIIIITTT)),                       
          046:C'|',                                     
                  *                                     
     052:(TOT=(024,008,PD),DIV,TOT=(011,005,PD)),       
              EDIT=(S$I,III,III,III,IIT.TT),SIGNS=(,-)),
          074:C'|',                                     081:TOTAL=(024,008,PD,                       
              EDIT=(S$I,III,III,III,IIT.TT),SIGNS=(,-)),
          103:C'|',                                     
          110:TOTAL=(032,008,PD,                       
              EDIT=(S$I,III,III,III,IIT.TT),SIGNS=(,-)),
          132:C'|',                                     
          /,                                           
       132:C'|',   
       /,         
      001:132C'-')
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 May 28, 2008 3:41 am
Reply with quote

Hello,

Please post your complete jcl and control statements as well as the diagnostic info from the jes output.

When you post, use the "Code" tag near the top of the reply panel. To make sure your post will appear as you want, use the Preview (below the text window). Once you have edited and Previewed and your post appears as you want, click Submit. If you forget to Submit, you get to enter your post again. . .
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts Comparing Header and Trailer. DFSORT/ICETOOL 7
No new posts Adding a trailer with record count an... JCL & VSAM 4
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
Search our Forums:

Back to Top