trying to put the SYSMGR global into a readable string
I'm trying to put this global into a readable list. any suggestions
The nested $bl's are giving me a problem.
SYSMGR("Task","TaskD",1046)=$lb("","",0,0,"","0","","Import data to PROG namespace OS.SarD",$lb("63735","1"),,,0,"","<ENDOFFILE>Import+30^PROG0","%SYS.Task.RunLegacyTask",0,"","","",0,"63735,40372","","63735,40320","ImportD","PROG2",,0,"","",0,0,,"",64117,"0 "_$lb($lb(5001,"<ENDOFFILE>Import+30^PROG0",,,,,,,,))/* ERROR #5001: <ENDOFFILE>Import+30^PROG0 */,1,"",5,"","",2,,,1,"123-123-123-ABCD-12345A789A","","SMITH1",$lb("ExecuteCode","q ; D Import^PROG0()"),3,0)
Comments
Hi Jim,
you should probably let us know what you are trying to achieve.
Hi Timo,
I'm trying to extract the data from the global, take specific pieces out, and put them in a spreadsheet. The issue is the string contains multiple "$lb" references and control characters.
for example, in one node the data looks like:
=$lb("",0,0,"","",0,67229,"Switches the journal file at midnight every day","",,,0,"","Success","%SYS.Task.SwitchJournal",1,"","","",0,"67228,0","67228,0","67228,0","Switch Journal","%SYS",,0,"","",0,1,,"",63259,"1",0,0,0,"",1,0,,,1,"BE25EA0C-AA13-11E3-A20D-10604BA47730","","_SYSTEM","",3,0)
and in another:
$lb("","0",0,0,"","0","","Back load ADA/Bureau Assignments and Summary Table","",,,0,"","","%SYS.Task.RunLegacyTask",0,"","","",0,0,0,0,"BackLoadAssign","CONVERT",,0,"","",0,0,,"",63476,"1",0,"",5,"","1",2,,,1,"59CB1202-54B9-11E4-84ED-10604BA47730","","molan1",$lb("ExecuteCode","Q ; D:$g(^LOG.AssignmentSummaryD)<1 FixBurCodeToName^VBASSIGNMENTS2,STEP1^VBASSIGNMENTS,STEP2^VBASSIGNMENTS,STEP4^VBASSIGNMENTS2,STEP5^VBASSIGNMENTS,STEP6^VBASSIGNMENTS,STEP7^VBASSIGNMENTS,STEP9^VBASSIGNMENTS"),1,0)
Hello @JIM WHEELER
Seems you're trying to store the error message. If yes, You can use $SYSTEM.Status.GetErrorText(status) to get the error text of the and store.
If you want to convert the list build values as a string. use ##class(%Utility).FormatString() method
USER>Set str = ##class(%Utility).FormatString($LB(1,2))
USER>zw str
str="$lb(1,2)"Isnt this the data from the class/table %SYS.Task and why not just use SQL or Objects?
Yes it looks like %SYS.Task so to get the data via SQL would be:
select * from "%SYS".Task