Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Question on CHGPF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question on CHGPF

    With CHGPF you can change a number of things about the file without causing a level check error. For example, you can change the column headings, the text description, by just changing the DDS and running the CHGPF command. chuck Opinions expressed are not necessarily those of my employer. "Mike Ross" wrote in message news:20b92742.-1@WebX.WawyahGHajS... | I have been looking through the archives and have looked up the command in the IBM CL Reference manual but have not yet stumbled upon the information that I am looking for. | | | I work at a fairly small shop, for file changes we make changes to the DDS and then recreate the physical file and all logicals based over the physical. | | | What would be the advantages/disadvantages of trying to utilize the CHGPF command for this process? | | | Is there some documentation that I have overlooked that will explain this?

  • #2
    Question on CHGPF

    The benefit to using CHGPF is that you don't have to go through the process of deleting the logicals, saving the data and copying to the new file, and then rebuilding all the logicals. You just run the one command, CHGPF, and it does all the steps for you. And it doesn't forget steps Scott Mildenberger

    Comment


    • #3
      Question on CHGPF

      Will the CHGPF command reattach triggers and constraints to a recompiled PF? Chris

      Comment


      • #4
        Question on CHGPF

        I just tried it on a file with triggers on our development box and the triggers are still attached. I didn't make any changes to the DDS but I still think the test is valid. I believe we have done this before when actually changing a file and it worked fine but can't remember for sure. We don't have any files with constraints so can't verify that but I would expect those to still be there also. Scott Mildenberger

        Comment


        • #5
          Question on CHGPF

          When executing a CHGPF on a file that the DDS actually changed, you will receive a "CPA32B2" Inquiry Message (Level 99) that requires a response. (I have yet to determine a way to do a CHGPF inside a CL program.) If you need to rebuild the file with attached Logicals/Triggers/etc, you may need to create your own version. The company that I work for has one where the Logicals are stored on a temporary file. The issue with that is if the Rebuild fails, then the Logical Files list is deleted. You may want to rename all of the Files to a Save version the recreate the Physical and all of the Logicals. After a successful copy of the data, the delete the Saved files. If the Rebuild is not successful, then either rest the files back the way they were or notify the calling program/User of the error.

          Comment


          • #6
            Question on CHGPF

            I have been looking through the archives and have looked up the command in the IBM CL Reference manual but have not yet stumbled upon the information that I am looking for. I work at a fairly small shop, for file changes we make changes to the DDS and then recreate the physical file and all logicals based over the physical. What would be the advantages/disadvantages of trying to utilize the CHGPF command for this process? Is there some documentation that I have overlooked that will explain this?

            Comment


            • #7
              Question on CHGPF

              One solution is to have a System Reply List Entry that changes the default response of CPA32B2 from 'C' to 'I', then have the job use the reply list. Example: ADDRPYLE SEQNBR(nnnnn) MSGID(CPA32B2) RPY(I) In the CL pgm, do CHGJOB INQMSGRPY(*SYSRPYL) Or use a job description that uses *SYSRPYL. If you want to keep your System Reply List as clean as possible, you could code the CL itself to do the ADDRPYLE and CHGJOB, run your CHGPF, then RMVRPYLE. The drawbacks are that you'd have to check for a SEQNBR collision, and other jobs could use the RPYLE while it exists.

              Comment

              Working...
              X