ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Easy-Stored Proc on AS400- (New to AS400)

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

  • Easy-Stored Proc on AS400- (New to AS400)

    I'm new to AS400. I'm a SQL Server database user but new at my job and we use both AS400 and SQL Server...

    My manager wans to use stored procedures on AS400 just like stored procedures in SQL Server.

    Any links or examples on how to create a stored procedure on AS400? For example, in SQL Server, I open up the Query Analyzer and just start coding my Stored Proc. How would I do that in AS400?

    (google has tons of info on sql server stuff but hard to find info on AS400).

    Any good tutorials/info to get me familiar with AS400?

    Thanks.

  • #2
    Re: Easy-Stored Proc on AS400- (New to AS400)

    Im working on an example right now....I will post indetail this evening.

    take care & welcome to code400
    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


    • #3
      Re: Easy-Stored Proc on AS400- (New to AS400)

      Thank you so much. Looking forward to seeing the example..

      Not sure why my manager is making such a big deal out of stored procedures on AS400 because SPs aren't a big deal in SQL Server...

      One thing he mentions (i'm new at this job) and since I'm new to AS400..let me ask you guys:

      My manager wants to keep the "data library" separate from the "stored procedure library". Somehow, he thinks the main library/database and stored procedures cannot co-exist. Is that true in AS400??

      for example, in SQL Server...we can have the database/library that contains the tables/files, stored procs, views, user defined functions, etc. Nothing has to be separate. I would think that in AS400...the main database where data resides should be able to keep and have stored procs. No need to create a whole new database/library just to keep stored procs. Right?

      Comment


      • #4
        Re: Easy-Stored Proc on AS400- (New to AS400)

        Hi,

        Can you ask you manager why he needs to use SP? Is it because he needs to integrate to "old" application programs or why?


        Bent

        Comment


        • #5
          Re: Easy-Stored Proc on AS400- (New to AS400)

          We're developing a web application using ASP.Net/VB.Net. 75% of clients have AS400 and some have SQL Server.

          In the SQL Server, we're going to have everything in the stored procedure. No in-line sql statements in the ASP.Net. In sql server,since stored procs are precompiled, it makes for a better, faster application.

          So, he wants to do the same in AS400. We want to have one set of code...either call the SP in SQL Server OR call the SP in AS400. We dont want to have any inline SQL specific to a database.


          I really dont see a big deal with stored procs in AS400. Not sure why my manager is making such a big deal of it.

          Comment


          • #6
            Re: Easy-Stored Proc on AS400- (New to AS400)

            You might want to check out the SQL Reference PDF:



            or the online help at:



            If you need even better performance than using ASP.Net/VB.Net to access the AS/400 data then take a look at the IceBreak application server at http://www.icebreak.info which gives you some of the same functionalities as your current ASP code.... just compiled source directly on the AS/400 using fx. ILE/RPG which should be really easy to use for you as you have no SQL directly in the source. Just mix HTML included source (external files) and logic.

            Comment


            • #7
              Re: Easy-Stored Proc on AS400- (New to AS400)

              Thanks for the links. Will look into that icebreak link. If it can be used with ASP.Net/VB.Net , then that would be great..

              my manager's goal is to have one set of code...point to AS400 or point to SQL Server. No in-line SQL commands.

              Will look at that IceBreak to see how that could help us out.

              Comment


              • #9
                Re: Easy-Stored Proc on AS400- (New to AS400)

                I really dont understand the big deal with stored procs and AS400/IBM series...

                This is what my manager says " We did a project and did not use stored procedures, we wish to use stored procedures and the .NET data provider.

                I know there are a number of ways to do it, even embedding sql in RPG code."


                He's asking where we are going to save the "script"... I said we create the stored proc in a database/library, the stored proc is going be there...the script can be saved in a text file where-ever..

                Comment

                Working...
                X