Vitaliy Serdtsev · Apr 13, 2019 go to post

Here is a small example:

<FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008000">JSON_ARRAYAGG</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#808000">JSON_OBJECT</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">'ID'</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">ID</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008080">'Age'</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">Age</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008080">'SSN'</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#008000">SSN</FONT><FONT COLOR="#000000">)) </FONT><FONT COLOR="#000080">from </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000080">top </FONT><FONT COLOR="#000000">3 </FONT><FONT COLOR="#008000">ID</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">Age</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">SSN </FONT><FONT COLOR="#000080">from </FONT><FONT COLOR="#008000">sample</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">person</FONT><FONT COLOR="#000000">)</FONT>
Result:
<FONT COLOR="#ff00ff">[{</FONT><FONT COLOR="#008000">"ID"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#000000">1</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#008000">"Age"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#000000">59</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#008000">"SSN"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#008000">"502-68-5767"</FONT><FONT COLOR="#ff00ff">}</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#ff00ff">{</FONT><FONT COLOR="#008000">"ID"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#000000">2</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#008000">"Age"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#000000">6</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#008000">"SSN"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#008000">"169-66-9969"</FONT><FONT COLOR="#ff00ff">}</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#ff00ff">{</FONT><FONT COLOR="#008000">"ID"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#000000">3</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#008000">"Age"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#000000">64</FONT><FONT COLOR="#808080">,</FONT><FONT COLOR="#008000">"SSN"</FONT><FONT COLOR="#808080">:</FONT><FONT COLOR="#008000">"868-61-3642"</FONT><FONT COLOR="#ff00ff">}]</FONT>
Vitaliy Serdtsev · Apr 10, 2019 go to post

Then it's better:

<FONT COLOR="#000080">Method </FONT><FONT COLOR="#000000">Get() </FONT><FONT COLOR="#000080">As %String </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">CodeMode </FONT><FONT COLOR="#000000">= objectgenerator, NoContext]
{
  </FONT><FONT COLOR="#0000ff">d</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#800000">%mode</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"propertymethod" </FONT><FONT COLOR="#800000">%code</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">WriteLine</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"  q ..Test()"</FONT><FONT COLOR="#000000">)
  </FONT><FONT COLOR="#0000ff">q $$$OK
</FONT><FONT COLOR="#000000">}</FONT>
Vitaliy Serdtsev · Apr 10, 2019 go to post
NoContext helped. What does it mean?
NoContext With the same success it is possible to specify NoContext for the class:
Class Test.String Extends %String [ NoContext ]
{

</FONT><FONT COLOR="#000080">Method </FONT><FONT COLOR="#000000">Get() </FONT><FONT COLOR="#000080">As %String </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">CodeMode </FONT><FONT COLOR="#000000">= objectgenerator ] {   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">%code</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">WriteLine</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"  q $this.Test()"</FONT><FONT COLOR="#000000">)   </FONT><FONT COLOR="#0000ff">q $$$OK </FONT><FONT COLOR="#000000">}

}</FONT>

This works too btw:
It doesn't work for me:

MPP5376 : Method or Property 'Test' does not exist in this class.

Vitaliy Serdtsev · Apr 10, 2019 go to post

Try this

<FONT COLOR="#000080">Class Test.String Extends %String
</FONT><FONT COLOR="#000000">{

</FONT><FONT COLOR="#000080">Method </FONT><FONT COLOR="#000000">Get() </FONT><FONT COLOR="#000080">As %String </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">CodeMode </FONT><FONT COLOR="#000000">= objectgenerator, NoContext ] {   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">%code</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">WriteLine</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"  q $this.Test()"</FONT><FONT COLOR="#000000">)   </FONT><FONT COLOR="#0000ff">q $$$OK </FONT><FONT COLOR="#000000">}

}</FONT>

Vitaliy Serdtsev · Apr 8, 2019 go to post

You can do it even easier:

<FONT COLOR="#800080">&sql(</FONT><FONT COLOR="#0000ff">SELECT </FONT><FONT COLOR="#000000">{</FONT><FONT COLOR="#000080">fn </FONT><FONT COLOR="#808000">TIMESTAMPDIFF</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">SQL_TSI_HOUR</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#808000">CURRENT_TIMESTAMP</FONT><FONT COLOR="#000000">(3),</FONT><FONT COLOR="#800000">:tx</FONT><FONT COLOR="#000000">)}</FONT><FONT COLOR="#800080">)</FONT>

Small example:

<FONT COLOR="#800080">&sql(</FONT><FONT COLOR="#0000ff">SELECT </FONT><FONT COLOR="#808000">CURRENT_TIMESTAMP</FONT><FONT COLOR="#000000">(3),
            {</FONT><FONT COLOR="#000080">fn </FONT><FONT COLOR="#808000">TIMESTAMPADD</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">SQL_TSI_MINUTE</FONT><FONT COLOR="#000000">,67,</FONT><FONT COLOR="#808000">CURRENT_TIMESTAMP</FONT><FONT COLOR="#000000">(3))} </FONT><FONT COLOR="#000080">into </FONT><FONT COLOR="#800000">:txBefore</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">:txAfter</FONT><FONT COLOR="#800080">)
</FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#800000">txBefore</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">" -> "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">txAfter</FONT><FONT COLOR="#000000">,!!

</FONT><FONT COLOR="#800080">&sql(</FONT><FONT COLOR="#0000ff">SELECT </FONT><FONT COLOR="#000000">{</FONT><FONT COLOR="#000080">fn </FONT><FONT COLOR="#808000">TIMESTAMPDIFF</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">SQL_TSI_HOUR</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#808000">CURRENT_TIMESTAMP</FONT><FONT COLOR="#000000">(3),</FONT><FONT COLOR="#800000">:txAfter</FONT><FONT COLOR="#000000">)},             {</FONT><FONT COLOR="#000080">fn </FONT><FONT COLOR="#808000">TIMESTAMPDIFF</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">SQL_TSI_HOUR</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">:txBefore</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">:txAfter</FONT><FONT COLOR="#000000">)} </FONT><FONT COLOR="#000080">into </FONT><FONT COLOR="#800000">:r1</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">:r2</FONT><FONT COLOR="#800080">) </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#800000">r1</FONT><FONT COLOR="#000000">,!,</FONT><FONT COLOR="#800000">r2</FONT>

Result:

USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">^test</FONT>
2019-04-08 08:51:34.916 -> 2019-04-08 09:58:34.916

1 1 USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">^test</FONT> 2019-04-08 08:55:11.907 -> 2019-04-08 10:02:11.907

2 2

Vitaliy Serdtsev · Apr 4, 2019 go to post

This setting does not affect users experience. Before enabling, make sure you have Username/Password and/or System_Manager set, otherwise any user will be able to manage your CSP gateway. Everything is described in detail in the link I mentioned above, so I can hardly add anything more than that.

Vitaliy Serdtsev · Apr 4, 2019 go to post

There are two ways to define views, so I'll give you both options:

  1. <FONT COLOR="#000080">/// bla-bla-bla:<ul>
    /// <li>Name - Person's name;</li>
    /// <li>SSN - Person's Social Security number. This is validated using pattern match;</li>
    /// <li>DOB - Person's Date of Birth.</li></ul>
    Class view.Person </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">ClassType </FONT><FONT COLOR="#000000">= view, </FONT><FONT COLOR="#000080">CompileAfter </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">Sample.Person</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">DdlAllowed</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">Not ProcedureBlock</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">ViewQuery </FONT><FONT COLOR="#000000">= { </FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008000">Name</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">SSN</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">DOB </FONT><FONT COLOR="#000080">from </FONT><FONT COLOR="#008000">Sample</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">Person</FONT><FONT COLOR="#000000">} ]
    {
    

    }</FONT>

  2. /// This sample persistent class represents a person.
    /// <p>Maintenance note: This class is used by some of the bindings samples.
    Class Sample.Person Extends (%Persistent%Populate%XML.Adaptor)
    {
    

    ...

    </FONT><FONT COLOR="#000080">/// bla-bla-bla:<ul> /// <li>Name - Person's name;</li> /// <li>SSN - Person's Social Security number. This is validated using pattern match;</li> /// <li>DOB - Person's Date of Birth.</li></ul> Query </FONT><FONT COLOR="#000000">viewPerson() </FONT><FONT COLOR="#000080">As %SQLQuery </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">SqlView</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#000080">SqlViewName </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#008000">viewPerson </FONT><FONT COLOR="#000000">] { </FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008000">Name</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">SSN</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">DOB </FONT><FONT COLOR="#000080">from </FONT><FONT COLOR="#008000">Sample</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">Person </FONT><FONT COLOR="#000000">}

    ...

    }</FONT>

Now take a look at these classes from Documatic.
Vitaliy Serdtsev · Mar 28, 2019 go to post

See:

<FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000080">* from </FONT><FONT COLOR="#008000">%Library</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">SQLCatalog_SQLReservedWords</FONT><FONT COLOR="#000000">()</FONT>
<FONT COLOR="#0000ff">$SYSTEM</FONT><FONT COLOR="#008080">.SQL</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">IsReservedWord</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">word</FONT><FONT COLOR="#000000">)</FONT>
Vitaliy Serdtsev · Mar 20, 2019 go to post

For example, you can export them all to a single file:

SAMPLES><FONT COLOR="#0000ff">d $system</FONT><FONT COLOR="#008080">.OBJ</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">ExportPattern</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">".dfi"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"c:\exportAllDFI.xml"</FONT><FONT COLOR="#000000">,,,</FONT><FONT COLOR="#008000">"UTF8"</FONT><FONT COLOR="#000000">)</FONT>
You can get the list as follows (doc): <FONT COLOR="#0000ff">select </FONT><FONT COLOR="#008000">Name </FONT><FONT COLOR="#000080">from </FONT><FONT COLOR="#008000">%Library</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">RoutineMgr_StudioOpenDialog</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">'.dfi'</FONT><FONT COLOR="#000000">)</FONT>
Vitaliy Serdtsev · Mar 20, 2019 go to post

First, I would not use the input values directly in the query text, but would use Input Host Variables Second, if it is necessary, it is more elegant to use the following syntax:

<FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">stmt </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">##CLASS</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%SQL.Statement</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%New</FONT><FONT COLOR="#000000">()
</FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">query </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$$$FormatText</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"Select Val1, Val2 FROM Table WHERE Val1=%1"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#0000ff">$$$quote</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"SomeCondition"</FONT><FONT COLOR="#000000">))</FONT>
Ideally these should be : &SQL(SELECT Val1, Val2 INTO :val1, :val2 FROM Table WHERE Val1='SomeCondition')
This is and now works:
&SQL(SELECT Val1Val2
               INTO :val1:val2
               FROM "Table"
               WHERE "Val1"='SomeCondition')
