- 1. What are the
terminology differences when working with SQL vs. the IBM i environment?
- Here are some of the terms used in each environment:
||library, journal, view
||keyed logical file
- 2. Is there a
limitation of statement length when embedding SQL/PRO into CL?
- Yes, SQL statement length must be less than 5000 characters due to IBM limitations.
- 3. What are the
iSeries systems requirements
to utilize SQLPRO?
- SQL/PRO 4 operates on iSeries systems at OS/iSeries V5R4
- 4. How do I install
SQL from the downloaded file?
- Locate the executable, and double click to begin
- 5. How do I start SQL
once it has been installed?
- Make sure that you have added the library SQLPRO to your
library list. To start SQL/PRO, enter STRPDSQL at the
- 6. How many characters
can a query contain?
- SQL/Pro now supports developing queries up to 32,750
characters in length.
- 7. Can I embed SQL/Pro
queries into my CL?
- There are two ways to embed an SQL/Pro query in your CL.
One way is to create a saved query in SQL/Pro and use the
STRQMQRY command in your CL to run it. STRQMQRY is an IBM
command and will run on all machines.
The other method of embedding in CL uses the SQL/Pro command
RUNPDSQL. Using this command you can build your query
dynamically or hard code the query statement in your CL. You
will need SQL/Pro installed on any machine that uses this
- 8. How do I select the
- You have the ability to select an output device of
either display, printer or database file. This is performed
by selecting option 1 from the Services menu (F13). You'll
be presented a panel that provides for the selection.
- 9. Will SQL/Pro run in
batch, or how do I select the execution environment?
- You are able to run your SQL statement either
interactively or in batch, depending upon how you have set
it. To set the execution environment, take option 2 of the
Service menu (F13). Enter a "B" for batch or "I" for
interactive. The default is Interactive: each time you start
SQL/PRO, it will begin with this setting.
- 10. How can I view my
previously executed SQL statements?
- You can review the history by selecting option 5 of the
Services Menu (F13). This will give you a summary listing of
statements, with each line showing the SQL statement and the
date and time it was run. This display is in chronological
order with the initial display showing the most recent page
of statements. You can page back and forth through the
statements with the roll keys.
- 11. How do I save a
- You can create a Saved Query from any SQL statement you
have on the SQL/PRO Statement Entry screen. Go to the
Services menu (F13) and select option 3 (Create Saved
- 12. How do I run a
- You can run a saved query either in batch or
interactively. Option 9 runs it interactively and 8 runs it
in batch. You can also run a Saved Query by selecting it
with option 1 which will copy it into the SQL Statement
Entry Screen. Then follow the normal run procedures from
- 13. Can I change a
query once it has been saved?
- Changing a Saved Query begins the same as overriding a
Saved Query. You select with option 1 to bring the statement
into the SQL Statement Entry screen. Make any changes to the
statement you want. Then, go to the Services menu and run
option 3 to save the query. You will be presented with the
name of the query, the description, the public or private
authorization and the output device that you specified when
you last saved this query. At this point you can change any
value before pressing enter. Obviously if you are changing a
Saved Query, keep the Query name the same. However, you can
change the name to save the query to a new Saved Query name.
- 14. Can I copy a saved
- The easiest way to copy a Saved Query is with option 3
from the service menu(F13). This will provide you with the
following screen from which you can copy to another Saved
Query of another name.
- 15. How do I delete a
- You can delete a Saved Query with option 4 from the
service menu (F13). You will be presented with a screen to
confirm the deletion.
- 16. How do I print a
- You can print a Saved Query with option 6 from the service
- 17. How do I move my
saved queries to another AS/400?
- Save the physical files SQL4LSQ and SQL4LHQ from the SQL/PRO
product library (i.e. PDSQL30) and restore them into the product
library on the new box. The saved queries themselves have been
saved in libraries of your own choosing. Each query consists of
two or three objects depending on whether or not the query has a
report format saved with it. These objects will have the same
name as the saved query itself but with different object types.
For example the saved query CUSTLIST will have 3 associated
- CUSTLIST type *QMQRY
- CUSTLIST type *FILE
- CUSTLIST type *QMFORM
You will need to save these query objects from their respective
library(s) and restore them into libraries of the same name on
the new box.
back to top
AS/400, iSeries, i5, Sytem i, IBM i and Power Server