User bio
404 bio not found
Member since Dec 8, 2015
Raymond has not published any posts yet.

Hi Confused.  In your sample output you show it like so:

I want output in CSV File as:

Just to be sure what you're asking for, you do not want the output to contain anything from the global name or the global subscript?  So you do not want to see anything like:


- or -


- or -


Anyway, if you're on a Windows based system, you might have to change the file name to use the backslash rather than the forward slash, so:

Set pFile = "C:/Test.csv"

- would become -

Set pFile = "C:\Test.csv"

But to give yourself a better chance of not running afoul of directory permissions issues, you might be better to use:

Set pFile = $System.Util.GetEnviron("TEMP")_"\Test.csv"

And the for a quick and dirty COS way of outputting the the values from a TERM session (you should be able to copy/paste this code into a Cache TERM session):

Set pFile = $System.Util.GetEnviron("TEMP")_"\Test.csv"
Open pFile:"NW":0
If $T Set sub="" For  Set sub=$Order(^GLOBAL1(sub)) Quit:sub=""  Use pFile Write ^GLOBAL1(sub),! Use 0
Close pFile

Hope this helps.

I originally posted this to the Google groups cross post and was informed that it would not be seen unless posted here.

if $e(chunk,1,1)=""""{

A double quote character is represented by two double quote characters when inside a quoted segment. So:

write """  ; is invalid
write """"  ; produces

Raymond has no followers yet.
Raymond has not followed anybody yet.
Global Masters badges:
Raymond has no Global Masters badges yet.