ILE COBOL Language Reference

BY CONTENT Phrase

The value of a parameter passed through the BY CONTENT phrase is evaluated when the CALL statement runs. This value is assigned to the corresponding parameter of the called program.

For each ILE COBOL item passed BY CONTENT, a copy of the item is made in the calling program, and a pointer to this copy passes to the called program. Changes made to the parameter in the called program do not affect the data item of the calling program. The number of characters in each parameter must be equal; however, the data descriptions need not be the same.

identifier-2
Must be defined as a level-01, level-77, or elementary data item in the File, Working-Storage, Local-Storage or Linkage Sections. It must not be a function-identifier.

+-------------------------------IBM Extension--------------------------------+

It can be a:

+----------------------------End of IBM Extension----------------------------+

+-------------------------------IBM Extension--------------------------------+

ADDRESS OF special register
For information about this special register, see page "ADDRESS OF Special Register".
ADDRESS OF a data item
For information about this, see page "ADDRESS OF".
LENGTH OF special register
The LENGTH OF special register contains the number of bytes used by a data item referenced by an identifier. For more information, see LENGTH OF Special Register.
literal-2
Can be:
file-name-1
Must appear in an FD entry. It passes a pointer data item.
OMITTED
For standard parameters when a parameter is passed BY CONTENT, a pointer to a copy of the data item is passed to the called program. When OMITTED is specified, a NULL pointer is passed to the called program. In this case, the called program will use its default value.

OMITTED can only be specified on calls to programs with a LINKAGE TYPE of procedure.

+----------------------------End of IBM Extension----------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]