My output should merge on the basis of Product Name & Product Type Like
for ADAAA, it should be like
ADAAA followed by Prod tran 95-05929 (of Prod type 00000001100 ), followed by Prod tran 95-05961 (of Prod type 00000001200)....and so on.
Please note that :
For Product Name ADAAV we have Prod type 00000004100 & 00000004800 only (so its Prod trans should come in 7th and 10 position respectively)
For Product Name ADAEH we have Prod type 00000001100 only, so its prod tran should come in 1st position as below (all subsequent positions should be blank)
ADAEH 95-05929
For Product Name ADAEI we have Prod type 00000008100 only, so its prod tran should come in 13th position (all previous positions should be blank)
ADAEH 95-05929
So my Ouput should look like;
Code:
ADAAA 95-05929 95-05961 95-23385.........so on
ADAAB 95-05929 95-05961 95-23385.........so on
ADAAV {first 6 pos blank) then 95-05988 (in 7th pos) then 8-9 pos blank, then 95-06542 (in 10th pos) then all other blanks}
ADAEH 95-05929
ADAEI {first 12 pos blank followed by 95-06737 (in 13th pos)}
Please help me, how we can merge record on the basis of above criteria.
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Thu Jul 07, 2016 9:58 am Post subject:
Mahesh_Gandla,
1. Please stop the same question in multiple forums. I have deleted the duplicate topics.
Now coming to the request, Please answer the following questions
1. What is the LRECL and RECFM of the input file?
2. What is the maximum number of "Product type" do you have?
3. What is the order of the Product type? ie. how did you determine (00000004100 & 00000004800 should have rank 7 and 10 respectively) So if you have another product type 00000002222 will the rank of 00000004100 & 00000004800 change? _________________ Kolusu
www.linkedin.com/in/kolusu
Thanks for the prompt reply.
1) The input file record format is FB and LRECL is 70 (Col 1-5 is Product Name, Col 8-15 is Product Tran, Col 18-28 is Product Type, Col 29-70 are blank).
2) Max number of product type will be 13 (as given for Product Name ADAAA & ADAAB) in below order
00000001100
00000001200
00000001300
00000001301
00000001600
00000001630
00000004100
00000004195
00000004400
00000004800
00000006400
00000006410
00000008100
3) Order of Product type is mentioned above.
As 00000004100 in above mentioned Product type comes at no 7 & 00000004800 comes at number 10, therefore for any Product Name (say ADAAA or ADAAV), their corresponding Product Trans should come in that position only.
No, we will have only above Product types (00000002222 won't be there)
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
ADAAA 95-05929 95-05961 95-23385 95-06462 95-23414 95-06219 95-05988...so on
ADAAB 95-05929 95-05961 95-23385 95-06462 95-23414 95-06219 95-05988...so on
ADAAV 95-05988...so on
ADAEH 95-05929
ADAEI {95-06737 in 13th position as Product Type for this is 00000008100 only}
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Thu Jul 07, 2016 1:31 pm Post subject:
Mahesh_Gandla,
Use the following DFSORT/ICETOOL JCL which will give you the desired results. I assumed your data is already sorted on the Product Name. If it is not then all you need is to remove OPTION COPY statement in CTL1CNTL
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum