The dliLib.AIBTDLI() system function
uses the AIBTDLI interface to invoke a DL/I function directly.
To invoke a DL/I function
using the CBLTDLI interface, use dliLib.EGLTDLI() or vgLib.VGTDLI().
Syntax
dliLib.AIBTDLI()(
func CHAR(4) in,
pcbName STRING in
parms... ANY)
- func
- A four-character DL/I function name, such as ISRT or GHNP.
- pcbName
- A
string that contains the name of the PCB in the runtime PSB.
- parms...
- A
complete list of parameters that match the number and type of
those that the DL/I function requires.
Example
If there is no EGL I/O statement
that corresponds to the DL/I call you want to issue, you can use dliLib.AIBTDLI().
For example, EGL does not provide an I/O statement that corresponds
to a DL/I FLD call against a Main Storage Database (MSDB) or Data
Entry Database (DEDB). You can use dliLib.AIBTDLI() to
issue the FLD call.
First define your PSBRecord part and base
a program variable on the PSBRecord:
Record CustomerPSBRecordPart type PSBRecord { defaultPSBName="STBICLG" }
// database PCB
customerPCB DB_PCBRecord { @PCB { pcbType = DB, pcbName = "STDCDBL",
hierarchy = [ @relationship { segmentRecord = "CustomerRecordPart" },
...]}};
end
mypsb CustomerPSBRecordPart;
Next, define your I/O
area and define and format your SSAs. Note that when you use
dliLib.AIBTDLI(),
you must correctly format the SSA according to the DL/I rules. You
can then issue the DL/I FLD call:
dliLib.AIBTDLI("FLD", "STDCDBL", myIOArea, mySSA1, ... mySSAn);
if (mypsb.customerPCB.statusCode != " ")
// do error processing
end
In this example, STDCDBL is the PCB name from
the runtime PCB. At runtime, the following actions occur:
- EGL
uses an AIB control block and moves "STDCDBL" to the resource
name field in the AIB.
- EGL converts dliLib.AIBTDLI() into
a
DL/I call that uses the DL/I AIBTDLI interface.
- After the
call, EGL sets the address of your customerPCB record
to align it with the address of the PCB returned in the AIB control
block. You can use the fields in the EGL predefined record DB_PCBRecord
to determine the results of the call.