ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Physical files associated with logical file?

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

  • Physical files associated with logical file?

    How do i get the list of Physical file associated with a given logical file. If the logical is a normal logical, DSPFD will do, but if the logical is a Join logical, how do i retrieve the information to be used in a program.
    I am doing this for a Source/object Management tool. I have to back up a logical file to a dynamic library, but the dependent PF is not available in the that dynamic library, so MOVOBJ or CRTDUPOBJ will fail issuing CPD3166.
    What is the best approach to this
    I have planned to get all the associated physical files duplicated to that dynamic library and then MOV this particular LF
    Thanks
    Sudarshan

  • #2
    Re: Physical files associated with logical file?

    no matter what you do MOVOBJ will not accomplish your goal...it simply moves the object to another place (meaning it's still attached to the PFs it was originally attached to.) but to get the based on PFs you can use
    Code:
    DSPFD FILE(WOLHDRS0) TYPE(*RCDFMT) OUTPUT(*OUTFILE) OUTFILE(QTEMP/TEMP)
    to get that info in a PF and read it to perform your CRTDUPOBJs and CRTDUPOBJ on the LF into the same library as your copies of the PFs and it will attach to the copies of the PFs instead of staying linked to the LFs original ones. there's also an API you could use but it's a PITA to work with.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Physical files associated with logical file?

      or use this old program cobbled togther by fishermen and forest rangers about 100 years ago.



      it could use a rewrite

      jamie
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment

      Working...
      X