11 Work with the Detailed Programming Facility

This chapter includes these topics:

The Detailed Programming Facility allows you to specify data field definition parameters. The Detailed Programming Facility screen lists the files in order and then each field in order within the files for the shell program the Program Generator creates. It also provides access to Field Detail and Program Design Language. The system creates this specification after you enter the File Specifications. Additionally, the system stores the information in the Detail Program Logic Parameters file (F93105).

11.1 About the Detailed Programming Facility

After you enter the file specifications, you access the Detailed Programming Facility from the Define Generator Specification screen.

To access the Detailed Programming Facility, you enter 1 in the Option field on the Define Generator Specification screen.

Figure 11-1 Define Generator Specification (Detailed Programming) screen

Description of Figure 11-1 follows
Description of "Figure 11-1 Define Generator Specification (Detailed Programming) screen"

The Detailed Programming Facility screen displays.

Figure 11-2 Detailed Programming Facility screen

Description of Figure 11-2 follows
Description of "Figure 11-2 Detailed Programming Facility screen"

Field Explanation
File Name The member ID of the file used by the program.
O P Allows for selection exits for each field.
Data Flow - Read From Indicates what information is to be loaded into the "Write To" field on the screen. This field is loaded automatically by CAP during the data field generation process initiated by adding files to the file specifications program. It is loaded based upon either a display file or report file data dictionary item name matching with the same data dictionary item name in the specified data base files. If no match occurs for the designated master file fields, this field is loaded with "*SKIP". (An entry of "*" followed by an internal logic module name allows creating standard calculation routines for certain fields.) An entry of *PROC will replace standard code with that generated by PDL.
Key Position Designates the relative position of the field in the key list. It is used in the program generator to generate key lists (KLIST). You may also define a partial key by blanking out the key position for a particular field. Just remember, partial keys should be defined from the bottom up; for example, don't remove key position 01 if there are 4 keys in the key list.
Right Adjust Parameter A code of:

Y – indicates the field should be right adjusted.

N – indicates the field should NOT be right adjusted.

C – indicates the field is a business unit and should be left filled with blanks instead of zeros.

A – indicates the field is an account number and the account number edit routine will be used for editing.

Can only be used when the Read From field is a video field and the Write To field is a data base field.

Data Dictionary Validation Designates whether the Program Generator will generate all the editing logic specified in the Data Dictionary for the particular data item. Enter a Y if this editing is desired, otherwise enter an N to bypass the Data Dictionary editing. Y is the default.

11.1.1 Available Options

Value Description
2 - Data Dictionary Access the Data Dictionary Repository for the data item.
4 - Select/Work With Access the Full Data Field Parameters screen for more detail on the field.
6 - Data Formula Entry (*PROC) Access the Data Item Formula Revisions screen where you enter Program Design Language (PDL) code.
9 - Delete Record Allows you to delete a field from the Detailed Programming Facility.

11.1.2 Function Exits

Repository Services (F6)

Choose Repository Services (F6) to access a screen of JD Edwards World technical functions or repositories.

Select *PROC Fields On/Off (F10)

Choose Select *PROC Fields On/Off (F10) to toggle between a display of either all fields in the Detailed Programming Facility or the fields with PDL.

11.2 About Full Data Field Parameters

Full Data Field Parameters allows you to create additional source code.

11.2.1 Primary Uses of Full Data Field Parameters

The primary uses of full data field parameters include:

  • Loading VC0 description fields: The system can store VC0 (descriptive data) about either a screen (video) or report in another file. Use this screen to enter the file in which you want the system to store the data about the field, the file key, where you want the system to store the description and the field with which you want to associate the field.

  • Enabling the database update function for subfiles: Entering N in the Entry Optional field enables the subfile field that controls data base updates

  • Creating the *ENTRY PLIST code for a program: Specifies which data fields you want to include in an *ENTRY PLIST statement and the sequence in which they will appear.

  • Protecting a field from the system clearing it every time the system executes the S001 routine when you generate the code.

    • You specify N in the Clear After (Y/N) field

    • The system requires this for output only fields that do not have a VC0 prefix

    • The system requires this for key fields in RRN program types

  • Adding error message the user creates

  • Suppressing edits in S005 for audit fields

  • Creating a partial KLIST for an input file

To access the Full Data Field Parameters screen, you enter 4 in the Option field next to the field for which you want to create additional source code on the Detailed Programming Facility screen.

Figure 11-3 Detailed Programming Facility (Full Data) screen

Description of Figure 11-3 follows
Description of "Figure 11-3 Detailed Programming Facility (Full Data) screen"

The Full Data Field Parameters screen displays.

