Print Page as PDF
Classic FileMan API: Adding New Entries & YES/NO Prompt ICR (10009)

Classic FileMan API: Adding New Entries & YES/NO Prompt    ICR (10009)

Name Value
NUMBER 10009
IA # 10009
DATE CREATED 1998/11/17
CUSTODIAL PACKAGE VA FILEMAN
CUSTODIAL ISC San Francisco
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE DICN
NAME Classic FileMan API: Adding New Entries & YES/NO Prompt
ORIGINAL NUMBER 10009
GENERAL DESCRIPTION
Can be used for adding new entries to a file.  Or for
YES/NO prompts.
STATUS Active
ID DICN
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
FILE
Used for adding new entries to a file or sub-file.
VARIABLES TYPE VARIABLES DESCRIPTION
DD Used
It is mandatory that you KILL the DD variable prior
to calling FILE^DICN.
DO Used
If DO does not contain the characteristics of the
file you are adding to, then you should KILL DO so that FILE^DICN can call
DO^DIC1 to retrieve those characteristics. NOTE: This variable is D with the
letter O, not zero.
DIC Input
The global root of the file.
DIC(0) Input
(Required) A string of alphabetic characters which
alter how DIC responds.  At a minimum this string must be set to null. The
characters you can include are:

E = Echo back information.  F = Prevents saving the entry number of the
matched entry in the ^DISV global.  Z = Zero node returned in Y(0) and
external form in Y(0,0).
DIC("P") Input
Used when adding subentries in multiples (see DBIA
#10006).
DA Input
Array of entry numbers (see DBIA #10006).
X Input
(Optional) Identifies the subscript at which the data
is to be stored; that is, the internal entry number of the new record, shown
as follows (This means that DINUM must be a canonic number and that no data
exists in the global at that subscript location.):

$D(@(DIC_DINUM_")"))=0 If a record already exists at the DINUM internal
entry number, no new entry is made. The variable Y is returned equal -1.
DIC("DR") Input
(Optional) Used to input other data elements at the
time of adding the entry. If the user does not enter these elements, the entry
will not be added. The format of DIC("DR") is the same as the variable DR
described under the discussion of DIE (see DBIA #10018).
Y Output
DIC always returns the variable Y, which can be in
one of the two following values:

Y=-1 Indicates the lookup was unsuccessful; no new entry was added.

Y=N^S^1 N is the internal number of the entry in the file, S is the value of
the .01 field for that entry, and the 1 indicates that this entry has just
been added to the file.
Y(0) Output
This variable is only set if DIC(0) contains a Z.
When it is set, it is equal to the entire zero node of the entry that was
selected.
Y(0,0) Output
This variable is also only set if DIC(0) contains a
Z. When it is set, it is equal to the external form of the .01 field of the
entry.
DTOUT Output
This is only defined if DIC has timed-out waiting for
input from the user.
DUOUT Output
This is only defined if the user entered an up-arrow.

YN
A reader for a YES/NO response.
VARIABLES TYPE VARIABLES DESCRIPTION
% Both
Input: Determines the default response as follows:

% = 0 (zero) No default % = 1 YES  % = 2 NO

Output: The processed user's response. It can be one of the following:

% = -1 The user entered an ^ (up-arrow).  % = 0 (zero) The user entered <RET>
when no default was presented OR the user entered a ? (question mark).  % = 1
The user entered a YES response.  % = 2 The user entered a NO response.
%Y Output
The actual text that the user entered.