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 divide total of Two different fields Thru trailer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to divide total of Two different fields Thru trailer
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

Site Director


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

PostPosted: Wed May 28, 2008 3:41 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am


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