| Contents: | Main | Chapter | See Also: | Getting Started Manual | Advanced User Manual | |||
| Reference Type | Category | ICR # |
|---|---|---|
| Supported | Database Server (DBS) | 2916 |
The FILESEC^DDMOD API sets the Security Access Codes for a file. The call allows developers to change only the File Security Codes at a target site without having to transport the entire file. The codes are stored in the following nodes:
FILESEC^DDMOD(file,.security_codes[,msg_root])
| FILE | (Required) File number. It cannot be less than 2. |
| .SECURITY_CODES | (Required) Array of Security Access Codes:
|
| MSG_ROOT |
(Optional) The root of an array into which error messages are returned. If this parameter is not included, errors are returned in the default ^TMP("DIERR",$J) array. |
None.
Example 1
In this example (Figure 118), you are going to set all File Security Code nodes:
Figure 118: FILESEC^DDMOD API—Example 1: Input and Output
. . . .>D ^%G
. . . . Global ^DIC(16028
DIC(16028
. . . . ^DIC(16028,0) = ZPATR FILE^16028
. . . . ^DIC(16028,0,"GL") = ^DIZ(16028,
. . . . ^DIC(16028,"%",0) = ^1.005^^0
. . . . Global ^
. . . .>S SECURITY("DD")="@"
. . . .>S SECURITY("RD")=""
. . . .>S SECURITY("WR")="A"
. . . .>S SECURITY("DEL")="@"
. . . .>S SECURITY("LAYGO")="@"
. . . .>S SECURITY("AUDIT")="@"
. . . .>D FILESEC^DDMOD(16028,.SECURITY)
. . . .>D ^%G
. . . . Global ^DIC(16028
. . . . DIC(16028
. . . . ^DIC(16028,0) = ZPATR FILE^16028
. . . . ^DIC(16028,0,"AUDIT") = @
. . . . ^DIC(16028,0,"DD") = @
. . . . ^DIC(16028,0,"DEL") = @
. . . . ^DIC(16028,0,"GL") = ^DIZ(16028,
. . . . ^DIC(16028,0,"LAYGO") = @
. . . . ^DIC(16028,0,"RD") =
. . . . ^DIC(16028,0,"WR") = A
. . . . ^DIC(16028,"%",0) = ^1.005^^0
Example 2
In this example (Figure 119), you are going to use the results from the previous example (Figure 118) and change just the WRITE Access.
Figure 119: FILESEC^DDMOD API—Example 2: Input and Output
. . . . >S SECURITY("WR")="a"
. . . . >D FILESEC^DDMOD(16028,.SECURITY)
. . . . >D ^%G
. . . . Global ^DIC(16028
DIC(16028
. . . . ^DIC(16028,0) = ZPATR FILE^16028
. . . . ^DIC(16028,0,"AUDIT") = @
. . . . ^DIC(16028,0,"DD") = @
. . . . ^DIC(16028,0,"DEL") = @
. . . . ^DIC(16028,0,"GL") = ^DIZ(16028,
. . . . ^DIC(16028,0,"LAYGO") = @
. . . . ^DIC(16028,0,"RD") =
. . . . ^DIC(16028,0,"WR") = a
. . . . ^DIC(16028,"%",0) = ^1.005^^0
. . . . Global ^
Table 41 lists the possible error codes returned with the FILESEC^DDMOD API:
Table 41: FILESEC^DDMOD API—Error Codes Returned
| Code | Description |
|---|---|
| 401 | The file does not exist or the File Number that was passed was less than 2. |
Reviewed/Updated: May 2026