Vitaliy Serdtsev · Mar 14, 2019 go to post
Let's try to guess the return value of method t1().
Is that supposed to be hard? I immediately visually determined the result 20.

To be honest I don't really understand the point which the author wanted to convey. Maybe it's the lack of English.

In this case, the t3 method code is equivalent to the following code:
ClassMethod t3(ByRef pAByRef pB) [ ProcedureBlock = 1 ]
{
  set pA=4, pB=5
  set x=$increment(pA)*$increment(pB)
}
PS: by the way, absolutely nothing will change fundamentally if you replace "return" with "quit" (and "ByRef" with "Output").
Vitaliy Serdtsev · Mar 12, 2019 go to post

Hi Ponnumani.

I would like to make a number of clarifications:

  • <FONT COLOR="#000080">VALUELIST </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"A A- B B- O"</FONT> -> <FONT COLOR="#000080">VALUELIST </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">" A A- B B- O"</FONT>
  • it is necessary to consider the order of the fields in the global on the basis of Storage. For example, I have following Storage:
    <Data name="samplexlsconversionDefaultData">
    <Value name="1">
    <Value>%%CLASSNAME</Value>
    </Value>
    <Value name="2">
    <Value>name</Value>
    </Value>
    <Value name="3">
    <Value>DOB</Value>
    </Value>
    <Value name="4">
    <Value>address</Value>
    </Value>
    <Value name="5">
    <Value>PhoneNumber</Value>
    </Value>
    <Value name="6">
    <Value>BloodGroup</Value>
    </Value>
    </Data>
  • need to add check for the presence of double quotes in strings, e.g. bla"bla
  • the date format for CSV should not be in the internal Caché format, because the date 37893 to users of other system/DBMS nothing says unlike e.g. 1944-09-30.
