View previous topic :: View next topic
|
Author |
Message |
krunal7757
New User
Joined: 01 Sep 2021 Posts: 6 Location: INdia
|
|
|
|
Infile 1
Code: |
000000000001H 09092021
000000000001XA11000010000000010000009092021 09082021 TESTDATA1
000000000001XB11000010100000020000009092021 09082021 TESTDATE2 |
Infile 2
Code: |
000000000002H 09092021
000000000002XC11000010000000010000009092021 09082021 TESTDATA1
000000000002XD11000010100000020000009092021 09082021 TESTDATE2
|
Both file have first record as header and other records are detials of cancel chq.
first 12 bytes are id number followed by record identifier
I need to merge the file to create one file having one trailer count but trailer count should not include the count of header records.
sort card i used: but it count the header record too resulting in incorrect data. Can you please help on this
Code: |
***************************** Top of Data ********
SORT FIELDS=(1,12,CH,A)
OUTFIL FNAMES=SORTOUT,
REMOVECC,
TRAILER1=(1:12X,13:'T',
14:COUNT=(M11,LENGTH=10),
24:TOT=(24,12,ZD,TO=ZD,LENGTH=12),115X) |
Coded for you |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
1) Make a search on this forum. Exactly this question has been answered approx. 1500 times.
2) Before posting, read the Forum Rules, and especially: how to use code tags when posting any code samples
3) Please, read carefully about the difference between JOIN, MERGE, and SORT operations. Which one do you really need? It is not clear from your post...
4) from your post it is also unclear: what output result do you expect? And what have you received with your code?
Unless you present enough information about your issue, there are not too many volunteers to do your own job instead of yourself. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1335 Location: Bamberg, Germany
|
|
|
|
Seriously, these cross postings to wrong sections of the forums have to stop. WTH does this have to do with Java & MQSeries? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1335 Location: Bamberg, Germany
|
|
|
|
Make for ex a separate counter when you don't have Header records, using SEQNUM. Use that field in TRAILER1. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Joerg.Findeisen wrote: |
Make for ex a separate counter when you don't have Header records, using SEQNUM. Use that field in TRAILER1. |
None of us (including the TS) has any initial idea: what to do with two input datasets? The only SORT statement would not help... |
|
Back to top |
|
|
|