va fileman v. 22.0 programmer manual banner

Main Chapter Getting Started Manual Advanced User Manual

^DIKCBLD: Build an M Routine that Makes a Call to CREIXN^DDMOD

This programmer mode utility creates a routine that makes a call to CREIXN^DDMOD to create a New-Style cross-reference.


If you use KIDS to transport a field that is a value in a New-Style cross-reference, that cross-reference is automatically transported and installed at the installing site. In some situations, however, you can create a New-Style cross-reference definition on a target system without sending fields, or create a New-Style cross-reference on-the-fly on a running system. To do this, you can write an M routine that makes a call to CREIXN^DDMOD. The input parameters to the CREIXN^DDMOD API are fairly extensive. ^DIKCBLD can be used to facilitate the development of the code that calls CREIXN^DDMOD. It automatically builds an M routine that sets up the input parameters and makes the call to CREIXN^DDMOD. When ^DIKCBLD is run, it asks for name of a routine and the namespace to use for local variables within that routine. It also asks you to select a New-Style cross-reference that exists in the development account. The input parameters to the CREIXN^DDMOD call in the generated routine are set based on the selected cross-reference.


The routine generated by ^DIKCBLD is a skeleton. You must still edit the routine to fill in the missing details on the first and second lines, as well as customize the parameters routine to the CREIXN^DDMOD call.

Routine name: ZZTEST
Routine ZZTEST already exists.
Do you wish to replace routine ZZTEST? NO// YES
Programmer initials: WAM
Namespace to use for local variables: MY
CROSS-REFERENCE FROM WHAT FILE: 16012 <Enter> ZZMYTESTFILE (1 entry) Current Indexes on file #16012:
220 ‘AD’ index
Which Index do you wish to build a routine for? 220 <Enter> AD ‘ZZTEST’ ROUTINE FILED.
    Be sure to edit the routine to fill in the missing details,
    and to customize the call to CREIXN^DDMOD.
 N myXR,myRES,myOUT
 S myXR(“FILE”)=16012
 S myXR(“NAME”)=“AD”
 S myXR(“TYPE”)=“MU”
 S myXR(“USE”)=“A”
 S myXR(“SHORT DESCR”)=“This MUMPS cross-reference updates
  field #2 when field #1 is deleted.”
 S myXR(“DESCR”,1)=“The kill logic of this cross-reference
  calls the Filer to stuff today’s”
 S myXR(“DESCR”,2)=“date into field #2 whenever the value
  of field #1 is deleted.”
 S myXR(“DESCR”,3)=“ “
 S myXR(“DESCR”,4)=“The set logic calls the Filer to
  delete the contents of field #2”
 S myXR(“DESCR”,5)=“when a value is placed into field #1.”
  S ZZFDA(16012,DA_”“,”“,2)=““““
  D FILE^DIE(““““,”“ZZFDA”“,”“ZZMSG”“)”
  S ZZFDA(16012,DA_”“,”“,2)=DT
  D FILE^DIE(““““,”“ZZFDA”“,”“ZZMSG”“)”
 S myXR(“SET CONDITION”)=“S X=X1(1)=“““““
 S myXR(“KILL CONDITION”)=“S X=X2(1)=“““““
 S myXR(“VAL”,1)=1