Rocket DevOps (formerly Aldon)

 View Only
  • 1.  *QRYDFN Documentation??

    Posted 01-21-2022 15:16
    I am trying to find some step by step on using *QRYDFN.  Like most non-source objects, I have not done this enough to know.  I need to create a QUERY I can call from a program what will pass a value to limit the query.  Yes, I could write a program to do this, but for the effort involved, I would rather learn how to do the query.  I have other tools I can use from a 3rd party we have and will likely always have, but I prefer to use the IBM i tools when I can.

    ------------------------------
    David Taylor
    Senior Developer
    Range Resources Corporation
    Fort Worth TX US
    ------------------------------


  • 2.  RE: *QRYDFN Documentation??

    ROCKETEER
    Posted 01-21-2022 16:10
    Hi David, 

    Thanks for your inquiry!  Creating queries on the IBMi does have it's limitations, for example, it does not allow defining and saving the query to run over files in *LIBL.  This is an IBMi limitation, not specific to LMi.
    LMi does not manipulate the *QRYDFN objects under it's control, it's only promoting and deploying them with CRTDUPOBJ, save and restore.

    You can use below steps to create and manage your *QRYDFN objects. This approach allows the objects to be modified in DEV and promoted to production without having to do anything else in production.

    1. Add or check out the query into DEV
    2. Create the file(s) in QTEMP
    3. Modify the query over the QTEMP files and save it outside of LMi.
    4. Delete the files in QTEMP.
    5. Check out the program (RPG or CLLE) and put in an OVRDBF before, and DLTOVR after, running the query (with *LIBL).
    6. Promote the queries and program together.

    Please let us know if you have further questions. 

    Best regards,
    Jack Zhang

    ------------------------------
    Jack Zhang
    TSE
    Rocket Software Inc
    Atlanta GA US
    ------------------------------



  • 3.  RE: *QRYDFN Documentation??

    Posted 01-21-2022 16:15
    Okay -- thanks for the quick reply.

    ------------------------------
    David Taylor
    Senior Developer
    Range Resources Corporation
    Fort Worth TX US
    ------------------------------