SORT card to sum the Amount fields of identical customer rec



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

SORT card to sum the Amount fields of identical customer rec

Postby akadelhi1 » Fri Oct 16, 2009 9:54 am

Hi ,
I have a flat file of length 20 bytes.
I have to check for identical records in the position 1 to 8 and 16 to 20 .
If there any identical records then i must sum the amount value which is available in the position 9 to 12(which is the profit field ) and 13 to 16 (which is the loss).
Can any one get a sort card for this
You do not have the required permissions to view the files attached to this post.
akadelhi1
 
Posts: 1
Joined: Fri Oct 16, 2009 9:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT card to sum the Amount fields of identical customer rec

 

Re: SORT card to sum the Amount fields of identical customer rec

Postby Frank Yaeger » Fri Oct 16, 2009 8:45 pm

It's difficult to tell what your data really looks like (ZD, PD?) but you can probably use SORT and SUM to do what you want. You can find all of the DFSORT books at:

http://www.ibm.com/support/docview.wss? ... g3T7000080

If you need more specific help, please show an example of the input records (relevant fields only) and what you expect for output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. Please don't attach files (especially in spreadsheet format). Just post the examples here inline using code tags.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post