- Log in to post comments
User bio
my video https://youtu.be/zx6WoApljBI
my business story https://community.intersystems.com/post/45-years-intersystems-1978-2023
- main languages: German, English, Italian, French, Spanish, Latin, ..
- private: married since 1969, 3 successful children
Member since Jul 21, 2017
Posts:
Replies:
assuming Document.StreamGC is of type %Stream.Object you may
use method FindAt which combines Read() and Contains()
see: method FindAt()
method FindAt(position As %Integer, target As %RawString,
ByRef tmpstr As %RawString = "", caseinsensitive As %Boolean = 0) as %Integer
Find the first occurrence of target in the stream, starting the search at position.
The method returns the position of this match, counting from the beginning of
the stream, and leaves the stream positioned at an indeterminate location.
If it does not find the target string, it returns -1.
If position=-1 then it starts searching from the location found in the
previous search and returns the offset from the last search.
This is useful for searching through the entire file.
If you are doing this, you should pass in tmpstr by reference in every call.
This is used to store the last buffer read, so the next call will start
where the last one left off.
If caseinsensitive=1 then the search will be case insensitive,
rather than the default case-sensitive search.- Log in to post comments
A very dirty hack: possible not really a recommendation
IF Source table is not mapped to ONS
- copy class definition including <Storage> from ENS to ONS
- in <STORAGE> you see
-
<DataLocation>^Sample.EmployeeD</DataLocation> <IdLocation>^Sample.EmployeeD</IdLocation> <IndexLocation>^Sample.EmployeeI</IndexLocation> <StreamLocation>^Sample.EmployeeS</StreamLocation> - Now replace all ^ by ^|"ENS"| looks similar
For my example, it's ^|"SAMPLES"| -
<DataLocation>^|"SAMPLES"|Sample.EmployeeD</DataLocation> <IdLocation>^"|SAMPLES"|Sample.EmployeeD</IdLocation> <IndexLocation>^|"SAMPLES"|Sample.EmployeeI</IndexLocation> <StreamLocation>^|"SAMPLES"|Sample.EmployeeS</StreamLocation> - Extended Global references allow access to the other namespace. Nothing new, but risky
- Log in to post comments
Open Exchange applications:
Certifications & Credly badges:
Robert has no Certifications & Credly badges yet.
Followers:
Following:
THANKS for your feedback !