Pathmaker Reference Manual
Macro Definition and Commands
Macro Language
067869 Tandem Computers Incorporated 3–5
Example
The following statement defines a macro that sets the length of variable columns.
Note the extensive use of construct variables, for example, #SERVICE-FILES.
?SECTION ComputeVarcharLen
 8000-Compute-Varchar-Length.
*
%iterate #Service-files thru lines until tag label-200
%if #File-system = “SQL” use lines until tab label-300
%iterate #Items thru lines until tag label-400
%if #Item -Is-VarChar = “Y” use lines until tab label-500
 PERFORM VARYING LEN OF $#Item-Name$
 OF $#File-Logical-Name$
 FROM $#Item-Length$ BY -1 UNTIL
 ( VAL OF $#Item-Name$
 OF $#File-Logical-Name$
 ( LEN OF $#Item-Name$
 OF $#File-Logical-Name$ : 1)
 NOT = “ “ ) OR
 ( LEN OF $#Item-Name$
 OF $#File-Logical-Name$ = 0)
 CONTINUE
 END-PERFORM.
*
%end-if label-500 ! #Item-Is-VarChar
%end-iterate label-400 ! #Items
%end-if label-300 ! #File-system
%end-iterate label-200 ! #Service-files










