Look at $IsValidNum in the documentation
- Log in to post comments
Look at $IsValidNum in the documentation
Thanks - I see the package path created but no .cls file
Thanks for the confirmation.
I right clicked the Class in explorer (in VSCode), hit export and nothing happened.
Is it saved somewhere locally ? If so how do I define where it should save it ?
David
Dmitry,
An amazing piece of work.
I tested this with a local install of IRIS:In Studio I created a test class in the USER namespace
I then opened VSCode, changed to the USER namespace and was able to open the test class
However when I tried to edit the code I saw:
.png)
Not sure what's wrong here - any suggestions ?
Thanks,
David
Variables should never be global in scope.
As others have said they should be part of class instances or passed by reference.
PPGs are intended more for very local, non persistent, storage - e.g. private data within a spawned job.
Do you have any information regarding licensing costs ?
set status = $$$ERROR($$$SQLError, $System.SQL.SQLCODE(SQLCODE))
Would return a %Status value with the text of the SQLCODE error available.
The previous answer would give the SQLCODE error number.
Use whichever is appropriate
There should be another call to AuthenticateWithUsername should be before the Connect call (as well as after the Connect call)
$ListNext is generally faster, however for production code the following pattern should be used:
set pointer = 0
while ($listnext(list,pointer,listpart)) {
continue:($data(listpart)=0)
#; listpart is valid
}
This correctly deals with a trailing comma in the list, e.g.
set list = $listbuild(1,2,3,)
If this is fed to $listnext then listpiece will be undefined for the last iteration
Be careful when using the target parameter to $order. See the documentation for target.
If there is no data present at the node being iterated over then the target value will retain its last set value - to ensure you always use the correct value when set, kill the target variable before the $order statement and check it's validity before use with $data, e.g.
kill Data
Set Sub3 = $Order(^Trans(Sub1,Sub2,Sub3),1,Data)
quit:(Sub3="")
if ($data(Data)) {
Write ?6,Sub3," = ",Data
Write Data,!
}