765 pts.
 Find the Field Name in AS/400
When viewing the screen how can I see what the data field name is?

 

I am looking at the customer master screen, I see field I enter in cert# how can I find on the screen I am looking at what that field name is and what file it belongs to?



Software/Hardware used:
ASKED: September 24, 2010  3:47 PM
UPDATED: November 15, 2011  2:20 AM

Answer Wiki:
You need to look at the actual source code. A DSPF should have source in QDDSSRC (or whereever the development team stores the source). You can then look for the line# & Start position from the screen of the input field. When you find that in the source, you will find a field name. Now you need to go to the RPG or COBOL or whatever source and find out how that field is being populated or outputed.
Last Wiki Answer Submitted:  September 24, 2010  7:27 pm  by  CharlieBrowne   32,855 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,855 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

if you know the name of the data file (table) that the program uses you can use the DSPFFD (Display File Field Description) command to view the fields. these can be sent to an output file(*FILE) that can be printed by SQL or IBM Query tool.

of course, if there are multiple files in the program, you will need to look at them as well as the possible data placement source.

by reviewing the RPG and DSPF source code, you can determine which field(s) feed the screen file.

-Sarge

 950 pts.

 

Assuming a DDS-generated display file with no USRDFN (User Defined) usage –

Your program can retrieve the row & column that the cursor is on when the I/O brings information back. The I/O feedback area provides the coordinates. It also provides a record format name.

From the row/column and format name, your program can use the List Fields (QUSLFLD) API to find a field name. (You might also use the Retrieve Display File Description (QDFRTVFD) API, but it’s much more complex.)

Part of the problem is that there is no requirement to have any field names in the screen I/O — output could be USRDFN or even from the DSM APIs, or it might be a UIM panel group. The display device has no information at all about “field names” nor even “file names”. It only knows that some characters or attributes are to be displayed at some coordinates and that some typing may be allowed at some coordinates. The values are all sent back and forth as character strings in buffers across the network.

When viewing the screen…, there are no field names.

Tom

 108,055 pts.

 

We’ve made some assumptions of what you know/can do/are allowed to do.
Please come back, tell us how it’s going and ask more questions as you go.
Phil

 44,180 pts.

 

Looking at the File from the QDDSSRC helped me find the field

Thanks

 765 pts.

 

Very helpful – thanks!

 10 pts.