1 /* BEGIN fort_create_node.incl.pl1 */
 2 
 3 /* Created:         October 1977, Richard Barnes
 4 
 5    Modified:
 6           22 May 1978, DSL - add create_constant.
 7           09 Oct 1978, PES - make create_(constant node) return fixed bin(18) unsigned.
 8           13 Dec 1978, PES - changes for large common and arrays.
 9 */
10 create_node:   proc(type,length) returns(fixed bin (18));
11 
12 dcl       length                        fixed bin;
13 dcl       offset                        fixed bin(18);
14 dcl       type                          fixed bin(4);
15 dcl       storage(length)               fixed bin aligned based;
16 dcl       x(0:operand_max_len-1)        fixed bin(35) aligned based(operand_base);
17 dcl       (addr,char,ltrim,unspec)      builtin;
18 
19 
20           if (length + next_free_operand) < operand_max_len
21              then do;
22                   offset = next_free_operand;
23                   next_free_operand = next_free_operand + length;
24                   unspec(addr(x(offset)) -> storage) = "0"b;
25                   addr(x(offset)) -> node.node_type = type;
26                   return(offset);
27                   end;
28              else do;
29                     call print_message(407, "operand region", ltrim(char(operand_max_len))); /* FATAL */
30                   end;
31 
32           end create_node;
33 
34 /* END fort_create_node.incl.pl1 */