5 pts.
AS/400 Fields
Hi, Would like to know if anyone has carried out Field Expansion Project on AS400. I would like to know strategies, tools used for FIELDS AT RISK IN DATABASE. I know about tools for Field Expansion, but want to know about Identifying the Fields at Risk

Answer Wiki

Thanks. We'll let you know when a new response is added.

The “Fields at risk” would be fields in other files that are getting their data from this expanded field. The target fields would also have ot be expanded.
You must first identify every program the uses the file you are modifying.
Next deterimne if that field is being used in those programs.
If not, you just need to recompile over the new object.
If so, you need to determine the usage and probably adjust the target location size, which could be a printer ouput or some other file.
It might also be used in a comparision and then an adjustment might have to be made for that.

Built in tools
DSPFFD can be used to get all fields in all files to a database
DSPPGMREF can be used to get most native accesses to the files.



The procedure behind field expansion is as follows:

1) First take a backup of the file to a temporary file and then change the field length. Now get the earlier data with CPYF using FMTOPT(*MAP *DROP):).

2) Check for all the dependent logical files(use DSPDBR).
If the same field was directly referred in any of the logical files, change its length also:(.

Recompile all the logical files:rolleyes:.

3) Get a list of all the programs which uses the PF or the LFs.
(you can use HAWKEYE tool for this, if this is not available look for some other method like FNDSTRPDM etc…)

Check which variable was based on the changed field and change its length if needed(If it is defined with a LIKE keyword, then no need)
Also look for the Display files those programs using. If any of the display file is refering this Field, change the length of DSPF field accordingly(make sure that proper positioning of the fields maintained so as to get the DSPF compiled:confused:.

Also make proper analysis of all the programs so that the change in length of the variable is not affecting the earlier functionality.

Finally recompile all the programs.

Make sure that Regression test performed successfully


Discuss This Question: 1  Reply

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • reg
    I wrote an application years ago thats still in use in many shops yet today. It creates a file of all programs and files they use (across all libraries -CL & RPG- you want included) using DSPPGMREF. It displays or prints all usage of PF,LF,DSPF and PRTF. Its free. If interested get me your email address. Reg
    280 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: