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

Need to SUM SORT the amount fields defined in IMPLICIT forma


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pattabiraman.baskaran

New User


Joined: 10 Aug 2006
Posts: 23

PostPosted: Tue Mar 06, 2007 5:23 pm
Reply with quote

Hi,

I need to SUM SORT the amount fields defined in IMPLICIT format.

Input:

002001+000000000000000001
002001+000000000000000005
002001-000000000000000010
002001+000000000000000015

The input file has to be sorted on 1 to 6 and the sum sorting fields should be 7 to rest of the record.

Output:

I should have only one record having,

002001+000000000000000011

Kindly provide mw with a sort step.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Mar 06, 2007 8:58 pm
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  SORT FIELDS=(1,6,CH,A)
  OUTFIL NODETAIL,REMOVECC,
    SECTIONS=(1,6,
      TRAILER3=(1,6,
        TOT=(7,19,FS,EDIT=(STTTTTTTTTTTTTTTTTT),SIGNS=(+,-))))
/*
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Wed Mar 07, 2007 9:04 am
Reply with quote

Can you please explain each line , becasue it includes somany fields whihc I couldn't understand. apart from this the code didnt work out giving error.

Code:

ICE143I 0 BLOCKSET     SORT  TECHNIQUE SELECTED                               
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 21:23 ON TUE MAR
            SORT FIELDS=(1,6,CH,A)                                             
            OUTFIL NODETAIL,REMOVECC,                                         
            SECTIONS=(1,6,                                                     
            TRAILER3=(1,6,                                                     
            TOT=(7,19,FS,EDIT=(STTTTTTTTTTTTTTTTTT),SIGNS=(+,-))))             
                   $                                                           
ICE223A F REPORT FIELD ERROR
ICE052I 3 END OF DFSORT                                                       


So please check the above code reply with explanation.

even when I changed the field TRAILER3 to TRAILERS then also it gave the same error.

Regards
Amar
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 07, 2007 10:30 pm
Reply with quote

Amar,

The error message tells me your site is way behind on DFSORT service. You need DFSORT PTF UQ95213 to use a 19-byte FS field. That PTF has been available since Dec, 2004, but your site has not installed it. Ask your System Programmer to install DFSORT R14 PTF UK90006 (April, 2006). That will get you all of the latest DFSORT function.

Quote:
even when I changed the field TRAILER3 to TRAILERS then also it gave the same error.


TRAILER3 is a valid parameter. TRAILERS is not a valid parameter. You can't just randomly choose parameter names and expect it to work.

Quote:
Can you please explain each line , becasue it includes somany fields whihc I couldn't understand.


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top