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

DFSORT/SYNCSORT/ICETOOL


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

New User


Joined: 28 Apr 2022
Posts: 3
Location: INDIA

PostPosted: Fri Apr 29, 2022 12:07 am
Reply with quote

Hi,
i have the daily transaction file File1 from which i need to sum up the amounts for each policy and move that sum amount to populate a field field2 on another master file file2 for the same policy. Can any one help me on using DFSORT/Syncsort. Can it be achieved thru DFSORT/Syncsort/Icetool

File 1 -
Field 1 Field 2
X(10) S9(9)V99
Policy1 amt1
Policy2 amt2
Policy2 amt3
policy3 amt4
policy4 amt5
policy4 amt6

The second file should have the summed up amount values from file1 for each policy
File 2
Field 1 Field 2
X(10) S9(9)V99
Policy1 amt1
Policy2 amt2+amt3
Policy3 amt4
Policy4 amt5+amt6
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2146
Location: USA

PostPosted: Fri Apr 29, 2022 12:09 am
Reply with quote

Dinesh Venkata wrote:
Can it be achieved thru DFSORT/Syncsort/Icetool


Yes, this can be achieved.

First of all, learn how to use the Code button?, when posting your messages.
Otherwise - no response at all.

The second thing to do - please present here what have you tried so far? (Do not forget to use the Code button when presenting.)
Otherwise - no response as well.
Back to top
View user's profile Send private message
Dinesh Venkata

New User


Joined: 28 Apr 2022
Posts: 3
Location: INDIA

PostPosted: Fri Apr 29, 2022 12:13 am
Reply with quote

What is code button? sorry I am new to this forum
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2146
Location: USA

PostPosted: Fri Apr 29, 2022 12:17 am
Reply with quote

Dinesh Venkata wrote:
What is code button? sorry I am new to this forum

When you enter your letters into the text window, there are more than 10 buttons just above that window, to format your text in any appropriate manner. One of them is the Code button.
Code:
The text formatted with Code button should look like this example.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2146
Location: USA

PostPosted: Fri Apr 29, 2022 12:33 am
Reply with quote

After learning about text formatting rules at this forum, please RTFM on any SORT product.
In particular, how to use the following statements:
Code:
 SORT FIELDS=...
 SUM FIELDS=...
 OUTFIL SECTIONS=(...,TRAILER3=(...))

This is as mandatory as learning the Multiplication Table prior to joining any Accountant position.
There are no exceptions.
Back to top
View user's profile Send private message
Dinesh Venkata

New User


Joined: 28 Apr 2022
Posts: 3
Location: INDIA

PostPosted: Fri Apr 29, 2022 4:18 am
Reply with quote

Thanks. I have gone thru the SORT product

Here is the code that I am trying to use for my above requirement.

Code:
SORT FIELDS=COPY                                 
OUTFIL SECTIONS=(1,10,                                   
 TRAILER3=(12:TOT=(12,6,PD,X'FFFFFFFFFFFF)))


Please correct me or educate me here.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Apr 29, 2022 5:43 am
Reply with quote

And the results of your code are?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Fri Apr 29, 2022 10:06 am
Reply with quote

Dinesh Venkata wrote:
Here is the code that I am trying to use for my above requirement.

Code:
SORT FIELDS=COPY                                 
OUTFIL SECTIONS=(1,10,                                   
 TRAILER3=(12:TOT=(12,6,PD,X'FFFFFFFFFFFF)))

Check Syntax and have a look at Chapter "DFSORT formats for COBOL data types"
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2146
Location: USA

PostPosted: Fri Apr 29, 2022 9:21 pm
Reply with quote

Joerg.Findeisen wrote:
Dinesh Venkata wrote:
Here is the code that I am trying to use for my above requirement.

Code:
SORT FIELDS=COPY                                 
OUTFIL SECTIONS=(1,10,                                   
 TRAILER3=(12:TOT=(12,6,PD,X'FFFFFFFFFFFF)))

Check Syntax and have a look at Chapter "DFSORT formats for COBOL data types"


Prior to checking syntax I would recommend to check carefully all possible error messages (secretly hidden from the forum)!

BTW: I forgot to mention that besides of SORT control statements there are also some JCL statements required to run this SORT job...
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 Syncsort help SYNCSORT 3
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
No new posts SYNCSORT-DB2 interface SYNCSORT 0
No new posts ICETOOL to SUM String DFSORT/ICETOOL 1
No new posts DFSORT GUID DFSORT/ICETOOL 5
Search our Forums:

Back to Top