View previous topic :: View next topic
|
Author |
Message |
Dinesh Venkata
New User
Joined: 28 Apr 2022 Posts: 3 Location: INDIA
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2146 Location: USA
|
|
|
|
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 |
|
|
Dinesh Venkata
New User
Joined: 28 Apr 2022 Posts: 3 Location: INDIA
|
|
|
|
What is code button? sorry I am new to this forum |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2146 Location: USA
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2146 Location: USA
|
|
|
|
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 |
|
|
Dinesh Venkata
New User
Joined: 28 Apr 2022 Posts: 3 Location: INDIA
|
|
|
|
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 |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
And the results of your code are? |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1338 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2146 Location: USA
|
|
|
|
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 |
|
|
|