SELDBF SELECT DATA BASE FILE TAADBJS |
The Select Data Base File command provides a display of designated
files within a library and allows the user to select one. A return
field describes the selected file. The command is designed for use
as a sub function in an application where the user wants to select
from a list of files. The DMOSELDBF command may be used to try a
demonstration of the function.
You must name a specific library. You may then select all or a
generic set of files names, subset by file type (PF or LF) and by
type (*DATA or *SRC). The default authority is *USE meaning the user
must have at least 'use' authority for a file to be displayed.
To try the demo, against all data PF files in QGPL, enter:
DMOSELDBF FILE(QGPL/*ALL) FILETYPE(PF) TYPE(*DATA)
The SELDBF command returns a variable and therefore may only be used
in a CL program such as:
DCL &RTNFILE *CHAR LEN(10)
.
SELDBF FILE(...) FILETYPE(*...) TYPE(*...) +
RTNFILE(&RTNFILE)
SELDBF escape messages you can monitor for
------------------------------------------
TAA9891 F3 or F12 was used to end SELDBF
TAA9892 The file name, type, etc does not select any files
Escape messages from based on functions will be re-sent.
SELDBF Command parameters *CMD
-------------------------
FILE The qualified name of the file (or files) to be
displayed. *ALL is the default for all files in the
named library. A specific file or a generic file
name may be entered.
A specific library must be entered.
FILEATTR The attribute of the file to be displayed. The
default is *ALL for all data base file types.
*PF may be entered to include only files specified
as PF or PF38.
*LF may be entered to include only files specified
as LF or LF38.
TYPE The type of the file to be displayed. The default
is *ALL for both data and source file types.
*DATA may be entered to include only data files
(non-source).
*SRC may be entered to include only source files.
AUT The authority required to the file. The user must
have at least the authority specified for the file
to be included in the display. The default is *USE.
*CHANGE or *ALL may be specified.
RTNFILE The file selected by the user (if any). The return
variable is required and must be specified as *CHAR
LEN(10).
If the user does not select a file, escape messages
TAA9891 or TAA9892 will be returned.
DMOSELDBF Command parameters *CMD
----------------------------
FILE The qualified name of the file (or files) to be
displayed. *ALL is the default for all files in the
named library. A specific file or a generic file
name may be entered.
A specific library must be entered.
FILEATTR The attribute of the file to be displayed. The
default is *ALL for all data base file types.
*PF may be entered to include only files specified
as PF or PF38.
*LF may be entered to include only files specified
as LF or LF38.
TYPE The type of the file to be displayed. The default
is *ALL for both data and source file types.
*DATA may be entered to include only data files
(non-source).
*SRC may be entered to include only source files.
AUT The authority required to the file. The user must
have at least the authority specified for the file
to be included in the display. The default is *USE.
*CHANGE or *ALL may be specified.
Restrictions
------------
Because SELDBF returns a variable, it may only be used in a CL
program and must be used in an interactive job.
Prerequisites
-------------
The following TAA Tools must be on your system:
ADJVAR Adjust variable
CHKOBJ3 Check object 3
RTVDBFA Retrieve data base file attributes
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDJLGMSG Send joblog message
TAAEXC TAA Execute command
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
SELDBF *CMD TAADBJS QATTCMD
DMOSELDBF *CMD TAADBJS2 QATTCMD
TAADBJSC *PGM CLP TAADBJSC QATTCL
TAADBJSC2 *PGM CLP TAADBJSC2 QATTCL
TAADBJSC11 *PGM CLP TAADBJSC11 QATTCL
TAADBJSR *PGM RPG TAADBJSR QATTRPG
TAADBJSD *FILE DSPF TAADBJSD QATTDDS
Structure
---------
SELDBF Cmd
TAADBJSC CL pgm
TAADBJSR RPG Pgm
TAADBJSD Display file
TAADBJSC11 CL Pgm to do RTVDBFA
DMOSELDBF Cmd
TAADBJSC2 CL pgm
|
Added to TAA Productivity tools March 15, 2002