Retrieve Database Source

The Retrieve Database Source (RTVDBSRC) command retrieves the information from an existing physical or logical file and writes to a DDS member.

The typical command is

RTVDBSRC FILE(MYLIB/MYFILE) TOSRC(MYLIB/QDDSSRC)

This will extract the information from the named file and creates a new member (or updates an existing member) into the specified source file.

Comments originally entered in the source member will be lost. The field reference (and reference file) is not be retrieved by this tool. Multi-format files are retrieved as "closed as" possible but not a guarantee that all information are retrieved. The tool does not support Field concatenation.

Reasons to use this tool

Files were created using Sequel and no source member existed.

You lost your DDS source.

Installation

Member Type Source File
CRTRTVDB CLP QCLSRC
RTVDBSRC CMD QCMDSRC
RTVDB1 CLLE QCLLESRC
RTVDB2 RPGLE QRPGLESRC

Copy the individual member to the designated source file in your library. Take note that RPGLESRC has a length of 112 and the rest of the source uses the default 92 length.

Create the CRTRTVDB program:

CRTCLPGM PGM(Objlib/CRTRTVDB) SRCFILE(Srclib/QCLSRC)

Add the Objlib in your library list.

Call the CRTRTVDB program to create the utility.

CALL CRTRTVDB PARM('Objlib' 'Srclib')

Click on the links to download the source members.

CRTRTVDB | RTVDBSRC | RTVDB1 | RTVDB2

Move the files into your shared folder and use the CPYFRMPCD to move into the source file.

 

Back to AS/400 Journal

This page hosted by Get your own Free Home Page

1