I still prefer to use built-in tools when they are there, rather than reinventing the wheel.
Class User.samplexlsconversion Extends (%Persistent%Populate)
{

</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">name </FONT><FONT COLOR="#000080">As %String</FONT><FONT COLOR="#000000">;

</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">DOB </FONT><FONT COLOR="#000080">As %Date</FONT><FONT COLOR="#000000">;

</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">address </FONT><FONT COLOR="#000080">As %String</FONT><FONT COLOR="#000000">;

</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">PhoneNumber </FONT><FONT COLOR="#000080">As %Numeric</FONT><FONT COLOR="#000000">;

</FONT><FONT COLOR="#000080">Property </FONT><FONT COLOR="#000000">BloodGroup </FONT><FONT COLOR="#000080">As %String</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">VALUELIST </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">" A A- B B- O"</FONT><FONT COLOR="#000000">);

</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">TestExport2CSV() {      </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">..</FONT><FONT COLOR="#0000ff">%KillExtent</FONT><FONT COLOR="#000000">()   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">..</FONT><FONT COLOR="#0000ff">Populate</FONT><FONT COLOR="#000000">(1000)      </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">=..</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(1)   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">name</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">name</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#0000ff">$c</FONT><FONT COLOR="#000000">(34)   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%Save</FONT><FONT COLOR="#000000">()      </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">=..</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(2)   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">name</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$c</FONT><FONT COLOR="#000000">(34)</FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">name</FONT><FONT COLOR="#000000">_</FONT><FONT COLOR="#0000ff">$c</FONT><FONT COLOR="#000000">(34)   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">tmp</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%Save</FONT><FONT COLOR="#000000">()

  </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%SQL.Export.Mgr</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%New</FONT><FONT COLOR="#000000">()   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">FileName </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#008000">"c:\Temp\test.csv"   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">ClassName </FONT><FONT COLOR="#000000">= ..</FONT><FONT COLOR="#0000ff">%ClassName</FONT><FONT COLOR="#000000">(1)   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">TableName </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$$$CLASSsqltablename</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$$$gWRK</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">ClassName</FONT><FONT COLOR="#000000">)   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Delimiter </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#008000">","   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">StringQuote </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$c</FONT><FONT COLOR="#000000">(34)   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">DateFormat </FONT><FONT COLOR="#000000">= 3   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">TimeFormat </FONT><FONT COLOR="#000000">= 1   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">TimeStampFormat </FONT><FONT COLOR="#000000">= 1   </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">NoCheck </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$$$YES   s </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">HasHeaders </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#0000ff">$$$YES      s </FONT><FONT COLOR="#800000">cols</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"Name:S;Address:S;PhoneNumber:N;BloodGroup:S;DOB:D"   </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#0000ff">$l</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">cols</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">";"</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">{     </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#0000ff">$p</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">cols</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">";"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">)     </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">ColumnNames</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Insert</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$p</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">":"</FONT><FONT COLOR="#000000">,1))     </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">ColumnTypes</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Insert</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$p</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">":"</FONT><FONT COLOR="#000000">,2))   </FONT><FONT COLOR="#800080">}      </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">mgr</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Export</FONT><FONT COLOR="#000000">() } }</FONT>

