8 Work with File Specifications

This chapter contains these topics:

The program generator requires that you specify the files for your program. The program generator adds any necessary validation files and servers.

File specifications allow you to enter the database files your program uses. After you select your specific program type, continue by completing the File Specifications screen. The system stores information in F93102 and F93103 and creates the F93105 records.

A significant feature of the Program Generator is its interpretive ability to include secondary editing and referencing files.

This chapter includes the following tasks:

8.1 What Are File Specifications?

A key step in generating source code is that you correctly specify the master files for a program. The database Input/Output operations depend on the files you specify.

PROGRAM TYPE DESCRIPTION SPECIFICATION
A0010

A0020

C0010

C0020

C0025

E0010

SFL (IBM Subfile) Inquiry

Single Record Inquiry

Standard Report

Standard Report -

Subheading

Standard Report - Subheading above Columns

Window

Specify the master file with an M or 1 in the Input field.
B0010

D0040

D0045

D0060

X0010

Y0020

Y0030

Single Record Maintenance

SFL Maintenance - KEY

SFL Maintenance - KEY, No Action Code

SFL Maintenance - KEY

Batch Update - 1 File

File Conversion - 1 File

File Conversion - 1 File

Specify the master file with an M or 1 in the Update field
D0100 SFL Maintenance - KEY,

2 Update Files

Specify the master file, which the system maintains in the SFL Control format, with a 1 in the Update field. Specify the transaction file, which the system maintains in the SFL format, with a 2 in the Update field.
D0010

D0020

D0030

D0070

D0070

D0080

D0090

SFL Maintenance - RRN

SFL Maintenance - RRN

No Action code

SFL Maintenance - RRN

No Action code

SFL Maintenance - RRN

SFL Maintenance - RRN

SFL Maintenance - RRN

No Action code

SFL Maintenance - RRN

Specify the logical file which the system uses to fill the subfile, with a 1 in the Input field. Also, enter a File Information Data Structure name for the logical file in the fold area.

Specify the physical file that the system updates with a 2 in the Update field. Also, enter N in the Key field for the physical file in the fold area.

D0050 SFL Maintenance - RRN,

2 Update Files

Specify the master file, which the system maintains in the SFL Control format with a 1 in the Update field.

Specify the logical file that the system uses to fill the subfile with a 3 in the Input field. Also, enter a File Information Data Structure name for the logical file in the fold area.

Specify the physical file that the system updates with a 2 in the Update field. Also, enter N in the Key field for the physical file in the fold area.

X0020

X0030

Y0010

Batch Update, 2 Files

Batch Update, 2 Files

File Conversion, 2 Files

Specify the input file with a 1 in the Input field. Specify the output file with a 2 in the Update field.

The Program Generator requires that you:

  • Specify one master file with an M or a 1. Do not specify one file with an M and another file with a 1.

  • Enter the correct function code on the Software Versions Repository for the screen or report. Otherwise, the Program Generator does not generate moves to the screen or report.

You can use non-JD Edwards World files with the Program Generator, but you must enter the file in the Software Versions Repository.

The Program Generator does not require that you enter values in the Input, Output, or Update fields for a screen or report.

After you complete the appropriate fields on the File Specifications screen, a job runs interactively that analyzes the file specifications and creates records for three Program Generator files. As the system processes this job, messages display at the bottom of the screen.

File Description
File Specifications F93102 The system updates this file with one record for each file in the File Specification.
  • If the master file includes a Business Unit field, then the system adds the Business Unit Security file (F0001) to the File Specifications.

  • If the master file is for an interactive program and contains a field that uses a validation file, then the system adds that file to the File Specifications. If you later decide that the file validation is not necessary, you can delete it on the File Specifications screen.

Data Base Format Parameters F93103 The system updates this file with one record for each format in each file.

If the file is a database file, then the F93103 record contains the name of the Key List that the Program Generator uses, and the names of the key fields.

Detail Program Logic Parameters F93105 The system updates this file with one record for each field in each file. The system uses the records in the Detailed Programming Facility.
  • If the file is a master file or device file, then the system includes all fields.

  • If the file is a database file that you use only for input purposes, then the system includes only the key fields.


Note:

If you make changes to the fields in any of the files you list in the File Specifications, you must run the File Specifications again. If you delete a field from a file, you must manually delete that field from the Detailed Programming Facility. Running the File Specifications again does not remove records from the F93105 file.

