ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Creating a LF in Qtemp.

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

  • Creating a LF in Qtemp.

    Hi all.

    Suppose I have created a physical file in QTEMP library .Then can it be possible to create a logical file in QTEMP or any other user library based on the QTEMP physical file?

    Could anybody explain in detail?

    SKMA

  • #2
    Re: Creating a LF in Qtemp.

    Yes you can create a logical in QTEMP based on a file in QTEMP.

    DO NOT create a logical in any other library based on a physical file in QTEMP. Once a job finish the QTEMP library that was created for that job is deleted.

    May I ask why you want to do this?
    Never trust a dog to watch your food.

    Comment


    • #3
      Re: Creating a LF in Qtemp.

      Not sure why we would need to explain in detail.
      Creating a physical file in QTEMP is the same as creating a file
      in another library **Except ** that when the job ends if in batch or the
      user signs off if interactive then what ever is in QTEMP will be deleted from
      the system. So if you create a physical file in QTEMP and then create a logical
      over this file in lets say QGPL. Then when the job ends you will have a logical file in
      QGPL that has no physical file and all programs you have written to use this logical and the file for that matter will fail.

      In your program you should create both the physical and logical in QTEMP.
      use the OVRDBF to override the physical file to QTEMP if it exists in other
      libraries in your library list.

      When you create the logical file with CRTLF just specify the Library as QTEMP.

      Then your good to go
      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


      • #4
        Re: Creating a LF in Qtemp.

        I would be interested to know what would happem if a PF is created in QTEMP a LF in QUSER. If the logical isn't removed before the job ends will it:
        • end the job and remove the LF
        • leave the job running and maybe send a error message
        • end the job and leave the LF - would the LF be damaged?
        Never trust a dog to watch your food.

        Comment


        • #5
          Re: Creating a LF in Qtemp.

          I guess that would be a good test you'd think the job would hang with an error.
          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