It is currently Thu Mar 28, 2024 11:53 am


All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 76 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: More MUMPS V1 utility
PostPosted: Sat Sep 03, 2011 3:43 am 
User avatar

Joined: Sun Mar 27, 2011 8:12 am
Posts: 87
Location: Europe , HUNGARY
Real Name: Josef Nagy
Began Programming in MUMPS: 0- 0-1991
Hi

www.cais-system.com/MUMPS/MV1_SysTray_Ubuntu/2_0_beta/
In the MV1 Studio 1.0 (some bug) fixed .
In this release : Explorer (browsing or Delete Globals/Routines , Make New Routine , Edit Routine)
In MV1 Studio window-resize is ENABLE ....

_________________
Josef Nagy
[MUMPS based industrial application in Processing Controll (MCU/PLC/MUX)]


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Mon Sep 12, 2011 3:45 am 

Joined: Mon Sep 12, 2011 3:39 am
Posts: 1
Real Name: Armando Sgroi
Began Programming in MUMPS: 18 May 1985
Hi Ray

The doyen of the true Mumps world - great to see you mentoring the brotherhood .... Sgroisy - a total crap Mumps programmer myself ...


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Fri Oct 21, 2011 8:28 am 
User avatar

Joined: Sun Mar 27, 2011 8:12 am
Posts: 87
Location: Europe , HUNGARY
Real Name: Josef Nagy
Began Programming in MUMPS: 0- 0-1991
Hi Everybody

I have more question :
in MV1 file EOF = ($KEY=$c(255)) this is correct ?
In binary file (ex.:journal file) this will be work ?

Ex.: This Utility working fine with *.TXT , *.HTML , *.JPG ...
;=== General File Read Process
W !,"MUMPS V1 File reader Utility",!
RF R "File (?=Dir): ",FN G:FN="" EX
I FN="?" D
.K DIR S DIR(1)=$&%DIRECTORY("*") W ! S $E(BLL,80)=" "
.F I=2:1 Q:DIR(I-1)="" S DIR(I)=$&%DIRECTORY("")
.N $ES S I="" F S I=$O(DIR(I)) Q:I="" W $E($G(DIR(I))_BLL,1,20)_"| " W:'(I#3) !
W ! G:FN="?" RF
;--- Read File & Save ^MFILE(seq)=text/data
K ^MFILE I '$&%FILE(FN,"EXISTS") W " ...FILE NOT EXIST !",! G RF
;Use Standard TERMINATOR=$C(13,10) & EOF:$KEY=255
C 1 O 1:(FN:"R") S SEQ=1,K=0 F Q:K=255 D
.U 1 R LN S K=$A($K)

And , if USE parameter "TERMINATOR=" *empty* , how much data read from file to local variable ? Max.length is 32k ?
. ;U 0 w !,"|K:="_K_"|LN:="_LN_"|" R A
.S ^MFILE(SEQ)=LN,SEQ=SEQ+1
C 1 U 0 W !,"File save to ^MFILE global done.",!
EX ;
G ^%M

_________________
Josef Nagy
[MUMPS based industrial application in Processing Controll (MCU/PLC/MUX)]


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Fri Oct 21, 2011 2:17 pm 
User avatar

Joined: Mon Nov 01, 2010 3:33 pm
Posts: 104
Location: Australia
Real Name: Ray Newman
Began Programming in MUMPS: 01 Jul 1976
($K=$C(255)) or ($A($K)=255) is correct.
If terminator is null, 32767 bytes should be read. Limit this with READ VAR#LIMIT.
For a binary file, I usually used F U IN Q:$A($K)=255 R *V U OUT W *V
As an example, see JOURNLST in MGR on a standard MV1 distribution.

Ray Newman


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Sat Oct 22, 2011 1:37 pm 
User avatar

Joined: Sun Mar 27, 2011 8:12 am
Posts: 87
Location: Europe , HUNGARY
Real Name: Josef Nagy
Began Programming in MUMPS: 0- 0-1991
Thanx for help Ray

In the past week finished the introduction of new Clinical software in MV1 & Gambas .
MV1 working perfect , and Gambas application is same (all data manipulation and algorithm writed in MUMPS , Gambas use only graphic interaction with user).
(We use always 32k block size in database , because this practical for "Patient text records" )

