I originally posted this to the Google groups cross post and was informed that it would not be seen unless posted here.
Try
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
"
Certifications & Credly badges:
Raymond has no Certifications & Credly badges yet.
Global Masters badges:
Raymond has no Global Masters badges yet.
Followers:
Raymond has no followers yet.
Following:
Raymond has not followed anybody yet.
Hi Confused. In your sample output you show it like so:
I want output in CSV File as:
1,2,3,4
5,6,7,8
.
.
.
n,n,n,n
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:
^GLOBAL1(1)="1,2,3,4"
^GLOBAL1(2)="5,6,7,8"
- or -
^GLOBAL1(1)
1,2,3,4
^GLOBAL1(2)
5,6,7,8
- or -
1=1,2,3,4
2=5,6,7,8
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.