The Edit Data Base File tool provides a simple means of displaying or
maintaining a data base. A physical file or a logical file with a
single format may be processed. The EDTDBF command allows records to
be displayed, changed, added, or deleted. For a 'display only'
function, use DSPDBF2 or the EDTDBF function OPTION(*DSP).
No objects are created. EDTDBF/DSPDBF2 operate on the data using the
file definition. A typical command would be:
EDTDBF FILE(xxx)
Assuming the user is authorized (see later discussion), the first
record in the file would be displayed and could be maintained. If
the file is keyed, the default provides the first keyed record. If
the file is in arrival sequence, the first relative record is
provided.
When EDTDBF is used, each function is considered a mode:
Display mode Only a display of the data
Change mode Allows updates of the data
Delete mode Allows deletion of a record
Add mode Allows a new record to be added
Copy mode Allows an existing record to be used
as a base to add a new record
The base display shows one line per field and allows character field
lengths of up to 25 bytes to be entered or displayed. Larger fields
can be accessed by using the cursor and F4. Decimal fields up to 23
digits or up to 9 decimal positions are supported.
The Rollup/Rolldown keys may be used to access additional fields in
the record (if more than one page exists).
The F7/F8 function keys may be used to roll thru records in the file.
Rolling occurs by either arrival or keyed sequence depending on the
file definition and a command parameter.
A 'Hex' option exists to allow any data value to be entered. If
non-displayable data exists (below X'40') or invalid decimal data
exists, the 'Hex' mode is forced.
The major displays support help text that provides a detailed
description.
Variable length fields are supported.
DSPDBF2 considerations
----------------------
The DSPDBF2 command provides a 'display only' function. The user
must have *USE authority to the file.
A subset of the EDTDBF function is used. Only the Function keys that
are valid for a 'display only' mode are valid. The current mode is
not shown. The help text is unique for DSPDBF2.
EDTDBF with OPTION(*DSP) is the same function as DSPDBF2.
EDTDBF Security considerations
------------------------------
EDTDBF with OPTION(*DSP) is the same function as DSPDBF2 and requires
*USE authority to the file.
To prevent misuse of changing data, EDTDBF ensures proper authority
to the file when OPTION(*EDT) is specified. Users with *ALLOBJ
authority can perform all functions.
EDTDBF is designed for three types of situations:
** For displaying data in a file.
** For programmers testing in a test environment who need to
create and modify test data.
** For 'trusted users' who need to maintain most data base files.
To use EDTDBF, the user must have either of the following:
** All rights to the file to be edited. This is typical of a
test situation where the programmer who is testing owns the
file.
** Have *USE authority to the TAAEDTDBF authorization list and
*USE authority to the file to be edited. This allows Display
mode of the data in the file.
To use the other modes, the following authority is needed to
the file:
If a user is a member of a Group Profile and the Group Profile
is authorized to the TAAEDTDBF authorization list, it operates
as if the individual user was authorized to the authorization
list.
Authority required
Function to the file
-------- ------------------
Change Mode *UPD authority
Add or Copy Mode *ADD authority
Delete Mode *DLT authority
The program adopt function is not used by EDTDBF. Thus if a 'trusted
programmer' (one who is authorized to the TAAEDTDBF authorization
list) has all data rights to the Inventory file, the programmer can
use all of the EDTDBF functions to maintain the file. However, if
the 'trusted programmer' is not authorized to the Payroll file, none
of the EDTDBF functions may be used.
If a programmer is a member of a Group profile, the Group profile or
the individual programmer must have the authorizations previously
described to use EDTDBF.
There are no objects authorized to the TAAEDTDBF authorization list.
It is used at run time to see if the user can use EDTDBF for a file
he is not the owner of.
EDTDBF Command parameters *CMD
-------------------------
FILE The qualified name of the file to be edited. The
library value defaults to *LIBL. *CURLIB may also
be used.
MBR The name of the member in the file to be edited.
The default is *FIRST. *LAST may also be specified.
OPTION Whether to allow full editing or a 'display
function' only. The default is *EDT which provides
for full editing (add, delete, update).
*DSP may be specified to provide a 'display
function' only. This is the equivalent of the
DSPDBF2 command which is part of the EDTDBF tool.
SEQ The sequence in which the file should be processed.
The default is *FILE meaning the sequence of the
file.
For example, if the file is keyed, the first record
displayed is the first record on the access path.
If the file has an arrival sequence access path, the
first record displayed is the first non-deleted
record with the lowest relative record number.
*RR may be entered to force a keyed sequence file to
be processed by relative record number.
DSPDBF2 Command parameters *CMD
--------------------------
FILE The qualified name of the file to be displayed. The
library value defaults to *LIBL. *CURLIB may also
be used.
MBR The name of the member in the file to be displayed.
The default is *FIRST. *LAST may also be specified.
SEQ The sequence in which the file should be processed.
The default is *FILE meaning the sequence of the
file.
For example, if the file is keyed, the first record
displayed is the first record on the access path.
If the file has an arrival sequence access path, the
first record displayed is the first non-deleted
record with the lowest relative record number.
*RR may be entered to force a keyed sequence file to
be processed by relative record number.
Restrictions
------------
** DDS validity checking is not used. Any data may be entered
into character fields. Any valid digits may be entered into
numeric fields.
** A maximum record size of 9999 bytes is supported.
** A maximum number of 998 fields may exist in the file.
** The maximum length character field supported is 800 bytes, but
the first 800 may be displayed (not updated).
** The largest field that can be worked on in Hex is 400 bytes,
but the first 400 may be displayed (not updated).
** The maximum length decimal field supported is 23 bytes.
** The maximum number of decimal field positions supported is 9.
** Files with null capable fields are not supported.
** Date type fields must be valid and have a year between 1600
and 4000. A default date field or time stamp date of
0001-01-01 is considered valid to be read or as a new value.
** When using F14 to prompt for a new key to 'position to', 1) a
maximum of 14 key fields can be entered, 2) a maximum of 25
bytes may be displayed or entered for any key field (Timestamp
key fields are assumed to be zero in position 26), and 3) a
maximum key length of 128 bytes is supported for 'key
positioning'.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKDAT3 Check date 3
CHKOBJ3 Check object 3
CHKTIMSTM Check timestamp
CVTHEX Convert to hex
CVTFRMHEX Convert from hex
DSPFLDA Display field attributes
DSPWINDOW Display window
HLRMVMSG HLL Remove message
LOCKMSG Locked record message
RTVDBFA Retrieve data base file attributes
RTVFLDA Retrieve field attributes
RTVFLDARR Retrieve field array
RTVKEYLST Retrieve key list
RTVOBJAUT Retrieve object authority
RTVSYSVAL3 Retrieve system value 3
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
EDTDBF *CMD TAADBJA QATTCMD
DSPDBF2 *CMD TAADBJA2 QATTCMD
TAADBJAC *PGM CLP TAADBJAC QATTCL
TAADBJAC2 *PGM CLP TAADBJAC2 QATTCL
TAADBJAC3 *PGM CLP TAADBJAC3 QATTCL
TAADBJAC4 *PGM CLP TAADBJAC4 QATTCL
TAADBJAC5 *PGM CLP TAADBJAC5 QATTCL
TAADBJAC6 *PGM CLP TAADBJAC6 QATTCL
TAADBJAC7 *PGM CLP TAADBJAC7 QATTCL
TAADBJAR *PGM RPG TAADBJAR QATTRPG
TAADBJAR2 *PGM RPG TAADBJAR2 QATTRPG
TAADBJAD *FILE DSPF TAADBJAD QATTDDS
TAADBJAE *FILE DSPF TAADBJAE QATTDDS
TAAEDTDBF *AUTL
** TAADBJAC is the CPP for EDTDBF. It calls the main processing
program TAADBJAR which uses TAADBJAD. Several sub programs
are called.
-- TAADBJAC3 converts to/from hex.
-- TAADBJAC4 uses DSPWINDOW to describe a record that was
deleted by another user.
-- TAADBJAC5 accesses authority information about the
file.
-- TAADBJAC6 determines the number of records in the file.
-- TAADBJAC7 accesses the key list information on the
first use of F14.
-- TAADBJAR2 is the RPG program that displays the key list
and gets the data ready for OVRDBF which is used to
position for random key access. The display file
TAADBJAE is used.
** TAADBJAC2 is the CPP for DSPDBF2. It also calls TAADBJAR. A
few unique displays are used in TAADBJAD along with
conditioned Function keys to prevent access. TAADBJAR has
switches set to ensure a 'display only' function.
|