A simple one

Can anybody tell me what object type *SQLPKG is ??
LVL 17
MurpheyApplication ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Misc_KnowledgeCommented:
On the AS/400, *SQLPKG is an object type.
0
MurpheyApplication ConsultantAuthor Commented:
Yes I know, an object type of the type *SQLPKG meaning SQL package, but what the ..... is an SQL package:
- Where are they come from
- What does it do
- How to create
- What can I do with it
- Why do I want to have a SQL Package



0
Shalom CarmelCTOCommented:
An object of type *SQLPKG is created and used when your application uses data from remote databases.

This object is placed on the remote system to manage the connection and the data exchange.

Note: It is not necessary to use SQL packages for a distributed application to work, but the are benefits...

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/info/sqlp/rbafymstpack1.htm

0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

MurpheyApplication ConsultantAuthor Commented:
Hmmm, a little poor info on that link.

Is there some example to find (I double the points)
0
Shalom CarmelCTOCommented:
Well, suppose you have 2 databases, let's put them on different servers.
You have an RPG (or any other supported language) program on systemA which should access the database on systemB.
You have 2 options:

A. In your SQLRPG program, use an explicit CONNECT statement, like this:
 CONNECT TO SYSTEMB USER murphey2 USING 'password'

and then run your SQL as usual, only now it will execute on systemB.

B. Write a regular SQLRPG program, but during compilation provide it with specific instructions to create a SQL package on the remote systemB:
CRTSQLRPG PGM(MYLIBO/PROGRAMA)  
          SRCFILE(MYLIBS/QRPGSRC)
          RDB(SYSTEMB)          
          USER(MURPHEY2)        
          PASSWORD('password')  
          SQLPKG(*PGM)          

This compilation will create a *PGM object on your systemA, and a *SQLPKG object on systemB.

At runtime, the local program will connect to the remote database via the SQL package for optimized results.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MurpheyApplication ConsultantAuthor Commented:
Great Thanks !!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.