Hi ALL,
I have my input file of 20 lenght, 1st 5 are member-code , rest 15 are each member's value.
------------------------
0318900000012345876I
0451200000000012416D
0451800000000469576{
0456600000000739660H
0459900000000067484B
0804400000000000000{
0806800000022749564E
1) I want in my output file only Member Code 08068 and 08072 and Its
value. If these 2 codes found more than once then its value needs to
be summed up.
2) If any of these 2 codes are not present then Output should come as
below
08068000000000000000 -> if 08068 is missing
08072000000000000000 -> if 08072 is missing
I m able to write 1st condition but not the second.
Can anyone pls help.
As i said, I have tried for 1st condition: Below Sortcard depicts datatype also.
SORT FIELDS=(1,7,CH,A)
INCLUDE COND=(1,7,CH,EQ,C'08072',OR,1,7,CH,EQ,C'08068')
SUM FIELDS=(8,15,ZD)
As i said, I have tried for 1st condition: Below Sortcard depicts datatype also.
SORT FIELDS=(1,7,CH,A)
INCLUDE COND=(1,7,CH,EQ,C'08072',OR,1,7,CH,EQ,C'08068')
SUM FIELDS=(8,15,ZD)
but I m not able to code for 2nd condtion.
This contradicts with your original post.. you said
LRECL is 20 (5 byte key and 15 byte value)
but
here it looks
LRECL is 22 (7 byte key and 15 bytes value)
Anyways, I take it as 20 byte LRECL with 5 byte key (modify if needed)
You are simply genious my frnd....
I was thinking of all complicated way but u provided such a simple solution..!!
Superb !! Excellent !! Thanks a ton.
You are simply genious my frnd....
I was thinking of all complicated way but u provided such a simple solution..!!
Superb !! Excellent !! Thanks a ton.