|
| Contents: | Main | Section | See Also: | User Manual | Advanced User Manual |
The ^DIKCBLD 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 you for the following information:
The input parameters to the CREIXN^DDMOD call in the generated routine are set based on the selected cross-reference.
NOTE: 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.
>D ^DIKCBLD
Routine name: ZZTEST
Routine ZZTEST already exists.
Do you wish to replace routine ZZTEST? NO// YES
Programmer initials: OX
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 to build a routine for? 220 <Enter> AD
'ZZTEST' ROUTINE FILED.
Done!
Be sure to edit the routine to fill in the missing details,
and to customize the call to CREIXN^DDMOD.
>ZL ZZTEST ZP
ZZTEST ;xxxx/OX-CREATE NEW-STYLE XREF ;11:06 AM 9 Jul 2002
;;1.0
;
N myXR,myRES,myOUT
S myXR("FILE")=16012
S myXR("NAME")="AD"
S myXR("TYPE")="MU"
S myXR("USE")="A"
S myXR("EXECUTION")="F"
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 myXR("SET")="N ZZFDA,ZZMSG,DIERR
S ZZFDA(16012,DA_"","",2)=""""
D FILE^DIE("""",""ZZFDA"",""ZZMSG"")"
S myXR("KILL")="N ZZFDA,ZZMSG,DIERR
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
D CREIXN^DDMOD(.myXR,"SW",.myRES,"myOUT")
Q
|
|
VA (Internet) / VA (Intranet) / OIT / EPMO / Site Map / Terms of Use / VA Privacy Policy / Accessibility Reviewed/Updated: January 11, 2018 If you have questions, need more information, or are having accessibility problems with this Web site, please contact us by E-Mail: Webmasters
|