I hav a doubt.
my input file is of length 850..
ACNO X(9) - POSITION 9
AMT S9(15)V9(3) - POSITION 347
for same accounts i need to sum the amount values and those with single accounts original amt value should be taken and written to the output file.
i used..
INREC FIELDS=(1,9,12:347,10)
SORT FIELDS=(9,9,CH,A)
SUM FIELDS=(10,10,PD)
but am gettin sum fields overlap..
can anyone help me out..
Summing up of values using Syncsort
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 11
- Joined: Tue Nov 13, 2007 1:57 pm
-
- Member
- Posts: 11
- Joined: Tue Nov 13, 2007 1:57 pm
i have one more doubt..
i have 3 input files
input file 1: FB/850 (duplicates exists)
---------------------------------------------
acct x(9) - position 9
amt s9(15)v9(3) comp-3 - postion 347
input file 2: FB/200:(no duplicates)
-----------------------
acct x(9) - postion 9
add x(3) - positon 114
input file 3: FB/162:(no duplicates)
----------------------
acct x(9) - position 1
balance s9(15)v9(3) comp-3 - postion 33 (declared as array with occurs 10 times)
here i need to
1) add the amt values for same accts
2) add the 10 balance values for a single account
3) and need to fetch the add for tat account for the input file 1
4) write all the 4 datas to a single output file.
that is
output file
-----------
add x(3)
acct x(9)
amt s9(15)v9(3)
balance s9(15)v9(3)
for eg:
input file 1:
-----------
aaaaaaaaa 2345
aaaaaaaaa 1234
bbbbbbbbb 1111
input file 2:
-------------
aaaaaaaaa ABC
bbbbbbbbb BCA
input file 3:
-------------
aaaaaaaaa 1 1 0 1 0 1 1 0 1 0(10 values of balance)
bbbbbbbbb 1 1 0 1 0 1 1 0 1 0 (")
output file:
-------------
ABC aaaaaaaaa 3579 6
BCA bbbbbbbbb 1111 6
is tis possible in a single sort??
i have 3 input files
input file 1: FB/850 (duplicates exists)
---------------------------------------------
acct x(9) - position 9
amt s9(15)v9(3) comp-3 - postion 347
input file 2: FB/200:(no duplicates)
-----------------------
acct x(9) - postion 9
add x(3) - positon 114
input file 3: FB/162:(no duplicates)
----------------------
acct x(9) - position 1
balance s9(15)v9(3) comp-3 - postion 33 (declared as array with occurs 10 times)
here i need to
1) add the amt values for same accts
2) add the 10 balance values for a single account
3) and need to fetch the add for tat account for the input file 1
4) write all the 4 datas to a single output file.
that is
output file
-----------
add x(3)
acct x(9)
amt s9(15)v9(3)
balance s9(15)v9(3)
for eg:
input file 1:
-----------
aaaaaaaaa 2345
aaaaaaaaa 1234
bbbbbbbbb 1111
input file 2:
-------------
aaaaaaaaa ABC
bbbbbbbbb BCA
input file 3:
-------------
aaaaaaaaa 1 1 0 1 0 1 1 0 1 0(10 values of balance)
bbbbbbbbb 1 1 0 1 0 1 1 0 1 0 (")
output file:
-------------
ABC aaaaaaaaa 3579 6
BCA bbbbbbbbb 1111 6
is tis possible in a single sort??
anu
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Since you stated in another post that you're using Syncsort, please post in the JCL Forum rather than in the DFSORT Forum. I'm moving this post to the JCL Forum.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page