371 BADSEGNUM TDSP Segments exceed the limit set by Server.
Explanation:
The maximum number of segments composing a stored procedure request have been exceeded or the DBCAREA field dbriSeg is not set to L in the case of creating a stored procedure whose number of segments is exactly equal to the maximum number of segments.
Remedy:
Reduce the size of the stored procedure or in the second case, set dbriSeg to L .