Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

A simple one

Posted on 2003-03-19
6
Medium Priority
?
1,973 Views
Last Modified: 2009-04-01
Can anybody tell me what object type *SQLPKG is ??
0
Comment
Question by:theo kouwenhoven
  • 3
  • 2
6 Comments
 

Expert Comment

by:Misc_Knowledge
ID: 8168331
On the AS/400, *SQLPKG is an object type.
0
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 8170274
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
 
LVL 33

Expert Comment

by:shalomc
ID: 8172960
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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 8179942
Hmmm, a little poor info on that link.

Is there some example to find (I double the points)
0
 
LVL 33

Accepted Solution

by:
shalomc earned 240 total points
ID: 8203027
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
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 8203414
Great Thanks !!!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How does storytelling impact the web? What goes into a great story on the web? And how can it be used for marketing purposes? All of these questions will be answered.
The deadly train derailment that occurred recently in DuPont, Washington, raises a lot of questions. It was a new route, the first trip tested with passengers, and the train was travelling at 50 mph over the zone’s speed limit. Could IoT play a role…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question