|
|
All AS/400 Tip Categories
/
AS/400 Programming
/
Sharing DB files between two AS/400s
Question:
Hello!
I've got such a problem here.
We have 2 AS/400. One is V3R7, another V4R1. The second has SQL support
(I mean the one that I get when I type STRSQL), another does not.
Is it possible to access PFs that reside on the first AS from the second
one.
The problem is that all sort of SELECT type commands can be more or less
easily implemented by query, but not the REPLACE.
Any advice will be highly appreciated.
Answer(s):
You can use the SQL CONNECT command to connect to the other AS/400 and then
run standard SELECT, etc commands.
Although the other AS/400 does not have SQL it does have the SQL engine (as
do all AS/400s for file transfer, query, OPNQRYF, etc).
The select command will be transmitted to the other AS/400 and executed
there, the results will be transmitted back to the first AS/400.
The nice thing about AS/400 is that SQL is always on the system, as it is
part of the database. The only thing missing on your V3R7 is the user
interface ! A workaround for this is to create a SRC-PF with a length of
79, code the SQL statement in it and use the CRTQMQRY/STRQMQRY commands to
execute it.
I have written a CL-program and command for this to do some checking on the
source member and things like that, created an option for it in PDM and now
it looks like I have SQL (great for customers who don't).
DDM is one way, But a better solution for those who use SQL or Query
management is to use the remote database support...
If you have APPC communications configured between the two machines (ie. if
you can use STRPASTHR either system to the other), then you have all you
need to execute remote database queries. (And, no, your remote V3R7 does not
need the SQL licensed program installed, SQL runtime support is included in
the base OS)
Use the WRKRDBDIRE command to define the local database and the remote
database locations on both your systems. You will need to define an entry
for your local system and one for each remote database your system will
connect to.
You then use the CONNECT TO in your SQL or Query Management queries to
access the remote system.
If you move to V4R2, you will want to apply the ptf SF48822 to forego any
problems with update/delete operations.
DDM is the answer... If you use a lot of interactive inquiry, it can be
slow but with casual use... works fine..
Other tips in this category:
Click here to see all categories.
Socket Programming And Timeout Issues
Deleting Duplicate Records From A Table
What are data queues and how to use
Retrieving SMTP Name
RPGLE example for Dynamic Screen Manager API
Calling APIs from CL - with examples!
Compare two strings in RPG character by character
How to search all pgms in QCLSRC for a keyword
Retrieve Database File Description (QDBRTVFD) API
How to redirect the output to STDERR from RPG-IV
Using Multiformat Logical To Join 2 Identical File
D-Spec *LIKE DEFN
RPG: Converting Character to Decimal
Example of ILE RPG CGI Program
Handling ILE RPG Numeric Overflow
Help with Subfile Programming in RPG III
Zoned parameter in ILE RPG
What's the best way to do modulus in CL?
RPG Nesting Source Print Utility
More on changing the SIGNON screen
A silly ILE RPG question
Calling Validation List API From ILE RPG
Soft Coding Module Names
RPG Multidimensional Arrays in Action
Build a Page-Equals-Size Lookup Window
Procedures within an ILE RPG program
Break msg from RPG
Source Debugger for batch jobs
RPGLE debugging
Timing out display sessions in DDS
Building Dynamic Stored Procedures
Put Message in System Log
Dynamic RPGSQL
Randomize function for the AS/400
What's the fastest way to do a simple RPG lookup?
First time Data queue application in RPG
Print file overflow in ILE RPG
Mapping Fields To Arrays in ILE RPG
Named inidicators
STRQMQRY: comparision operator '=' isn't correct?!
DSPDTAARA to an outfile - possible?
PCL ESC codes in RPG
Sharing DB files between two AS/400s
Help: AS/400 subfiles
How do you change the signon screen?
Determining Even/Odd Values in queries
Get day of the week in RPG
Convert UPPERCASE to lowercase
RPG IV help using APIs
Help with data area API
Detecing IFS Files from RPG
SQL in a CL program
Calling AS/400 APIs from ILE RPG
CVTDAT command to convert an *MDY to a *LONGJUL
CPYSPLF Automation
Subfile Window background problem
Using IFS APIs w/ ILE RPG
Packed or unpacked fields?
QRYDFN to source and back
What does the "optimize" parm do?
Determining the calling program
Sockets in RPG?
Sorting a user space
OVRDBF and SECURE() keyword in an ILE environment
RPG record locking
RPG Differences: V2R3 to V3R2 upgrade
Getting the relative record number (RRN)
What is the longest parameter usable in RPG?
A C function that returns a string to an RPG pgm
Problems with ZADD *ZEROS
Can you highlight code in SEU?
Reusing deleted records - OK?
Is there an easy way to change edit codes?
Help - Windowed Subfiles
Logical Files and DDS
AS/400 'machine language' - MI Programming
Library lists and performance
How to use ERRSFL
Updating in CL
Record lock wait time
Message subfile problem
Physical File Joins
CL: Copying User Profiles
Commands and PARM
ILE RPG, RPG IV, vs. RPG/400
RPG and subfiles
Multiple subfiles
Field masking for passwords
SFLMODE keyword in an ILE program
Subfile size
Color coding records in a subfile
MSGLINE in windows
Controlling cursor movement on a display file
API returns error! Why?
Put an RPG Program on the Web
Variable length records in RPG
Differences Between RPG400, RPG IV, and ILE RPG
|