Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only
Expand all | Collapse all

Run SQL Scripts from ACS for IBM i

  • 1.  Run SQL Scripts from ACS for IBM i

    Posted Fri March 24, 2023 03:59 PM

    image on the left is the result of double clicking on an SQL script (.sql) from the ifs.  Image on the right is when i used the open file menu option to open the exact same member, yet there are 2 different results...



    ------------------------------
    David Strawn
    ------------------------------

    #SQL


  • 2.  RE: Run SQL Scripts from ACS for IBM i

    Posted Sun March 26, 2023 11:50 AM

    Is that a question? The one on the left has a "Not Connected" status, so I would guess that file is cached on your PC, while the one on the right is loaded from your IFS.



    ------------------------------
    Robert Cozzi
    ------------------------------



  • 3.  RE: Run SQL Scripts from ACS for IBM i

    Posted Mon March 27, 2023 10:31 AM

    Every time I open a file it is making me connect to the IBM i...  is there a setting that causes it to retain the connection until I power off?

     

     






  • 4.  RE: Run SQL Scripts from ACS for IBM i

    Posted Mon March 27, 2023 08:20 PM

    Dear David

    >>>> Every time I open a file it is making me connect to the IBM i...  is there a setting that causes it to retain the connection until I power off? <<<<

    In the old and unsupported IBM i Access for WIndows, there is a preference setting to Prompt Every Time you connect any of its components to IBM i. I see no such setting in Access Client Solution.   Are you using Run SQL Script from this IBM i Access for Windows?    If so, you can set it to use the same connection (I do not remember the wording of the option).



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 5.  RE: Run SQL Scripts from ACS for IBM i

    Posted Tue March 28, 2023 10:06 AM

    You can set a connection as default, but I already have that set...  when you open Run SQL Scripts, it connects automatically, the problem comes in when you double click on an .sql member from RDi – that is when it shows as not connected...  which is not a problem if you are just looking at a script, but if you want to run it, then you have to connect even though there is only 1 connection defined and it is the default...  that may be how it is supposed to work, just would be nice if you could save connection information for the member...  I guess the intention is to manage members from Run SQL Scripts interface...

     

     

     






  • 6.  RE: Run SQL Scripts from ACS for IBM i

    Posted Tue March 28, 2023 09:09 PM

    Dear David

    >>>>   ...... that may be how it is supposed to work <<<<

    I confirm that is the way it works.  When you invoke Run SQL Script from the main GUI windows of Access Client Solution, it immediately prompts you to log on to the current system specified in ACS's main screen.   When you invoke it from outside of ACS screen (Windows' file association mechanism at work), it does not try to connect to any system until you want to do some thing with it that needs an established connection. Or you can manually start the connection from its menu bar.



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 7.  RE: Run SQL Scripts from ACS for IBM i

    Posted Wed March 29, 2023 10:57 AM

    Thank you...  I will make sure to open from inside ACS from now on...

     

     






  • 8.  RE: Run SQL Scripts from ACS for IBM i

    Posted Mon March 27, 2023 02:54 AM
    Edited by Satid Singkorapoom Mon March 27, 2023 04:06 AM

    Dear David

    Another possible explanation for what you encountered is that you opened the first file from a Windows network drive that was mapped to IBM i NetServer IFS but the second file you opened from a "member" of a source physical file in DB2 library. When referring to a file in IBM i context, the word "member" has a specific meaning that other platforms do not have.  Stream file in IFS does not support this concept of file member. So, I wonder if you used this word in an exact meaning or not in your post? 

    Did you take your action more than once and still see this same strange result every time?  If so, you should post the screens of your intermediate actions for each case as well. The clue for explanation may lie somewhere in these intermediate steps of your action.



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 9.  RE: Run SQL Scripts from ACS for IBM i

    Posted Mon March 27, 2023 10:39 AM

    I have no link to the ifs on my laptop except thru RDi...

     

    By the way I think Albert Einstein had it wrong...  Education is the learning of facts but experience is the training of the mind to think based on those facts – but who am I to disagree with a genius!

     

     

     






  • 10.  RE: Run SQL Scripts from ACS for IBM i

    Posted Mon March 27, 2023 09:08 PM
    Edited by Satid Singkorapoom Mon March 27, 2023 11:07 PM

    Dear David

    I'm just able to see clearly both your screen shots and it is very clear that these two ARE NOT THE SAME CODE. Please go through them line by line and you will see clear differences of the code.  The first difference I see is on line 7-9 on the right side which has one more line and different code than the left. Next difference I see is the last two lines of the right side that are different from the left side.

    To me, it is likely that you opened two different source code files without your awareness.   To check on this, from Run SQL Script tool main menu, you can try looking at  File --> Recent Files that may gives you some clue on this issue.



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------



  • 11.  RE: Run SQL Scripts from ACS for IBM i

    Posted Tue March 28, 2023 03:26 PM

    See answers below

     

     






  • 12.  RE: Run SQL Scripts from ACS for IBM i

    Posted Mon March 27, 2023 12:09 PM
    Edited by David Strawn Mon March 27, 2023 02:01 PM