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
 

 

To print the count of records and total amount

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Fri Jan 07, 2011 2:28 pm    Post subject: To print the count of records and total amount
Reply with quote

i have two files in the format which is mentioned as below:

Invoice File

ID Amount
X(3) S9(13)V99
-------------------
004 -110.98
004 -87.87
004 -5435.87


Dist File

ID Amount
X(3) S9(13)V99
-------------------
005 -110.98
005 -87.87
005 -5435.87

The output file should be in the format as below:

VIP-DATA DATE
-------------------------------------------------------
RECORD COUNT OF INVOICE FILE : 3
TOTAL AMOUNT : -5322.76
RECORD COUNT OF DIST FILE : 3
TOTAL AMOUNT : -5322.76
-------------------------------------------------------
it would be great, if anyone could provide some valuable inputs on how to proceed to get the above desired output.
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Mon Jan 10, 2011 11:38 pm    Post subject:
Reply with quote

sun_job,

Is there a way to distinguish the records from invoice file to the dist file? And how did you get the total to -5322.76 when the total of the numbers shown is -5634.72

Also is the lrecl of both files 18 bytes? If so what is the recfm?
Back to top
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Tue Jan 11, 2011 10:26 am    Post subject:
Reply with quote

Hi Skolusu,

the invoice file and dist file are having different file names. Am sorry about the total . Yes, the total is -5634.72 .
LRECL = 25 bytes
RECFM = FB
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Jan 11, 2011 11:39 pm    Post subject:
Reply with quote

Sun_job,

Answer the following question.

Skolusu wrote:
sun_job,

Is there a way to distinguish the records from invoice file to the dist file?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 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 5 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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm


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