ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Use of EXTFILE and EXTDESC

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

  • Use of EXTFILE and EXTDESC

    I have a rather large complex program that uses a file called FILEA in a lot of different places. I have to introduce to the program some code that also uses this file. I am wondering if I define this file as FILEB using EXTDESC(FILEA) and EXTFILE(*EXTDESC), will there be 2 separate open data paths to FILEA. In other words, if I read from FILEA in SUBR_1 and then read from FILEB in SUBR_2 will it change where FILEA is positioned to in SUBR_A. I have used the PREFIX keyword on FILEB so the field names are not the saame as those in FILEA

  • #2
    Anytime you have seperate DCL-F or F-specs for a file, it'll create a new open. These should have separate ODPs, unless you've done something like OVRDBF SHARE(*YES) or coded SHARE(*YES) in the CRTPF, etc.

    It really has nothing to do with EXTFILE or EXTDESC. Seperate file definitions are separate opens, so unless the open is set up to share the access path, they'll be separate ODPs.

    Comment


    • #3
      Originally posted by Scott Klement View Post
      Anytime you have seperate DCL-F or F-specs for a file, it'll create a new open. These should have separate ODPs, unless you've done something like OVRDBF SHARE(*YES) or coded SHARE(*YES) in the CRTPF, etc.

      It really has nothing to do with EXTFILE or EXTDESC. Seperate file definitions are separate opens, so unless the open is set up to share the access path, they'll be separate ODPs.
      Awesome, that's what I was hoping for, separate ODP's.....thanks

      Comment

      Working...
      X