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

how to calculate SUM for VB file using Sort/ICETOOL jcl


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

New User


Joined: 04 Aug 2023
Posts: 4
Location: India

PostPosted: Mon Sep 11, 2023 10:15 am
Reply with quote

Hi,

Good day!

I have requirement to find how many records in VB file and Sum for one numeric field (ex: Field name is Amount). VB file has delimiter of pipe '|' between each record.

I can able to calculate count using trailer1 variable like below,

OPTION COPY
OUTFIL NAMES=SORTOUT,REMOVECC,NODETAIL,
TRAILER1=(1:COUNT=(EDIT=IIIIIIIIIT))

For Sum, field position is 5 and since it is VB file and values are not placed in fixed position for each field.
Ex: XXXX|XXXX|XXXX|XXXX|OOOO
where OOOO is amount

Please anyone suggest me how to calculate sum for amount field which is 5th field in VB file.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1205
Location: Bamberg, Germany

PostPosted: Mon Sep 11, 2023 10:30 am
Reply with quote

You cannot with JCL/VSAM. Post your question in the proper section of the forum.
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 SFTP Issue - destination file record ... All Other Mainframe Topics 1
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
Search our Forums:

Back to Top