To enter file specifications

  1. On Define Generator Specification, enter 1 in the following field next to File Specifications

    • Option

    Figure 8-1 Define Generator Specification (Enter File) screen

    Description of Figure 8-1 follows
    Description of "Figure 8-1 Define Generator Specification (Enter File) screen"

  2. On File Specifications, complete the following field:

    • File

  3. Complete the appropriate field:

    • Input

    • Output

    • Update

    • Add

    Figure 8-2 File Specifications screen

    Description of Figure 8-2 follows
    Description of "Figure 8-2 File Specifications screen"

    If you specify Update for a file, the Program Generator examines all fields in that file and includes any other files necessary to edit those fields during an update.

  4. Choose Extended Parameters (F4) to complete the fields in the fold area.

    Figure 8-3 File Specifications (Fold) screen

    Description of Figure 8-3 follows
    Description of "Figure 8-3 File Specifications (Fold) screen"

Field Explanation
File The member ID of the file used by the program.
Input A code used to specify that a data file will be used as input only by the program being generated. The value entered in this field designates secondary meanings for the use of the file: "M" or "1" thru "9" = Master input file No. 1 thru No. 9,

P – Primary input file. The "P" will generate the F specification as input primary

S – Secondary input file. The "S" designates input secondary.

X – Input file. Any master file designation or an "X" will generate the RPG file (F) specification as input full procedural.

When working within a Report program type: Files are not treated as input/primary. The program forces a read of the file for control level processing. You can only define one master file read within a report.

Output A code of X indicates this data file is used as output only by the program to be generated. The RPG file (F) specification will be generated with a file type of O in position 15.
Update A code in this field designates that a file is to be updated within the program being generated. The value entered in this field designates secondary meanings for the use of the file:

M or 1 thru 9 - Update master file

P - Update primary file

S or X - Update secondary file

T - Update transaction file

When defining a subfile transaction processor program type that updates the master file by relative record number, you must designate the keyed file as master file No. 1 and the file updated by relative record number as master file No. 2.

Add A code of X specifies that a file will have records written to it in the program being generated.

The data file designated as the master file in all file maintenance programs must be designated as allowing file additions.

A code of X will generate an A in column 66 of the file (F) specification in RPG.

Src Lib/File The Library Name field contains the name of a valid AS/400 library name. Defaults from SVR.

In the Program Generator Data File parameters this library name is the library where the data file's source file resides. For logical files it is necessary that the based on physical file's source exist in the same source file.

Keyed(Y/N) A code of Y indicates the data file being specified is keyed. A value of N indicates the file access will be by relative record number. The default value is Y.
  • If processing by RRN, the physical file that is being updated must be specified as keyed = N.

File Info DS Name assigned to an RPG III file information data structure if needed for an associated data file.
  • If processing by RRN, the logical file that is used to retrieve database records must have a file information data structure name. In addition, you must define SH#RRN as a hidden field on the SFL format of the video, since the Program Generator uses this field to store the relative record number.

  • Suggested naming conventions are INFDS1, INFDS2, and so forth.

  • Used with a keyed data file that does not have UNIQUE keys.

If you use the POST operation code from IBM for a file information data structure, you must do it for every file information data structure in the program.

PF Src Lib/File Library where the source resides for the physical file linked to the logical file.
External(Y/N) The External File field designates to the program generator whether or not you wish the data file being specified to be an externally defined file or an internally defined file. The default is "Yes" if left blank.

Absolutely no data files specified in normal application software created by JD Edwards World and Company may be internally defined. This parameter is strictly reserved for files designated in multi-file access utility functions that deal with source files or other types of system software.


8.2 Function Exits

Extended Parameters (F4)

Choose Extended Parameters (F4) to display the fold area with the library names of the source files. Default library names are in the Software Versions Repository and your library list.

Data Model (F5)

Choose Data Model (F5) to access the Work with File Relationships screen to build the data model. You must build or rebuild the Cross Reference Index before you can view the data model by choosing Cross-Ref Index from the Rebuilds and Global Updates menu (G9642).

Search (F9)

Choose Search (F9) to access the Software Search facility. On the Software Search facility, you enter a program name to view all programs that meet or are greater than the search criteria.

Notice that the system updates the fields on this screen from your File Specifications.

To generate source code from file specifications

When you generate the source, the system submits a batch job to process your program specifications. The system submits the job to the generation job queue in your CASE Profile. This naming convention for this job is your member ID with a prefix of G.

  1. On Software Versions Repository, locate a member.

    Figure 8-4 Software Versions Repository (Source Code) screen

    Description of Figure 8-4 follows
    Description of "Figure 8-4 Software Versions Repository (Source Code) screen"

  2. Enter 15 in the following field to generate the source and help.

    • Option

  3. Enter 14 in the following field to compile the program.

    • Option

  4. Review the program compile and correct any errors.

  5. Repeat the steps to generate and compile if necessary.