Component Comment Lines
Callouts are not available on Solo Edition.
These callouts add comment lines to a component when it is written to a physical location with a storage format of M. The callout must be written as a line label or routine call.
R, INT, WLD, INC and MAC Components
Usage
do label^routine(lcode,addr,obv,cret,id)
Inputs
lcode |
Location code |
addr |
Physical Address |
obv |
Object version |
cret |
Component reference |
id |
Unique ID of temporary global |
CLS Components
1. Setting the standard comment lines included by default, to appear or not appear:
The inclusion of the standard comment block is determined by the setting in:
^%vcct(componentType,“param“,“statusTableShape“)
Where componentType represents the various file types such as: BIN, CLS, CSP, CSR, G, GZ, INC, INT, MAC and T.
The inclusion of the standard comment lines can consequently be set for each type.
To prevent these being included for a particular component type, set the appropriate reference above to “none“.
2. Adding personal comment lines
Write a block of code to add the desired content to include in the comment lines, for example:
%vcmzClsComment ;My Callouts
q
classSave(context) ;Class save callout ^%vcvc("class_save")
n cname,classdef
;
s cname=context("Class")
s classdef=##class(%Dictionary.ClassDefinition).%OpenId(cname)
s classdef.Description=";vc; "_$h_$C(13,10)_";vc; "_context("ObjectVersion")
;
d classdef.%Save()
d classdef.%Close()
q
NOTE: The usage above utilizes the Description element of ‘context’ to add various details which can be concatenated together and can include a carriage return/line feed in order to generate multilple commented lines.
The above example generates 2 comment lines as below:
/// ;vc; 66095,65383
/// ;vc; Max.Class1.CLS/MP.6
3. Point the system to the routine written to add personalised comments
Set ^%vcvc(“class_save“)=classSave^%vcmzClsComment (Note the underscore)
Examples
See routines %vc580, %vc660, %vc661 and %vc662.