Marc's Place

 

E$FFD - File Field Descriptions

Start Command

e$ffd [F4]

Call Parameters

file (a10/a10)
Name of the file and library of which you want a field listing.
 
do (a10)
Action to perform:
 
Value: *PRTFLDS
This value instructs the program create a SPOOL-file where the fields are listed in the same way as with *DISPLAY on the screen. The SPOOL-file is created by running the query E$FFD_QP.
 
Value: *PRTKEYS
This value instructs the program to create a SPOOL-file where only the key fields of a file are listed. The SPOOL-file is created by running the query E$FFD_QK.
 
Value: *DISPLAY [default]
This value instructs the program to display fields of a certain recordformat on the screen. You can choose the recordformat if there are more than one. Default the first recordformat is used. You can create sub-listings by entering values in the fields above the columns.
 
  Field   The program searches each field name for the characterstring you typed.
Description The program searches the description of each field for the characterstring you typed. This search is case sensitive.
Length The program shows all fields with a length greater or equal to the length you typed.
Type The program shows only those fields of the type you asked.
 
All search criteria are related to one another, so each column narrows the search down.
 
Value: *QRY0
This option instructs the program to execute query E$FFD_Q0. This query generates RPG/400 I-specifications of all fields from a file:
 
I                     000100100DBILIB    00
I                     001100205DBIFIL    10
 
To determine which fields are numeric, the Field/Record relation indicator position of the J-Format is filled with the numeric field length of the field description. This way, alphanumeric fields have a numeric length of 00. What you have to do when you copied this code into your source is to remove the zero at the 'number of decimals' position for the alphanumeric fields:
 
......................FromTo++DField+L1M1FRPlMnNu.
I                     00010010 DBILIB    00
I                     001100205DBIFIL    10
 
Next, clear the indicator position of all the lines you copied, so the line becomes a standard I-spec line:
 
......................FromTo++DField+............
I                     00010010 DBILIB
I                     001100200DBIFIL
 
Value: *QRY1
Executes query E$FFD_Q1. This query generates RPG/400 C-specifications with the CLEAR keyword for all fields from a file:
 
C                     CLEARDBILIB
C                     CLEARDBIFIL
 
Value: *QRY2
Executes query E$FFD_Q2. This query generates RPG/400 C-specifications with the MOVEL keyword for all fields from a file to move the contents of screen fields to database fields:
 
C                     MOVEL#ILIB     DBILIB     P
C                     MOVEL#IFIL     DBIFIL     P
 
If you have numeric fields, you will have to change the MOVEL keyword to Z-ADD yourself; the line is highlited automatically because the 'P' is not valid for numeric fields. Query cannot make this type of separation for you.
 
Value: *QRY3
Executes query E$FFD_Q3. This query generates RPG/400 C-specifications with the MOVEL keyword for all fields from a file to move the contents of database fields to screen fields:
 
C                     MOVELDBILIB    #ILIB     P
C                     MOVELDBIFIL    #IFIL     P
 
If you have numeric fields, you will have to change the MOVEL keyword to Z-ADD yourself; the line is highlited automatically because the 'P' is not valid for numeric fields. Query cannot make this type of separation for you.
 
Value: *QRY4
Executes query E$FFD_Q4. This query generates RPG/400 C-specifications with the KFLD keyword for the keyfields from a file:
 
C                     KFLD           DBILIB
C                     KFLD           DBIFIL
 
Value: *QRY5
Executes query E$FFD_Q5. This query generates RPG/400 I-specifications for the keyfields from a file:
 
I                     000100100DBILIB    00
I                     001100205DBIFIL    10
 
To determine which fields are numeric, the Field/Record relation indicator position of the J-Format is filled with the numeric field length of the field description. This way, alphanumeric fields have a numeric length of 00. What you have to do when you copied this code into your source is to remove the zero at the 'number of decimals' position for the alphanumeric fields:
 
......................FromTo++DField+L1M1FRPlMnNu.
I                     00010010 DBILIB    00
I                     001100205DBIFIL    10
 
Next, clear the indicator position of all the lines you copied, so the line becomes a standard I-spec line:
 
......................FromTo++DField+............
I                     00010010 DBILIB
I                     001100200DBIFIL
 
Value: *QRY6
Executes query E$FFD_Q6. Free.
 
Value: *QRY7
Executes query E$FFD_Q7. Free.
 
Value: *QRY8
Executes query E$FFD_Q8. Free.
 
Value: *QRY9
Executes query E$FFD_Q9. Free. 

Return Parameters

*N/A

What it does

 

The goal is to extend the use of the OS/400 command DSPFFD and to let it generate source code which otherwise you have to type in. This is accomplished by creating queries and naming them E$FFD_Qx, where x stands for 0 thru 9. This way, you can make your own queries and let E$FFD run them. Queries are searched in *LIBL, so you can overrule the standard queries by creating your own and storing them in a library of your own which then should have a higher position in your library list than E$LIB has.


The standard queries that are present in E$LIB store all output in the file QTEMP/FLDF, member FLDF. If you are in an editing session in SEU: press F15 and type FLDF as the member name, FLDF as the file name and QTEMP as the library.


In *DISPLAY mode, use F4 to choose another record format. You can press F4 at any field, it will always popup a record format list to choose from. F5 executes the DSPDBR command and F7 prompts the RUNQRY command for the file you have listed.


If you want to have more field information, type a 1 in front of the field, in the ?-column, and press <ENTER>.

Examples

 

Here's a screendump with a narrowed search:



Here's an extended field description:




Go to download page
© 1997- Marc Vos (and others)   -   Privacy Statement   -    Contact Me

On this website, Google Analytics is used to track visitor statistics. These are anonymised data about the number of visitors, which pages they visit on this site, from which regions they visit, which web browsers they use, etc.. You will also see non-personalised ads via Google AdSense. Cookies from Paddle or Paypal are placed when you click on a 'Buy now!' or 'Donate!' button, and possible cookies from Disqus when you use that system to comment on one or more blogposts.
Privacy Statement