User bio
404 bio not found
Member since Jan 29, 2019
Replies:

To help visualize how this is being evaluated, maybe it'll help if we break it down in the order it's being evaluated. An equivalent statement for the strict left-to-right evaluation would be this:

W (((1=0) && 1) = 0) ; nested operations in different text color.

So, to evaluate (1=0) first, 1=0 is false, therefore the result is zero.
That now makes the full equation:

W ((0 && 1) = 0) ;

Now, let's evaluate (0 && 1) -- 0 && 1 equates to zero also.
That now makes the full equation:

W (0 = 0) ; last nested part of the equation;

So, lastly, the result of 0=0 is true, or 1.

I hope this explanation helps!

Just create a "job wrapper" around the function, then JOB the subroutine:

JOBEXPORT ; SET UP A ROUTINE TO EXPORT A FILE.
 Q ; USE SEPARATE ENTRY POINT, JUST IN CASE...
 ;
SAVE ; HERE'S THE ACTUAL SUBROUTINE TO EXPORT THE ROUTINE.
 ; IT THROWS AWAY ANY I/O, MAYBE YOU DON'T WANT THAT.
 D $SYSTEM.OBJ.Export("RTOSAVE.INT","E:\Z\SAVEDROUTINE.RTN")
 Q
 

Then, just JOB the subroutine and get the job number:

JOB SAVE^JOBEXPORT SET CHLD=$ZCHILD WRITE CHLD,!

( This prints the child process ID, if you don't need to see it you can omit the last WRITE statement. )

Later, to see if the routine is still working, use the $DATA and $^JOB functions:

WRITE $DATA(^$JOB(CHLD))

If the 0 the job has completed (or possibly crashed, I suppose) - if it's 1 then the task is still running. There are utilities both in the Management Portal and in the %SYS namespace to terminate rogue processes.

Hope this helps!

[[ Edited for minor error in code... there might be more. ]]

If the System File Numbers in question are related to the database files themselves instead of the journal files, there's a query in SYS.Database called "CompactLocalList" that might get you what you need. Note: It seems that the query calls in SYS.Database need to be called from the %SYS namespace.

Try this (ugly, but hopefully useful) code snippet, and see if it gets you what you need:

zn "%sys"
set q = ##class(%SQL.Statement).%New()
set status = q.%PrepareClassQuery("SYS.Database","CompactLocalList")
set rset = q.%Execute()
while rset.%Next() { write !,rset.%Get("Directory"),*9,rset.%Get("SFN") }
w q.%Close()

Here's the documentation page for the SYS.Database class: https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=SYS.Database

and this will take you directoy to CompactLocalList.

There's one or two other calls that mention SFN's, so there might be other clues in the documentation referenced above.

Hope this helps!

Certifications & Credly badges:
Roger has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Roger has no followers yet.
Following:
Roger has not followed anybody yet.