User bio

Been doing Mumps/Caché technology for around 40 years.  Started with DSM11 on PDP, then moved to Datatree (a fine product) and them Migrated to Caché when they took over DataTree.

Over the years I have used 

  • Plain Mumps
  • MDM from Hoskyns
  • SAT Developer
  • My own telnet framework
  • CSP
  • ZEN for the last 11 years

Along the way I picked up Delphi and Visual Basic and Microsoft Access.

My philosophy has always been to use as few tools environments as possible and concentrate my intellectual efforts on designing, implementing and delivering bespoke business applications.

One of the great things about Mumps was the few commands, functions and syntax you needed to know.  The quantity of tools/frameworks/development environments currently available is awesome and fearful.

Thanks for reading


Show all
Member since Jun 21, 2016

Hi All

There is another (hidden and undocumented) method

At the top of the class
Include %sqlmgrUtil

And then you have access to a useful macro $$parseString

I find this useful when I need to do some transforms on the csv data rather than just suck the raw data into a class

Code snippit
    set oStream    =##class(%Library.FileCharacterStream).%New()
    set sc                  =oStream.LinkToFile("somefile.csv") 
    if sc'=$$$OK break
    do oStream.Rewind()
    set xDelim=",", xQuote=""""
    while 'oStream.AtEnd()
           set xLine=oStream.ReadLine(10000)
           set xLine=$zstrip(xLine, ">wp")
           set x1=$$parseString(xLine, xDelim, xQuote, .arr)
          ///you now have the individual cells from the csv in the array "arr" 
         ///and you can process/transform them individually

Look in for the definition


Certifications & Credly badges:
Peter has no Certifications & Credly badges yet.
Global Masters badges:
Peter has not followed anybody yet.