Find the length of the longest line

Dear All,

To find the length of the longest line from a file i have used wc -L which is giving the proper output...

But the problem is AIX os does not support wc -L command.
so is there any other way 2 to find out the length of the longest line using awk or sed ?

Regards,
Pankaj

awk ' { if ( length > x ) { x = length } }END{ print x }' filename