Figure 11-4 Full Data Field Parameters screen

Description of Figure 11-4 follows
Description of "Figure 11-4 Full Data Field Parameters screen"

Field Explanation
Source of Data Indicates what information is to be loaded into the "Write To" field on the screen. This field is loaded automatically by CAP during the data field generation process initiated by adding files to the file specifications program. It is loaded based upon either a display file or report file data dictionary item name matching with the same data dictionary item name in the specified data base files. If no match occurs for the designated master file fields, this field is loaded with "*SKIP". (An entry of "*" followed by an internal logic module name allows creating standard calculation routines for certain fields.) An entry of *PROC will replace standard code with that generated by PDL.
Dictionary Name The 4 character data item name from the data dictionary. Used extensively for field editing within the program generator.
Field Type Used to designate master file field names and display/report file field names within the data field parameter records.

M – indicates a master file field

P – indicates the field is in the control record portion of a video screen (so if not a subfile, all fields would be a P)

S – indicates the field is in the subfile portion of a video

D – indicates a field within a report detail format

H – indicates a field within a report heading format

T – indicates a field within a report total format

Data Field Use To determine how a data item is used on a video screen or report as far as:

I – input only

O – output only

B – both input and output

H – hidden field

Key Position Designates the relative position of the field in the key list. It is used in the program generator to generate key lists (KLIST). You may also define a partial key by blanking out the key position for a particular field. Just remember, partial keys should be defined from the bottom up; for example, don't remove key position 01 if there are 4 keys in the key list.
PLIST Sequence The PLIST Sequence field specifies to the Program Generator which data fields you wish to include as passed parameters on a *ENTRY PLIST statement and the sequence in which they will appear.
  • 01 - 32 are valid

  • Must enter as 01 and not 1

  • If the first parameter is passed a non-blank value, an auto-inquiry will be performed

Entry Optional Used with subfile maintenance programs to identify the field that controls database updates.
  • One field needs to be designated as Entry Optional: N

  • Defaults to a blank

Clear After (Y/N) Designates to the Program Generator whether a field is always cleared at the end of each transaction entry or is only cleared when the user presses the specific function key to clear the screen.

Y – indicates the field will be cleared at the end of each transaction entry. The default is Y.

N – indicates the field will not be cleared unless specified by the user by pressing the appropriate function key.

Right Adj (Y/N) A code of:

Y – indicates the field should be right adjusted.

N – indicates the field should NOT be right adjusted.

C – indicates the field is a business unit and should be left filled with blanks instead of zeros.

A – indicates the field is an account number and the account number edit routine will be used for editing.

Can only be used when the Read From field is a video field and the Write To field is a data base field.

Center (Y/N) A code of Y will center the data within the field when it is displayed.
Description File Used in conjunction with loading a VC0 description field.
  • Identifies the file that contains the description

Descr. File Key Specifies the key field name to use for retrieving the data description from the designated description file. Enter the field name used to chain to that file. If you need to use a KLIST, enter the KLIST name.

If this description is coming from the User Defined Codes file, enter the field that contains the "code" portion of the User Defined Codes key. For example, to retrieve state description using the Address Book file, you would enter ABADDS not DRKY01. The system code and record type will be retrieved from the data dictionary item for state code (ADDS).

The program generator will produce the code to chain to the appropriate file and move (left justified) the description to the specified output field (usually VC0xxx).

Dictionary Edit Controls the generation of data dictionary editing for fields in the master file.
  • Defaults to Y

  • Specifying N will result in no data dictionary editing for the value that is moved to a master file field

  • Is useful for audit fields such as User ID that can be loaded from the Program Status Data Structure and need no editing.

Error Msg No Identifies a custom error message to use when errors are detected on a screen field.
  • Loads the value in array EMK of subroutine S999

Validation File Specifies the file name to use for validating the current data field contents. This file name is automatically provided from the data dictionary if it exists.
Error Indicator Used to designate the error controlling indicator for a data item on a video screen. This indicator controls the standard error notification attributes for video screens (reverse image, high intensity and position cursor).
Error Index The Error Message Index field is the array index where a special error message number is loaded in the error message array. Each of the data item parameters which uses external file validation can override the standard error message (0002). A new index must be entered for these types of changes. Error indexes 1 through 20 are reserved for the program generator. Error indexes 21 through 30 are reserved for file validation. Error indexes 30 through 64 can be used for anything else.
Data Item Type This defines the type of data to be stored in the field. The data item types are defined in User Defined Codes, system code '98', record type 'DT'. Note: All amount fields should be entered as 15 bytes, 0 decimals, and data item type should be P (packed).
Data Item Size The field size of the data item.