Vitaliy Serdtsev · Mar 11, 2019 go to post

Hi Robert.

Exactly.

Programmatically Managing Roles:

This command can only be invoked either from a routine that is part of the CACHESYS database or if the current privileges held include Write permission for the CACHESYS database (%DB_CACHESYS:W).

Note that setting $ROLES only alters a process’s added roles, not its login roles.

There is a third way, but I specifically did not publish it.

Vitaliy Serdtsev · Mar 11, 2019 go to post

Below are two ways without additional permissions on %DB_CACHESYS:

  <FONT COLOR="#0000ff">#include </FONT><FONT COLOR="#000000">%systemInclude
  </FONT><FONT COLOR="#0000ff">n
  try</FONT><FONT COLOR="#800080">{

    </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sslName</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"Test"

    </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"1) GetSSLConfigList^%SYS.SECURITY1(.SSLConfigs)"</FONT><FONT COLOR="#000000">,!!     </FONT><FONT COLOR="#0000ff">w $$</FONT><FONT COLOR="#ff0000">Test1</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">sslName</FONT><FONT COLOR="#000000">)          </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#000000">!!,</FONT><FONT COLOR="#008000">"2) $$ListSSLConfigs^%SYS.SECURITY(Client/Server)"</FONT><FONT COLOR="#000000">,!!     </FONT><FONT COLOR="#0000ff">w $$</FONT><FONT COLOR="#ff0000">Test2</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">sslName</FONT><FONT COLOR="#000000">)        </FONT><FONT COLOR="#800080">}</FONT><FONT COLOR="#0000ff">catch</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">ex</FONT><FONT COLOR="#000000">)</FONT><FONT COLOR="#800080">{     </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"Error "</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#800000">ex</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">DisplayString</FONT><FONT COLOR="#000000">(),!   </FONT><FONT COLOR="#800080">}

</FONT><FONT COLOR="#ff0000">Test1</FONT><FONT COLOR="#000000">(ssl) </FONT><FONT COLOR="#800080">{   </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#ff0000">GetSSLConfigList</FONT><FONT COLOR="#000000">^%SYS.SECURITY1(.</FONT><FONT COLOR="#800000">SSLConfigs</FONT><FONT COLOR="#000000">)   </FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#800000">SSLConfigs </FONT><FONT COLOR="#0000ff">return</FONT><FONT COLOR="#000000">:</FONT><FONT COLOR="#800000">SSLConfigs</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#800000">ssl </FONT><FONT COLOR="#0000ff">$$$YES   q $$$NO </FONT><FONT COLOR="#800080">}

</FONT><FONT COLOR="#ff0000">Test2</FONT><FONT COLOR="#000000">(ssl) </FONT><FONT COLOR="#800080">{   </FONT><FONT COLOR="#0000ff">q </FONT><FONT COLOR="#000000">''</FONT><FONT COLOR="#0000ff">$lf</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$lfs</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$$</FONT><FONT COLOR="#ff0000">ListSSLConfigs</FONT><FONT COLOR="#000000">^%SYS.SECURITY(</FONT><FONT COLOR="#008000">"Client"</FONT><FONT COLOR="#000000">)</FONT><FONT COLOR="#008000">","</FONT><FONT COLOR="#000000">                </FONT><FONT COLOR="#0000ff">$$</FONT><FONT COLOR="#ff0000">ListSSLConfigs</FONT><FONT COLOR="#000000">^%SYS.SECURITY(</FONT><FONT COLOR="#008000">"Server"</FONT><FONT COLOR="#000000">))           ,</FONT><FONT COLOR="#800000">ssl</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">}</FONT>

Vitaliy Serdtsev · Mar 6, 2019 go to post

And if so?

<FONT COLOR="#0000ff">CREATE </FONT><FONT COLOR="#000080">TABLE </FONT><FONT COLOR="#008000">test </FONT><FONT COLOR="#000000">(
  </FONT><FONT COLOR="#008000">identifier   </FONT><FONT COLOR="#000080">VARCHAR</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">200</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#000080">NOT NULL</FONT><FONT COLOR="#000000">,
  </FONT><FONT COLOR="#008000">value        </FONT><FONT COLOR="#000080">INTEGER COMPUTEONCHANGE</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"%%UPDATE"</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#000080">COMPUTECODE </FONT><FONT COLOR="#000000">{</FONT><FONT COLOR="#800080">&sql(</FONT><FONT COLOR="#0000ff">select </FONT><FONT COLOR="#808000">max</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">value</FONT><FONT COLOR="#000000">)+1 </FONT><FONT COLOR="#000080">into </FONT><FONT COLOR="#800000">:{*} </FONT><FONT COLOR="#000080">from </FONT><FONT COLOR="#008000">test </FONT><FONT COLOR="#000080">where </FONT><FONT COLOR="#008000">identifier</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#800000">:{identifier}</FONT><FONT COLOR="#800080">)</FONT><FONT COLOR="#000000">},
  </FONT><FONT COLOR="#000080">PRIMARY KEY </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">identifier</FONT><FONT COLOR="#000000">)
)</FONT>
Vitaliy Serdtsev · Feb 28, 2019 go to post

SQL Projection of Object-Valued Properties

<FONT COLOR="#0000ff">INSERT </FONT><FONT COLOR="#000080">INTO </FONT><FONT COLOR="#008000">Package_Tables</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">Person_Address
    </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">Person</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#008000">element_key</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#008000">Address_AddressType</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#008000">Address_StreetAddress</FONT><FONT COLOR="#000000">)
    </FONT><FONT COLOR="#000080">VALUES
    </FONT><FONT COLOR="#000000">(1,2,1,</FONT><FONT COLOR="#008080">'72 Fake Street'</FONT><FONT COLOR="#000000">)</FONT>
Vitaliy Serdtsev · Feb 28, 2019 go to post

Working example:

<FONT COLOR="#000080">Class dc.test </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">Abstract </FONT><FONT COLOR="#000000">]
{

</FONT><FONT COLOR="#000080">/// d ##class(dc.test).Test1() ClassMethod </FONT><FONT COLOR="#000000">Test1() [ </FONT><FONT COLOR="#000080">ProcedureBlock </FONT><FONT COLOR="#000000">= 0 ] {   </FONT><FONT COLOR="#0000ff">new </FONT><FONT COLOR="#800000">active</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">reactive</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">info</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">i      </FONT><FONT COLOR="#0000ff">kill </FONT><FONT COLOR="#800000">info

  </FONT><FONT COLOR="#0000ff">set </FONT><FONT COLOR="#800000">active </FONT><FONT COLOR="#000000">= 1   </FONT><FONT COLOR="#0000ff">set </FONT><FONT COLOR="#800000">reactive </FONT><FONT COLOR="#000000">= 2

  </FONT><FONT COLOR="#0000ff">for </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"active"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"reactive" </FONT><FONT COLOR="#800080">{     </FONT><FONT COLOR="#0000ff">set </FONT><FONT COLOR="#800000">info</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">)= @</FONT><FONT COLOR="#800000">i   </FONT><FONT COLOR="#800080">}

  </FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#800000">info </FONT><FONT COLOR="#000000">}

</FONT><FONT COLOR="#000080">/// d ##class(dc.test).Test2() ClassMethod </FONT><FONT COLOR="#000000">Test2() [ </FONT><FONT COLOR="#000080">PublicList </FONT><FONT COLOR="#000000">= (active, reactive) ] {   </FONT><FONT COLOR="#0000ff">new </FONT><FONT COLOR="#800000">active</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#800000">reactive   </FONT><FONT COLOR="#0000ff">kill </FONT><FONT COLOR="#800000">info

  </FONT><FONT COLOR="#0000ff">set </FONT><FONT COLOR="#800000">active </FONT><FONT COLOR="#000000">= 1   </FONT><FONT COLOR="#0000ff">set </FONT><FONT COLOR="#800000">reactive </FONT><FONT COLOR="#000000">= 2

  </FONT><FONT COLOR="#0000ff">for </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"active"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"reactive" </FONT><FONT COLOR="#800080">{     </FONT><FONT COLOR="#0000ff">set </FONT><FONT COLOR="#800000">info</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">)= @</FONT><FONT COLOR="#800000">i   </FONT><FONT COLOR="#800080">}

  </FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#800000">info </FONT><FONT COLOR="#000000">}

}</FONT>

Vitaliy Serdtsev · Feb 22, 2019 go to post

What will the following code output?

<FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">resptext</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"{""access_token"":""4SDFDSFDSF-aSDASDASD"",""expires_in"":""3300"",""refresh_token"":"""",""scope"":""sms_send"",""token_type"":""Bearer""}"

</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">sc </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%ZEN.Auxiliary.jsonProvider</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%ParseJSON</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">resptext</FONT><FONT COLOR="#000000">,,.</FONT><FONT COLOR="#800000">pObject</FONT><FONT COLOR="#000000">,1) </FONT><FONT COLOR="#0000ff">i $$$ISOK</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">sc</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">{   </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#800000">pObject</FONT><FONT COLOR="#000000">,!!,     </FONT><FONT COLOR="#800000">pObject</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">"access_token"</FONT><FONT COLOR="#000000">,!,     </FONT><FONT COLOR="#800000">pObject</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">"expires_in"</FONT><FONT COLOR="#000000">,!   </FONT><FONT COLOR="#0000ff">k </FONT><FONT COLOR="#800000">arr </FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">arr</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"" </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">pObject</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%CopyToArray</FONT><FONT COLOR="#000000">(.</FONT><FONT COLOR="#800000">arr</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#800000">arr </FONT><FONT COLOR="#800080">}</FONT><FONT COLOR="#0000ff">else</FONT><FONT COLOR="#800080">{   </FONT><FONT COLOR="#0000ff">d $system</FONT><FONT COLOR="#008080">.OBJ</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">DisplayError</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">sc</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">}</FONT>

My result (2018.1):
USER><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">^test</FONT>
1@%ZEN.proxyObject

4SDFDSFDSF-aSDASDASD 3300 arr("access_token")="4SDFDSFDSF-aSDASDASD" arr("expires_in")=3300 arr("refresh_token")="" arr("scope")="sms_send" arr("token_type")="Bearer"

Vitaliy Serdtsev · Feb 22, 2019 go to post

What will the following code output?

USER><FONT COLOR="#0000ff">k </FONT><FONT COLOR="#800000">arr </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">pObject</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%CopyToArray</FONT><FONT COLOR="#000000">(.</FONT><FONT COLOR="#800000">arr</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#0000ff">zw </FONT><FONT COLOR="#800000">arr</FONT>

PS: "in" ≠ "expires_in"

Vitaliy Serdtsev · Feb 18, 2019 go to post

Hi Adrian.

Made a small example:

<FONT COLOR="#0000ff">#dim </FONT><FONT COLOR="#800000">rs </FONT><FONT COLOR="#0000ff">As </FONT><FONT COLOR="#008080">%ResultSet
   
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">pid</FONT><FONT COLOR="#000000">=4652
   
</FONT><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">rs</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">%ResultSet</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%New</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"%SYS.ProcessQuery:VariableByPid"</FONT><FONT COLOR="#000000">)
   
</FONT><FONT COLOR="#0000ff">f </FONT><FONT COLOR="#800000">filter</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">""</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"a*" </FONT><FONT COLOR="#800080">{
 </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#000000">!,</FONT><FONT COLOR="#008000">"Filter = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#0000ff">$$$quote</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">filter</FONT><FONT COLOR="#000000">),!
 </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#800000">rs</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Execute</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">pid</FONT><FONT COLOR="#000000">,,,,</FONT><FONT COLOR="#800000">filter</FONT><FONT COLOR="#000000">)
 </FONT><FONT COLOR="#0000ff">while </FONT><FONT COLOR="#800000">rs</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Next</FONT><FONT COLOR="#000000">() </FONT><FONT COLOR="#800080">{
   </FONT><FONT COLOR="#0000ff">w </FONT><FONT COLOR="#008000">"Name = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">rs</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Get</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"Name"</FONT><FONT COLOR="#000000">),</FONT><FONT COLOR="#008000">", Value = "</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">rs</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">Get</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"Value"</FONT><FONT COLOR="#000000">),!
 </FONT><FONT COLOR="#800080">}
}</FONT>
Result:
USER:4652><FONT COLOR="#0000ff">s </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"11"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"22"</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">a1</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"33" </FONT><FONT COLOR="#0000ff">w $job</FONT>
4652

USER:1392><FONT COLOR="#0000ff">w $job</FONT><FONT COLOR="#000000">,! </FONT><FONT COLOR="#0000ff">d </FONT><FONT COLOR="#000000">^dc</FONT> 1392

Filter = "" Name = a, Value = 11 Name = a1, Value = 33 Name = b, Value = 22

Filter = "a*" Name = a, Value = 11 Name = a1, Value = 33