On 29-May-2014 11:59 -0500, Jerry Draper wrote:
We are missing source for some 75 logical files (don't ask).

If they are SQL LF, or can be SQL defined, then there is the Generate SQL Data Definition Language (QSQGNDDL) API [or an equivalent, the feature in the iNav Database component].

For DDS LF, I would look to an already-existing application to effect what might be called something like Retrieve DDS Source (RTVDDSSRC), Retrieve Logical File DDS (RTVLFDDS), Retrieve Data Base File DDS (RTVDBFDDS), or some such.

We can do a WRKF on each LF and take option 8 to see what the LF
source should look like.

The Work With Files Option-8 is the Display File Description (DSPFD); typically, and as shipped, defaulting to: DSPFD TYPE(*ALL) FILEATR(*ALL)

Is there a command with a *OUTFILE option we could use?

There are a variety of Output File capabilities of the DSPFD command, many providing some information that is required to regenerate the DDS specifications.

Like DSPFFD but that isn't it.

The DSPFFD provides an Output File capability, and that would be required to get the logical field definitions [for when the Record Format is not shared with the based-on Physical File (PF), in which case the Data Description Specifications (DDS) for the Record Format of the LF would include no field specifications, only a PFILE() specification].

The combination of Display File Field Descriptions (DSPFFD) and at least the Display File Description (DSPFD) for TYPE(*ACCPTH) [to get key field information] can be used to generated the DDS for most LFs. For the Join Logical File (JLF) also the TYPE(*JOIN), for Multiple Format Logical Files (MFLF) also the TYPE(*RCDFMT), and for any Select\Omit also the TYPE(*SELECT) provide required details. To obtain some Create Logical File (CRTLF) specifications, the TYPE(*ATR) FILEATR(*LF) is beneficial.

Often a simple LF [single based-on PF] will have\share the same Record Format (RCDFMT) as the PF. The Display Database Relations (DSPDBR) of the based-on physical file specifying RCDFMT(*ALL) will list each Logical File that merely shares the PF Record Format; again, in that case, the LF DDS does not specify any field names [except possibly as k-specs, and that information is in the DSPFD TYPE(*ACCPTH) as noted above].

This thread ...

Return to Archive home page | Return to MIDRANGE.COM home page