IMS enables applications to retrieve and send messages using transaction manager (TM) calls issued in Data Language/I (DL/I). An application can retrieve input messages, send output messages to the terminal that sent the input message, and send output messages to other application programs and terminals.
In Smalltalk, all of the TM calls exist in one class: IMSTMRequester. Below is a description of the class and instance methods available in IMSTMRequester, along with details on how to use a TM call in Smalltalk and restrictions on call usage, where applicable.
See IMS/ESA Application Programming: Data Communication for the the following information:
You can create an instance of the IMSTMRequester class using
the methods in this table.
Table 6. IMSTMRequester class methods
IMS type | Class method | Notes/exceptions |
---|---|---|
AIB for alternate PCB | usingAltPCBNamed: | The name of the alternate PCB you want to access |
AIB for IO PCB | usingAIBForIOPCB | The name of the IO PCB, which is always "IO PCB" |
Alternate PCB | usingAltPCBAtPosition: | The location in the PSB of the alternate PCB you want to access. If an IOPCB is included, the alternate cannot be at position 1. If your application will run as a batch program in IMS/ESA, consider using CMPAT=YES to always include an IOPCB. |
IO PCB | usingIOPCB | The IO PCB is always the first PCB in the PSB |
See Making DL/I calls from Smalltalk for more information.
Each instance method in the IMSTMRequester class represents one IMS transaction manager call.
This table shows the transaction manager call and its corresponding
instance method in the IMSTMRequester class.
Table 7. IMSTMRequester instance methods
TM call | Instance method | Notes/exceptions |
---|---|---|
AUTH | authorize: |
|
CHNG | change:optionsList:feedbackArea: |
|
CMD | command: |
|
GCMD | getCommand: |
|
GN | getNext: |
|
GU | getUnique: |
|
ISRT | insert: | Inserts an I/O area |
ISRT | insertString: | Inserts a string |
PURG | purge: |
|
SETO | setOptions:optionsList:feedbackArea: |
|
Example 1
Retrieves the first message from the message queue using a GU call, where ioAccessor is an instance of IMSTMRequester.
| messageIOarea | messageIOarea := ByteArray new: 40. ioAccessor getUnique: messageIOarea.
Example 2
Inserts a string on an alternate terminal using an ISRT call, where alternateAccessor is an instance of IMSTMRequester.
alternateAccessor insertString: 'Balance for Saving account ', (imsBankDatabase accountNumber), ' after $', debit, ' debit is $', balance.