while i was trying your suggestion, I was not able to do the sum in joinkey subtask JNF1CNTL,was getting error as sort fields not supported in joinkey subtask,if you have any sample card for this pls let me know.
and in the meantime i got a simpler solution for my problem.
//STEP EXEC SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
// DD *
//SORTOUT DD SYSOUT=*
//SYSIN DD *
Can you post the full sysout for the error on JNF1CNTL, please?
With your new solution, don't you get "extra" records counted from the second file? And what about the format of the leading zeros which you wanted? And where has your "zero" record gone for C? (these are all inter-connected).
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE417I 0 THIS IS THE JOINKEYS F1 SUBTASK FOR SORTJNF1
ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 11:59 ON WED
ICE427A 0 SORT STATEMENT CANNOT BE USED WITH JOINKEYS SUBTASK
ICE751I 0 C5-K76982 C6-K90026 E7-K70685
ICE146I 1 END OF STATEMENTS FROM JNF1CNTL - PARAMETER LIST STATEMENTS FOLLOW
ICE052I 3 END OF DFSORT
for extra record ,i am using the SUBstract,i would get the o/p as