ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Creating a Physical file (clone from existing)

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

  • Creating a Physical file (clone from existing)

    Good day,
    I have a production Physical file. I need to create my test file like the production one.
    I used CPYF to copy file. It created a file and copied data. I can do RQ and display data and DSPFD to see description.
    The problem is, when I run it in CL job I get "Pointer not set" error and the message reads file is not journaled.
    I checked with DSPFD and it is indeed not journaled.
    What am I doing wrong?

    Thanks,
    Lenny

  • #2
    Re: Creating a Physical file (clone from existing)

    a CPYF does just that, it copies the file structure and it's data. constriants, triggers, journaling is not copied as they are not truly a part of the file structure. you'll have to handle that yourself. pointer not set error doesn't really sound much like a journaling issue though. can you post the pointer not set and the previous 3 messages from the job log? perhaps there a different explanation. generally (in my experience anyway) "file is not journaled" occurs when the called program is trying to process the file using commitment control or it can just be an informational message from the SQL engine. but...IMO it's more likely that the file is not journalled is a red herring in this case and the problem lies elsewhere on a different instruction.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Creating a Physical file (clone from existing)

      Thank you !
      This CL is running in production.
      The only thing I changed in test was names of files from prod to test. There is commitment control in the pgm...

      Code:
        17700 - STRCMTCTL LCKLVL(*CS) CMTSCOPE(*JOB)                          
        17800 - CALL PGM(VC4WCUR)                                             
       Member UNITS not journaled to journal *N.                              
       Pointer not set for location referenced.                               
       Function check. MCH3601 unmonitored by VC4WCUR at statement 0000003273,
         instruction X'0000'.

      Comment


      • #4
        Re: Creating a Physical file (clone from existing)

        For commitment control, the file must be jounalled.
        Step by Step :

        - Create a receiver : CRTJRNRCV
        - CReate a journal : CRTJRN (reference to the receiver)
        - Start the journalling for the PF : STRJRNPF *both
        Patrick

        Comment


        • #5
          Re: Creating a Physical file (clone from existing)

          I may be mistaken but I thought CPYF will copy a file or CRTDUPOBJ can be used to copy a file maintaining any triggers etc that may be attached to that file. I think I remember IBM saying you had to use CRTDUPOBJ rather than CPYF when copying the QAQQINI file.

          Worth a shot.
          Ben

          Comment


          • #6
            Re: Creating a Physical file (clone from existing)

            That is true. That's because you need to include the triggers, constraints, etc on the QAQQINI file.

            Comment


            • #7
              Re: Creating a Physical file (clone from existing)

              use option 3 to copy the dds to some other library and after that using crtdupobj to create the object.now you get the file with records

              Comment

              Working...
              X