startTransaction()

The system function SysLib.startTransaction() invokes a main program asynchronously, associates that program with a printer or terminal device, and passes a record. If the receiving program is generated by EGL, the record is used to initialize the input record; if the receiver is produced by VisualAge® Generator, the record is used to initialize the working storage.

The default behavior of this function is to start a program that resides in the same Java™ package. To change that behavior on CICS®, specify an asynchLink element in the linkage options part that is used to generate the invoking program.

A Java program can transfer only to another Java program on the same machine.
  SysLib.startTransaction(
    request anyBasicRecord in
    [, prID startTransactionPrId in
    [, termID CHAR(4) in ]])
request
The name of a basic record, which must have the following format:
  • The first 2 bytes (of type SMALLINT or of type BIN without decimals) contain the length of the data to be passed to the started transaction, plus 10 for the two fields (including this one) that are not passed.
  • The next 8 bytes (of type CHAR) are also not passed, but contain the name of the program to be started.
  • The remaining part of the request record is passed.
prID
This 4-byte item is ignored if specified.
termID
This 4-byte item of type CHAR is ignored if specified. You must specify prID if you specify termID.

IMS™ considerations

SysLib.startTransaction() results in an insert to the modifiable alternate PCB. The indicated work area is passed as the message. The generated COBOL program automatically adds an extra 2 bytes between the length and the transaction and adds 2 to the length value. The transaction is started without an associated terminal. Prid and recip are ignored.

The maximum length on the request record is 32765 bytes.

The transaction that is started must be included in the system IMSGEN and must be defined as a nonconversational transaction. If the started transaction is not an EGL program, it must issue a GU call to the I/O PCB to retrieve the message.

SysLib.startTransaction() cannot start a program at a remote system.

If the call was nested in a try block, sysVar.errorCode can contain the value 00000203, indicating the call failed, probably because of an invalid transaction identifier.

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.