Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: MUMPS Array Subscripts Parsing Via RegEx

by Clovis_Sangrail (Beadle)
on May 16, 2012 at 15:10 UTC ( [id://970856]=note: print w/replies, xml ) Need Help??


in reply to Re: MUMPS Array Subscripts Parsing Via RegEx
in thread MUMPS Array Subscripts Parsing Via RegEx

As yet I'm, not called on to parse any Mumps code. All I get from Mumps are binary journals, data much like transaction journals from other DataBase Systems. The GT.M implementation of Mumps comes with a 'mupip' program that (among other things) gives me a character-based dump of the Journals, basically a human-readable text file of newline-delimited records with '\' as the field separator. I wonder if other current implementations of Mumps include mupip (or journals at all, for that matter). I can use 'split' to make a list of each record, and I'm fortunate that the Global Variable is in the final field, because I've even found embedded '\' characters in some Global Variable subscripts, but I can ignore them via the 3rd (limit) parameter to split.

  • Comment on Re^2: MUMPS Array Subscripts Parsing Via RegEx

Replies are listed 'Best First'.
Re^3: MUMPS Array Subscripts Parsing Via RegEx
by afoken (Chancellor) on May 17, 2012 at 10:54 UTC

    Partly related:

    MSM has a %GS (global save) command that writes globals to text files, in a pretty simple format non-surprisingly called MSM format. The first line contains date and time, and some constants, the second line is the comment entered while running %GS, the following lines contain alternating the global name inclusing all subscripts, and the value. To announce the end of a global, both lines are "*", to announce end of file, both lines are "**". Simple, readable, parseable with nearly no efford. Unless one of the globals happen to contain control characters like CR or LF. Even MSM can't read back those files it wrote just seconds ago. It's a shame.

    The companion program %GR (global restore) reads the globals back into the system. And I remember from browsing the sources that there is a second file format named "ANSI format", but unfortunately, I don't remember the details, and I don't have to access to the MSM systems at work from home.

    My idea is to search for tools that are written to exchange data with other MUMPS systems. One of the design goals of ANSI MUMPS was to be able to exchange programs and data across the various implementations, so there should be tools. And because MUMPS is so old, my bet is that most exchange formats are simple ASCII files with a line-oriented format and simple delimiters, because that's what all MUMPS systems (and those grey-haired MUMPS coders) are able to handle.

    And by the way: Don't expect much error checking or even error handling in old tools. All MUMPS code I've seen (not only or own legacy system, but also the code delivered by Micronetics) is very optimistic regarding the well-formedness and validity of its input. It seems that no MUMPS coder ever mistrusted foreign data or user input. Unexpected input usually leads to crashes or damaged or lost data, get used to it.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://970856]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found