ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

DSPPGMREF and a file's fields in update or add mode

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

  • #16
    but for this case let's say i am looking for field X in file F1 for add or update mode what i did was selected option in path finder's main menu - 55 -Field X-ref then i selected option 8 - field where used and on this screen i entered field name 'X' and file name i gave option '*ALL' then i did F21- 'Print interactive' then it generated a spool file.

    then i created a flat file with 1000 length and in this flat file i copied spool file's data using 'CPYSPLF' command so now i have a PF which has this data but it has only a single field however all information is present in it but i can't use SQL query on it's single field to get desired data in colmnwise i mean in different fields like field name, file name, library name, how used ( i just need for add or update mode here)

    also somehow if i am able to get this information with well defined these desired fields in some new file as well then not sure how will I be able to find out all the programe names for a specific library where that particular field 'X' is being assigned value '1'.


    Thanks.

    Comment


    • #17
      but for this case let's say i am looking for field X in file F1 for add or update mode what i did was selected option in path finder's main menu - 55 -Field X-ref then i selected option 8 - field where used and on this screen i entered field name 'X' and file name i gave option '*ALL' then i did F21- 'Print interactive' then it generated a spool file.

      then i created a flat file with 1000 length and in this flat file i copied spool file's data using 'CPYSPLF' command so now i have a PF which has this data but it has only a single field however all information is present in it but i can't use SQL query on it's single field to get desired data in colmnwise i mean in different fields like field name, file name, library name, how used ( i just need for add or update mode here)

      also somehow if i am able to get this information with well defined these desired fields in some new file as well then not sure how will I be able to find out all the programe names for a specific library where that particular field 'X' is being assigned value '1'.


      Thanks.

      Comment


      • #18
        ...i did F21- 'Print interactive' then it generated a spool file....
        Choose the option that puts the results directly to a physical file, not spool file.

        Comment


        • #19
          i am not sure which option to choose for the same.

          Comment


          • #20
            Contact Hawkeye, Developers of Pathfinder iSeries Development Tools (hawkinfo.com)

            i am not sure which option to choose for the same....
            Last edited by MFisher; March 2, 2023, 10:49 AM.

            Comment


            • #21
              Originally posted by John192 View Post
              no i have ACS but with limited functionality running sql scripts feature is not present in it.

              as i just have SEU so do i need to run all these sql queries one by one? or could you please number them here to be run in SEU one by one?

              and these 5-6 queries for each field i need to execute so total 6 *6 =36 times i need to run these sql queries to get desired result here?
              You could run the code ( except for last SELECT query ) in an RPG with a passed in variable of the field name.
              Then run the last SELECT query in an SEU SQL screen from the same session so the QTEMP file still exists.

              ( Stupid CODE 403 errors trying to update this post )



              ​​
              Last edited by MFisher; March 2, 2023, 03:28 PM.

              Comment


              • #22
                Did you find a solution ?

                Comment


                • #23
                  Thanks, I found there was an option F14- on Hawkeye tool itself to get the submit panel.

                  Then I entered 'Y' to get desired details in the out file .


                  Thanks much..​

                  Comment

                  Working...
                  X