NOTE: All amount fields should be entered as 15 bytes, 0 decimals, and the data item type should be P (packed).

Decimal Pos The number of positions to the right of the decimal of the data item.
Edit Code Determines how data is printed or displayed. Depending on the code, you can change the appearance of the fields as follows (standard IBM edit codes):
  • Show commas - 1, 2, A, B, J, K, N, or O

  • Show decimal point - 1, 2, 3, 4, A, B, C, D, J, K, L, M, N, O, P, Q

  • Show sign for negative - A, B, C, D ("CR") or J through Q ("-")

  • Suppress leading zeros - 1 through 4, A through D, J through Q, Y and Z

Refer to user defined codes (system 98/ type EC) for all valid codes, including additional JD Edwards World edit codes.


11.2.2 Function Exits

File Field Description Screen (F16)

Choose File Field Description Screen (F16) to access the File Field Description Screen. This function exit is field sensitive.

  • If the cursor is in the Description File Key field, and this field:

    • Contains a file name, the system enters the fields on the screen with the fields from the description file.

    • Is blank, the system displays a blank File Field screen for you to enter a file name and then displays the fields from that description file.

  • If the cursor is not in the Description File field, the system displays a blank File Field screen for you to enter a file name and then displays the fields from that description file.

11.3 Loading VC0 Description Fields

The Detailed Programming Facility allows you to specify what file to use to access a description for a screen (video) or report description field whose prefix is VC0 (VC0xxx).

11.3.1 Example

In the following example, QXXCC is a field in the Business Unit Master table (F0006) that contains the business unit value. The F0006 table also contains descriptions of the business units. MCDL01 is the field in the F0006 table that contains the business unit description and the system enters this description into VC0001.

Figure 11-5 Full Data Field Parameters (Example 1) screen

Description of Figure 11-5 follows
Description of "Figure 11-5 Full Data Field Parameters (Example 1) screen"

11.3.2 Example: User Defined Code

If you are accessing a description for a user defined code (UDC) field, you enter F0005 (User Defined Codes table) in the Description File and the value for the field for which you are accessing the description in the Description File Key field.

The Program Generator retrieves the Install System Code and User Defined Code Type from the Data Dictionary and builds the composite key to access the User Defined Code file.

Figure 11-6 Full Data Field Parameters (Example: UDC) screen

Description of Figure 11-6 follows
Description of "Figure 11-6 Full Data Field Parameters (Example: UDC) screen"

In the example above, QXXTY is a UDC field in the User Defined Codes table. F0005 contains descriptions of UDCs. DRDL01 is the field in F0005 that contains the UDC description and the system enters this description into VC0002.

Because a server program accesses the F0005 table, it is not necessary to include it in the File Specifications.

Loading field descriptions using this approach only works if the system enters the field description into a VC0 field.

Specifying a file does not guarantee that the system enters the file you specify into the File Specifications. You must review the File Specifications to ensure the files from which you want to retrieve descriptions are present. The exception is for files that you access with a server program.

To load the VCO Description fields

Complete the following fields:

  • Source of Data

  • Description File

  • Descr. File Key

Figure 11-7 Full Data Field Parameters (VCO) screen

Description of Figure 11-7 follows
Description of "Figure 11-7 Full Data Field Parameters (VCO) screen"

Field Explanation
Source of Data Indicates what information is to be loaded into the "Write To" field on the screen. This field is loaded automatically by CAP during the data field generation process initiated by adding files to the file specifications program. It is loaded based upon either a display file or report file data dictionary item name matching with the same data dictionary item name in the specified data base files. If no match occurs for the designated master file fields, this field is loaded with "*SKIP". (An entry of "*" followed by an internal logic module name allows creating standard calculation routines for certain fields.) An entry of *PROC will replace standard code with that generated by PDL.
Description File Used in conjunction with loading a VC0 description field.
  • Identifies the file that contains the description

Descr. File Key Specifies the key field name to use for retrieving the data description from the designated description file. Enter the field name used to chain to that file. If you need to use a KLIST, enter the KLIST name.

If this description is coming from the User Defined Codes file, enter the field that contains the "code" portion of the User Defined Codes key. For example, to retrieve state description using the Address Book file, you would enter ABADDS not DRKY01. The system code and record type will be retrieved from the data dictionary item for state code (ADDS).

The program generator will produce the code to chain to the appropriate file and move (left justified) the description to the specified output field (usually VC0xxx).


11.4 Enabling the Database Update Function for Subfiles

If you are designing a subfile maintenance program, you must define at least one field in your subfile as a required field.

In the following example, the Item ID (SFXIT) field is the field that controls database updates:

