SPOOL to SQL how ?

Primary tabs


Simply map the ^SPOOL global to a class and get a table %ZZ.SPOOL

like this:

/// Get SQL Access to ^SPOOL
Class %ZZ.SPOOL Extends %Persistent [ Final, SqlRowIdPrivate, StorageStrategy = SpoolSQL ]

  Property Document As %Integer [ ReadOnly ];
 Property LineNumber As %Integer [ ReadOnly ];
Property Text As %String(MAXLEN = "") [ ReadOnly ];
Index idx On (Document, LineNumber) [ IdKey ];

Storage SpoolSQL

<SQLMap name="Spool">
<Data name="Text">
<Subscript name="1">
<Subscript name="2">
} }


Any reason why you use


instead of:



 @ some version in past the code generator struggled with $c(13,10) disliking the  "," for some reason.


In Ensemble what would be a real life scenario where we can make use of spooling?


every log or similar document that should not see your OS environment is a candidate for SPOOL
eg. sequentially collected by assigning dedicate doc numbers.