Midware Ltd.
|
Sign-up for e-mail notifications
|
One of the more robust features of ILE is the ability to define customized parameter lists (interfaces) for procedures. In addition to defining the field lengths and types, you can also define fields that are optional (or may be omitted), constants, parameters passed by value, and much more. You can also define character strings to have a variable length. This is an important feature if you develop procedure to do string manipulation (such as parsing words from a sentence). Use the OPTIONS(*VARSIZE) keyword in the procedure interface and prototype to define a variable length string. It is important however, not just to define the field as variable length, but also to retrieve the actual length of the field passed. To do this, you need to explicitly code the procedure to pass operational descriptors. This is done by coding the OPDESC keyword on the procedure itself. Then, use the IBM-supplied API CEEDOD to retrieve the length of the passed parm. See the variable size strings page of the RPG IV tutorial section for examples of all this. |
Send mail to midware@midwareservices.com
with questions or comments about this web site. Last Modified: September 15, 2000 |