The system performs the following:

  • If Item ID is blank, but there is a database record for the subfile record, then the system deletes the database record.

  • If Item ID is not blank, then the system saves or updates the database depending on whether the database record exists in the subfile.

You must define one or more hidden fields in the subfile record if the program type uses:

  • Key processing for the subfile. The hidden field must be SHxxxx, where xxxx is the data dictionary item. There must be a SHxxxx field for each key field that is in the subfile record.

  • RRN processing for the subfile. The hidden field must be SH#RRN.

To enable the database update function for subfiles

On the Full Data Field Parameters screen, enter N in the Entry Optional field.

Figure 11-8 Full Data Field Parameters (Update) screen

Description of Figure 11-8 follows
Description of "Figure 11-8 Full Data Field Parameters (Update) screen"

11.5 Creating *ENTRY PLIST Entries

You use PLIST entries to define which data items to include in a parameter list. You can use a maximum of 32 parameters.

11.5.1 Example

The system uses data item VDXCC as the third parameter in the entry list of Subroutine S999. The program generator creates a field name, which is the same data dictionary item with a prefix of ##. The system moves this parameter field to VDXCC from the parameter field.

You must use the data item in the display file, not the database file, for creating PLIST parameters.

Figure 11-9 Full Data Field Parameters (Example 3) screen

Description of Figure 11-9 follows
Description of "Figure 11-9 Full Data Field Parameters (Example 3) screen"

If the parameter value is not blank, the system updates the variable $AUTO with a 1. When the system launches this program, this parameter informs the program to perform an automatic inquiry (S003).

Figure 11-10 Required Program Parameters screen

Description of Figure 11-10 follows
Description of "Figure 11-10 Required Program Parameters screen"

If the system retrieves this program directly, the CL program retrieving this RPG program must issue a blank parameter.

To create *ENTRY PLIST entries

On the Full Data Field Parameters screen, enter a two-digit number corresponding to the sequence of the parameter in the PLIST Sequence field.

Figure 11-11 Full Data Field Parameters (PLIST) screen

Description of Figure 11-11 follows
Description of "Figure 11-11 Full Data Field Parameters (PLIST) screen"

11.6 Protecting Fields from Being Cleared

This feature is useful when creating data entry programs with a repetitive data field. For example, when there are multiple occurrences of the date field on a screen, a user only needs to enter a date in the first occurrence of the date field.

  • The system clears all fields except those with a prefix of VC0 each cycle in Subroutine S001.

  • The default value for this field is Y.

  • The function exit F22 clears all fields.

To protect fields from being cleared

On the Full Data Field Parameters screen, enter N in the Clear After field.

Figure 11-12 Full Data Field Parameters (Protect Fields) screen

Description of Figure 11-12 follows
Description of "Figure 11-12 Full Data Field Parameters (Protect Fields) screen"

11.6.1 What You Should Know About

Topic Description
User Error Messages Updating the Error Message Number and Error Index fields adds errors to the EMK array in Subroutine S999.

For example, in Subroutine S999, the system applies error message 1684 to Error Index 21 of the EMK array. JD Edwards World reserves indexes 1 to 20.

You must modify your source to use this error message index.


Figure 11-13 Full Data Fields Parameters (Error Message) screen

Description of Figure 11-13 follows
Description of "Figure 11-13 Full Data Fields Parameters (Error Message) screen"

11.7 Disabling Data Dictionary Edits

This feature is useful if you add custom validation through the Source Entry Utility (SEU).

To disable Data Dictionary edits

Enter N in the Dictionary Edit field.

Figure 11-14 Full Data Field Parameters (Disable Data Dictionary) screen

Description of Figure 11-14 follows
Description of "Figure 11-14 Full Data Field Parameters (Disable Data Dictionary) screen"

11.8 Creating a Partial KLIST for a File

The Program Generator displays the full key list. You can change the key position to exclude subordinate elements.

11.8.1 Example

In the example that follows, the key list sequence for the Business Unit security file is:

  • User ID

  • File Name

  • Through Business Unit

If you want to use a partial key to access this file, start with the highest number key field and clear the Key Position (KY PS) field. If you need both the full key list and a partial key list, enter this using the SEU.

To create a partial KLIST for a file

On Detailed Programming Facility, clear the Key Position (KY PS) field, starting with the last element.

In the following example, clear the Key Position (KY PS) field for CC - Thru. The key for F0001 is the User ID and File Name, key positions 01 and 02.

Figure 11-15 Detailed Programming Facility (KLIST) screen

Description of Figure 11-15 follows
Description of "Figure 11-15 Detailed Programming Facility (KLIST) screen"