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
 

 

Need to SUM SORT the amount fields defined in IMPLICIT forma

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need to SUM SORT the amount fields defined in IMPLICIT forma
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 Moderator


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

PostPosted: Tue Mar 06, 2007 8:58 pm    Post subject:
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: 200
Location: USA

PostPosted: Wed Mar 07, 2007 9:04 am    Post subject: Re: SUM SORTING the implicitly defined fields
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 Moderator


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

PostPosted: Wed Mar 07, 2007 10:30 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


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