The function differs from the EGLTDLI() dliLib function only in that it uses an index variable to reference the PCB for the call, whereas EGLTDLI() uses the name of the PCB record. EGL includes this function to ensure compatibility with the CSPTDLI() function in VisualAge® Generator.
vgLib.VGTDLI()(
func CHAR(4) in,
pcbindex SMALLINT in
parms... ANY)
To invoke a DL/I function using the AIBTDLI interface, use dliLib.AIBTDLI().
Record CustomerPSBRecord type PSBRecord { defaultPSBName="STBICLG" }
// 3 other PCBs
...
// database PCB
customerPCB DB_PCBRecord { @PCB { pcbType = DB,
hierarchy = [ @relationship { segmentRecord = "CustomerRecord" },
...]}};
end
mypsb CustomerPSBRecord;
Notice that you do not need
to specify the pcbName property for the
customerPCB record because the runtime PCB name is not used with vgLib.VGTDLI().
For this example, assume that there are three PCBs before the customerPCB
in the CustomerPSBRecord. vgLib.VGTDLI("FLD", 4, myIOArea, mySSA1, ... mySSAn);
if (mypsb.customerPCB.statusCode != " ")
// do error processing
end
Notice that you specify the index of your PCB (4)
as the second argument of the call. EGL converts vgLib.VGTDLI() into
a DL/I call that uses the DL/I CBLTDLI interface. After the call
you can use the fields in the EGL predefined record DB_PCBRecord to
determine the results of the call.