The MV1 is a better distribution of Standard MUMPS ! We use MV1 for our work exclusively in the future ...
The new MV1 Studio use some client , for testing any MUMPS routine migrate from other M/Cache . It would be necessary to make better Global Editor one than it InterSystems-CacheGlobalViewer :)

I hope for it now I will have time to continue the work with SysTray2 (CrossSystemJournaling and Global Editor) .
For use the remote journal file , whish solution better ? :
1. use the standard Linux/Unix file sharing for remote Journal File
(under MV1 runtime can't share the journal file to other process ?)
2. use a special TCP/IP port/session & runing on remote system a journal file reader process

_________________
Josef Nagy
[MUMPS based industrial application in Processing Controll (MCU/PLC/MUX)]


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Sat Oct 22, 2011 2:17 pm 
User avatar

Joined: Mon Nov 01, 2010 3:33 pm
Posts: 104
Location: Australia
Real Name: Ray Newman
Began Programming in MUMPS: 01 Jul 1976
Something like option 2.
As the journal file is opened O_RDWR, another c process could also open it
O_RDWR as well. This process could then loop on the next free byte in the file
(bytes 0 - 3 are a fixed number MUMPS_MAGIC-1 and bytes 4 - 7 point at the next
free byte initially 20). Each time next free changed, fetch the record and send it via tcp.

Ray


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Sat Oct 22, 2011 3:21 pm 
User avatar

Joined: Mon Nov 01, 2010 3:33 pm
Posts: 104
Location: Australia
Real Name: Ray Newman
Began Programming in MUMPS: 01 Jul 1976
Error in last post - next free byte is in bytes 4 - 11 (i.e. it's an eight byte quantity).

Ray


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Sun Oct 23, 2011 2:33 am 
User avatar

Joined: Sun Mar 27, 2011 8:12 am
Posts: 87
Location: Europe , HUNGARY
Real Name: Josef Nagy
Began Programming in MUMPS: 0- 0-1991
Ray

The structure of Journal File is clear .
R MAGIC#4,OFFSET#8,TIME#8,DATA#(SIZE-8)
SIZE=$E(TIME,1,2)
and ...
UCI=$A(TIME,4),ACTION=$A(TIME,3)

What is a MAGIC NUMBER ?

Im now write/make a simple DeJournal Utility (first only localTCP, in terminal mode) , working same like as JOURNLST (reading a journal file) & Execute action to empty database (rebuild the "master" database) , + need some selection (wish global , action , date period , ....)
Any global setting to Jornal ON is easy , but general Journal function (Journaling switch ON/OFF) possible change under runtime ? or only "J 1" single user mode .
Checking the jornaling semafor , when "mumps" environment creating time ?

_________________
Josef Nagy
[MUMPS based industrial application in Processing Controll (MCU/PLC/MUX)]


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Sun Oct 23, 2011 2:54 am 
User avatar

Joined: Mon Nov 01, 2010 3:33 pm
Posts: 104
Location: Australia
Real Name: Ray Newman
Began Programming in MUMPS: 01 Jul 1976
From mumps/include/mumps.h
#define MUMPS_MAGIC 4155766917UL // seems unique
MAGIC for the journal file is MUMPS_MAGIC-1 - if this is confusing, see 'man file'

I don't understand the problem described after 'Any global setting to Jornal ON is easy , but general Journal function '...

Ray


Top
Offline Profile  
 
 Post subject: Re: More MUMPS V1 utility
PostPosted: Sun Oct 23, 2011 3:01 am 
User avatar

Joined: Sun Mar 27, 2011 8:12 am
Posts: 87
Location: Europe , HUNGARY
Real Name: Josef Nagy
Began Programming in MUMPS: 0- 0-1991
OK

When MV1 is runing (without jornaling , $^SYSTEM("VOL",1,"JOURNAL_REQUEST")=0 ) , possible change *without restarting MV1* this jornal status (switch ON) ?

Josef

_________________
Josef Nagy
[MUMPS based industrial application in Processing Controll (MCU/PLC/MUX)]


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 76 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net