IMS allows applications to obtain database or transaction manager services using system service calls issued in DL/I. An application can interact with either the IMS/DB or the IMS/TM, requesting information or providing services.
In Smalltalk, all of the system service calls exist in one class: IMSServiceRequester. Below is a description of the class and instance methods available with IMSServiceRequester, along with details on how to use a system service call in Smalltalk and restrictions on call usage, where applicable.
See IMS/ESA Application Programming: Data Communication for the following information for system service calls related to IMS/TM and IMS/ESA Application Programming: DL/I Calls for the following information for system service calls related to IMS/DB:
You can create an instance of the IMSServiceRequester class
using the methods in this table.
Table 4. IMSServiceRequester class methods
IMS type | Class method | Notes/exceptions |
---|---|---|
AIB for DB PCB | usingDBPCBNamed: | The name of the DB PCB you want to access |
AIB for IO PCB | usingAIBForIOPCB | The name of the IO PCB, which is always "IO PCB" |
DB PCB | usingDBPCBAtPosition: | The location in the PSB of the DB PCB you want to access. If an IOPCB is included, the first DB PCB is 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 |
PSB only | usingPSBNamed: | For use with allocatePsb or deallocatePsb |
See Making DL/I calls from Smalltalk for more information.
Each instance method in the IMSServiceRequester class represents one system service call.
This table shows the system service call and its corresponding instance
method in the IMSServiceRequester class. Also, the table
indicates whether the system service is for IMS DB, IMS TM, or for
both.
Table 5. IMSServiceRequester instance methods
Service call | Instance method | DB/TM | Notes/exceptions |
---|---|---|---|
APSB | allocatePsb | TM |
|
CHKP | basicCheckpoint: | Both | Symbolic checkpoint not supported |
| cpicBackout |
| Performs an SRRBACK CPI-C call to back out changes. See SAA CPI Resource Recovery Reference for more information. Answers an integer return code. |
| cpicCommit |
| Performs an SRRCMIT CPI-C call to commit changes. See SAA CPI Resource Recovery Reference for more information. Answers an integer return code. |
DPSB | deallocatePsb | TM |
|
GSCD | getSCD: | Both |
|
INIT | initCall: | Both |
|
INQY DBQUERY | inquiryDbquery: | Both |
|
INQY ENVIRON | inquiryEnvironment: | Both |
|
INQY FIND | inquiryFind: | Both |
|
INQY NULL | inquiryNull: | TM |
|
INQY PROGRAM | inquiryProgram: | Both |
|
LOG | log: | Both |
|
PCB | schedulePsb: | DB | CICS online programs only. See Writing CICS applications that access IMS databases for usage information. |
ROLB | rollback: | Both |
|
ROLL | roll | Both |
|
ROLS | rollBackToSetPoint:token: | Both |
|
SETS | setPoint:token: | Both |
|
SETU | setPointU:token: | Both |
|
SNAP | snap: | DB |
|
STAT | stat:statFunction: | DB |
|
SYNC | syncPoint | Both |
|
TERM | terminatePsb | DB | CICS online programs only. See Writing CICS applications that access IMS databases for usage information. |
XRST |
| Both | Not supported |
Commits changes the program has made to the database using a CHKP call, where systemAccessor is an instance of IMSServiceRequester:
systemAccessor basicCheckpoint: (('BANK' abrPadWithBlanks:8) asByteArray).