If a procedure has a BYADDR parameter which it uses as input only, it is best to declare that parameter as NONASSIGNABLE (rather than letting it get the default attribute of ASSIGNABLE). If that procedure is later called with a constant for that parameter, the compiler can put that constant in static storage and pass the address of that static area.
This practice is particularly useful for strings and other parameters that cannot be passed in registers (input-only parameters that can be passed in registers are best declared as BYVALUE).
In the following declaration, for instance, the first parameter to getenv is an input-only CHAR VARYINGZ string:
dcl getenv entry( char(*) varyingz nonasgn byaddr,
pointer byaddr )
returns( native fixed bin(31) optional )
options( nodescriptor );
If this function is invoked with the string 'IBM_OPTIONS', the compiler can pass the address of that string rather than assigning it to a compiler-generated temporary storage area and passing the address of that area.