Hiya Vijay,
The best option is to split the proc into smaller proc.
What might be happening is with a stored proc being close to 12,000 lines the sysprocedures may be running out of sequence number. The datatype is smallint, which means the max number of lines for an object is 32,767.
On ASE 12.5 the sequence column datatype is int, if you don't want to split the proc maybe go to 12.5
Cheers
Willy