Hi Paolo,
I agree with Birgitta and would avoid LVLCHK(*NO); that's just asking for trouble in the future.
I assume this change doesn't have to go live so soon so I'd suggest two methods of attack.
Assuming the source code for all your production programs are in limited locations, you should use the PDM offering and search ALL of the source members for the name of the physical file and search for the name of each of the logical files over the physical file. Otherwise, you can list ALL of the source files in your system and search all of their members for the physical file and the logical files.
Do you have your files journaled? If not, you could just journal this one file and, as you are interested in knowing what reads the file as well as what updates, you could just journal for Open and Closes in the journal (in normal situation, I'd recommend omitting those entries and just journal updates - mind you, should you consider what updates the file and make appropriate changes for the new fields). What you should then do is look to create a new receiver each morning to give a clean cut; following that, display the journal output from yesterdays receivers (the system may have auto generated new receivers) so that you can query the output to display a list of objects referencing the physical file - over time you will build up a list of objects. The risk with this option is that you will miss the jobs that run periodically, like end of month or less often but it's still better than nothing.
If you're interested in more details on how to perform either of these steps, let me know.
You mention that you don't have any change management system. To deploy this change which consists of many programs, I would suggest you create a new (temporary) library, create a copy of the new version of the file (it does not need any data yet) - take care creating the logical files (make sure they are are pointing at the new file).
Set your library list to be a copy of production and put this new library at the top (so it is ahead of any production libraries and the new version of the file is referenced); compile the programs that reference this changed file into this temporary library.
When you are ready to deploy, you can copy the original file to the new file using the format options (*MAP *DROP).
Check the number of records match. If they do, move the original file to another (temporary) library - back this up afterwards and, if you have enough disk space, keep this online for a month or two just in case of any issues and you need to analyse the original data. You should also move all the original programs to this temporary library.
NOTE: From WRKOBJPDM, use the user options in PDM; set up one user option command to move the original objects from the production library to the 2nd temporary library and set up another user option command to move the new object from the 2st temporary library into the production library. You can then do WRKOBJPDM on the library holding the new objects, execute the command to move the original objects (enter the code against the first object and use F13 to repeat). Deal with any issues. Once everything moved, execute the command to move the new objects. You should end up with the first library being empty.
------------------------------
Tony Davis
------------------------------
Original Message:
Sent: Wed October 11, 2023 12:30 PM
From: Paolo Salvatore
Subject: Change PF/Alter table strategy
Hi,
we don't have a change management systems and a strong versioning of our source program.
Now we have the need of add two fields on the table most used on my server.
There are a lot of raw access to this table (with chain, read, write, update), about 1000 of programs use it, in write only a few programs, the major of this are in input.
What do you suggest? Because we have fear of make a chgpf we are thinking of an extension of this file with the new fields.
What are the risk if I add two fields in my table using lvlchk(*no)?
Because sure we can't recompile all the programs without a change management system,
------------------------------
Paolo Salvatore
------------------------------