DBMS_OUTPUT.PUT_LINE(a) can print only 255 characters per line.
Try check it :

begin
test(aNum);
dbms_output.put_line(substr(aNum,1,255));
end;