I know my English is far from perfect.
You can also visit my personal homepage.
Sub ConnectExample() |
Public wspAS400 As Workspace, cntAS400 As Connection, dbAS400 As Database |
wspAS400
into Workspaces
collection.
QZDASOINIT
in QSERVER
subsystem. You can find it
with WRKACTJOB
, if there are several such jobs, see the joblogs.
It's possible to work with it in two ways:
WRKACTJOB
and choose 5-Work with
.
On the top of the screen is line like:Job: QZDASOINIT | User: QUSER | Number: 113844 |
STRSRVJOB JOB(113844/QUSER/QZDASOINIT)
STRDBG UPDPROD(*YES)
STRDBG PGM(Library/program) UPDPROD(*YES)
Term | Meaning |
Table | Data repository. Created through CRTPF or CREATE TABLE. |
Data space | Another term for data repository. |
Index | Binary tree built over table to order particular columns (keys) of the table and for quick binary searches. Created through CRTLF or CREATE INDEX. |
Temporary index | Index built 'on the fly' by the optimizer. |
Temporary result | Copy of data from an intermediate query step. Needed to complete the query. |
Access plan | Plan generated by optimizer on how to access the tables being queried. |
ODP | Open Data Path. Active path through which query data is read. |
Reusable ODP | ODP kept open when an SQL query is requested to be closed. Used next time query is opened. |
Before an application program with SQL statements is run, a relationship
between the program/SQL statement and the referenced tables, views, and
indexes must be established. This process is referred to as binding. The result
of a successful bind is an access plan. This access plan is created during
program creation for static SQL or during statement preparation for dynamic
SQL. It contains internal structures and information about the access methods
used to run a specific SQL statement. An access plan may become invalid if
changes to the database are detected. An example of a change is creating or
deleting an index for a referenced table. The access plan is a control structure and information that specifies how to run each SQL request in the most efficient manner. The access plan may be stored in the program (non-distributed SQL) or in an SQL package (distributed SQL). The process of binding:
|
Dim qryMyQuery As QueryDef, rstRecs as Recordset |
Dim qryMyQuery As QueryDef |
Sub ExecuteCmdExample() |
Sub MemberExample() |
dbAS400.Execute ("CREATE ALIAS MYLIB.MYFILEMBR1 FOR MYLIB.MYFILE (MBR1)")
|
Public Declare Function cwbSY_CreateSecurityObj Lib "cwbsy.dll" (ByRef lngSecurity As Long) As Long |
ExecuteAS400Cmd "STRDBG UPDPROD(*YES)" |
CRTSAVF MYLIB/MYSAVFILE
SAVOBJ ...
MYSAVFILE.SAV
file, which contains the objects.
CRTSAVF MYLIB/MYSAVFILE
RSTOBJ
.
For example if you create invoice database, you can store each month in one member.
Advantages:
Also the members are used for source files. This is reasonable, because AS has no directory hierarchy.
DCL &Number *DEC (15 5)
DCL &Number *DEC (3 0)
CALL PROG1 PARM(X'015F')