Pig latin code error
When we do grouping of the data, Pig creates a new key named "group" and puts all the tuple matching that key into a bag and associates the bag with the key. So after the group operation schema of the grouped data will be something like 

raw = load '$input' using PigStorage('\u0001') as (id1:int, name:chararray);
groupdata1 = group raw by (id1,name);  
describe groupdata1;
{group: (id1: int,name: chararray),raw: {(id1: int,name: chararray)}}


The 'GROUP' in line 4 you are trying to access is one of the attribute of the schema from the last statement. These attribute name are case sensitive. It will produce the error saying it doesn't exist in the schema. So you need to use 'group' only to access it.