This tool can be used as a safe way to edit magic data structures.
1. at the FE type GE
2. at the node screen enter the value that you want to edit, example
\GU["USER"]
3. Enter an "E" followed by the node you want to edit at, like "E2"
4. a prompt will show with a Old:
New: value
5. Ok to File? will display, enter "Y" to file
Thursday, October 30, 2008
Thursday, October 9, 2008
MIIS/MUMPS
Magic got it start from MUMPS and MIIS. MUMPS actually was built to stop on errors in its tracks and report errors, from what i understand MIIS was built to keep trucking along.
Wednesday, October 8, 2008
Use Notepad software to edit Meditech code
Tuesday, October 7, 2008
Monday, October 6, 2008
List of FE commands
RR Recalls last command
S Calls $SEG
D Calls $DIR
CL Closes open prefixes
TR Calls $T("")
WHO Calls $WHO
TC Displays $T APP Change Numbers
OA Calls Office Automation ' Executes T("")
X Executes %[app]("")
TIM Calls $TIME
HALT Calls $HALT
P Calls $PPPE Calls $EP
ET Calls $ETOPS Calls the privileged operators menu
WHERE Displays the directory you are in
SI Locates an employee using OA files
GB Calls $GB, list globals backwards
OP Displays open prefixes
G <1> Calls $G, invoke with argument for PTR format
SPY Calls $INFOL
S Calls $SEG
D Calls $DIR
CL Closes open prefixes
TR Calls $T("")
WHO Calls $WHO
TC Displays $T APP Change Numbers
OA Calls Office Automation ' Executes T("")
X
TIM Calls $TIME
HALT Calls $HALT
P
ET
WHERE Displays the directory you are in
SI Locates an employee using OA files
GB Calls $GB, list globals backwards
OP Displays open prefixes
G <1> Calls $G, invoke with argument for PTR format
SPY Calls $INFOL
Thursday, October 2, 2008
View Meditech Data Defs
$FE.NPR.DDEF.VIEW(A)
A =
DPM = navigate by DPM
OBJ = find nodes by physical
ELE = search for field by physical
SEG = go straight to a specific segment
Highlight a segment and hit to see the fields
Highlight a segment and hit to see child segments
A field with (A)ttributes, (D)ocumentation, or (T)echnical Documentation will have an asterisk in the appropriate column. to view.
A =
DPM = navigate by DPM
OBJ = find nodes by physical
ELE = search for field by physical
SEG = go straight to a specific segment
Highlight a segment and hit
Highlight a segment and hit
A field with (A)ttributes, (D)ocumentation, or (T)echnical Documentation will have an asterisk in the appropriate column.
Medtiech Prefix Standards
Meditech Prefix Standards
Prefix Opens To
% Programs (Current Directory)
$ O.S. System Utilities
# Input Device
/ Temp File
\ MIS Common Dictionaries
& Application Database Dictionaries
: Application Database File(s)
* Application Database File(s)
? Application Database File(s)
! Input
Prefix Opens To
% Programs (Current Directory)
$ O.S. System Utilities
# Input Device
/ Temp File
\ MIS Common Dictionaries
& Application Database Dictionaries
: Application Database File(s)
* Application Database File(s)
? Application Database File(s)
! Input
Wednesday, October 1, 2008
Error messages in Meditech
Error information is stored in A symbol table by the OS immediately upon error:
["AA"] or ["A"]A= Line of code error was encountered
["AB"] or ["A"]B= Error Location
["AC"] or ["A"]C= Machine Node
["AD"]or ["A"]D= Program Block
["AA"] or ["A"]A= Line of code error was encountered
["AB"] or ["A"]B= Error Location
["AC"] or ["A"]C= Machine Node
["AD"]or ["A"]D= Program Block
Using Nill to Delete structures instead of Kill command
It is a safer practice to use the following routine when you need to delete a structure instead of using the K command.
so if the structure looked like this
:["LUNCH","APPLE"]
:["LUNCH","COKE"]
:["LUNCH","HOT DOG"]
"LUNCH"^A,""^B,DO{>:[A,B]^B ""^:[A,B]}
Performing a physical next on the structure and placing a value in A will delete everything in "LUNCH".
so if the structure looked like this
:["LUNCH","APPLE"]
:["LUNCH","COKE"]
:["LUNCH","HOT DOG"]
"LUNCH"^A,""^B,DO{>:[A,B]^B ""^:[A,B]}
Performing a physical next on the structure and placing a value in A will delete everything in "LUNCH".
Way to save prefixes in /
1. Seg over to directory
2. Open the prefix to \S
O(\S,%.MIS.dic[mis.dbase,"MIS"]),C($U,%U),
3. use Z.fpn to save this value to a / value
%Z.fpn(^\)^/OPEN.MIS.DIC
4. Then you can use this open
O(\S,/OPEN.MIS.DIC)
2. Open the prefix to \S
O(\S,%.MIS.dic[mis.dbase,"MIS"]),C($U,%U),
3. use Z.fpn to save this value to a / value
%Z.fpn(^\)^/OPEN.MIS.DIC
4. Then you can use this open
O(\S,/OPEN.MIS.DIC)
Tuesday, September 30, 2008
Way to copy and paste code using Get Key
1. Type F4 and GOTO BUF?
2. Type a number, 1 and this will bring up the GET TEXT?
3. Type P for a program and type M for a macro
4. If you type M this will bring up the MACRO?
5. Use ? for a lookup of macros to select
6. Now you can use the F1 and F2 to copy and then paste, use the esc key to get back to the orginal program
2. Type a number, 1 and this will bring up the GET TEXT?
3. Type P for a program and type M for a macro
4. If you type M this will bring up the MACRO?
5. Use ? for a lookup of macros to select
6. Now you can use the F1 and F2 to copy and then paste, use the esc key to get back to the orginal program
Friday, September 26, 2008
Better way to view value of NPR field
Let's say that we have a line of code in our source file that looks like this,
IF{@employer="test" @dosomething}
we need to know that it is = to *AA[aa]E0
to find out the value right away in the object code, if it is really long you could just spend your time looking for this value or put
$DDC("find employer"),
IF{@employer="test" @dosomething}
You can now find this easy by doing a search inputing "find employer". This can be a real time saver.
IF{@employer="test" @dosomething}
we need to know that it is = to *AA[aa]E0
to find out the value right away in the object code, if it is really long you could just spend your time looking for this value or put
$DDC("find employer"),
IF{@employer="test" @dosomething}
You can now find this easy by doing a search inputing "find employer". This can be a real time saver.
Most common way to check for nil value
This is copied from another blog but worth repeating
IF{/SOMEVALUE="" @SOMETHING} <--- THIS WILL NOT WORK To test for a Nil value in a variable, you can concatenate a known value like a period to the variable and then check to see if the period and variable are equal. If they are equal, the variable had a Nil value. If the equation is not equal you know that the variable was not Nil. The following logic is one valid way to check for a Nil value: IF{/SOMEVALUE_.=. DO SOMETHING} <--- THIS WILL WORK
IF{/SOMEVALUE="" @SOMETHING} <--- THIS WILL NOT WORK To test for a Nil value in a variable, you can concatenate a known value like a period to the variable and then check to see if the period and variable are equal. If they are equal, the variable had a Nil value. If the equation is not equal you know that the variable was not Nil. The following logic is one valid way to check for a Nil value: IF{/SOMEVALUE_.=. DO SOMETHING} <--- THIS WILL WORK
3 ways to check for nil value
3 ways to check for nil value
1. To test for a Nil value in a variable, you can concatenate a known value like a period to the variable and then check to see if the period and variable are equal. If they are equal, the variable had a Nil value. If the equation is not equal you know that the variable was not Nil. The following logic is one valid way to check for a Nil value:
IF{/SOMEVALUE_.=. DO SOMETHING}
2. Length/Locate
IF{L(@field)=0 "value is nil";"value is not nil"}
3. @Not(@field) in an IF statement
1. To test for a Nil value in a variable, you can concatenate a known value like a period to the variable and then check to see if the period and variable are equal. If they are equal, the variable had a Nil value. If the equation is not equal you know that the variable was not Nil. The following logic is one valid way to check for a Nil value:
IF{/SOMEVALUE_.=. DO SOMETHING}
2. Length/Locate
IF{L(@field)=0 "value is nil";"value is not nil"}
3. @Not(@field) in an IF statement
DDC - more stuff
Include ?? after the DDC? to get information on the "B" symbol table
DDC ? ??
B (CURRENT) SYMBOL TABLE Print on device? S
DDC ? ??
B (CURRENT) SYMBOL TABLE Print on device? S
Thursday, September 25, 2008
Using $DDT or $DDC or %Z.ddc find symbol table space
DDC ? >
150 BYTES USED, 874 BYTES AVAILABLE DDC ?
150 BYTES USED, 874 BYTES AVAILABLE DDC ?
$G help screen
* Returns all nodes in the structure pointed to by *.
*TN["BARBER":] Returns all the nodes in the structure pointed to by * having a first subscript of TN and a second subscript between BARBER and the last node of that level.
*[:10,"ABC" Return all the nodes in the structure pointed and to by * having a first subscript between the *[:10]ABC first node of that level and 10 and having a second subscript of ABC. All nodes below those nodes will also be returned.
*TN["BARBER":] Returns all the nodes in the structure pointed to by * having a first subscript of TN and a second subscript between BARBER and the last node of that level.
*[:10,"ABC" Return all the nodes in the structure pointed and to by * having a first subscript between the *[:10]ABC first node of that level and 10 and having a second subscript of ABC. All nodes below those nodes will also be returned.
Friday, September 19, 2008
Way to download NPR program to text file
From npr use F1 and F2 to select your range then use the f5 key to save line. Then you can just cut and paste to a text file.
From npr use F1 and F2 to select your range then use the f5 key to save line. Then you can just cut and paste to a text file.
Tuesday, September 16, 2008
Way to view DPMs
Here is a way to view DPM information:
OBJ at Front End will view the following:
VIEW NPR DATA DEFINITIONS by PHYSICAL LOCATION
Seg: A Dir: TEST.5.61.MIS
Node?
ELE at the Front End will view the following:
VIEW NPR DDEF ELEMENTS
Seg: A Dir: TEST.5.61.MIS
DPM? ELE?
DPM at the Front End will view the following:
VIEW NPR DATA DEFINITIONS
Seg: A Dir: TEST.5.61.MIS
DPM?
OBJ at Front End will view the following:
VIEW NPR DATA DEFINITIONS by PHYSICAL LOCATION
Seg: A Dir: TEST.5.61.MIS
Node?
ELE at the Front End will view the following:
VIEW NPR DDEF ELEMENTS
Seg: A Dir: TEST.5.61.MIS
DPM? ELE?
DPM at the Front End will view the following:
VIEW NPR DATA DEFINITIONS
Seg: A Dir: TEST.5.61.MIS
DPM?
Wednesday, September 10, 2008
Great way to view code!
$VIEW(%NAME.OF.PROGRAM)
This will display the object code in a user friendly viewer
This will display the object code in a user friendly viewer
Subscribe to:
Posts (Atom)