String Parameters of Various Lengths
June 19, 2002 Timothy Prickett Morgan
In the May 29 issue of Midrange Guru, OS/400 Edition, you describe a method for passing string parameters of variable length to a subprocedure. This possibility has some risks.
The subprocedure must guarantee that it only changes the data passed to it by the caller.
For example, suppose a parameter field in the called program or procedure is defined with a length of 15 bytes. A calling procedure passes five bytes. The API CEEDOD determines a length of five bytes, which is correct, but the length of the parameter field is however unchanged. If contents of the