System programming commands. IBM iSeries
إعلان
إعلان
Chapter 21. Access to system information
You can write many application programs using the CICS command-level interface without any knowledge of, or reference to, the fields in the CICS control blocks and storage areas. However, you might sometimes need to get information that is valid outside the local environment of your application program. You use the
EXEC CICS ADDRESS and EXEC CICS ASSIGN commands to access such
information. For information about these commands, see page 324 and page 327
respectively.
When using the EXEC CICS ADDRESS and EXEC CICS ASSIGN commands, various fields can be read but should not be set or used in any other way. This means that you should not use any of the CICS fields as arguments in CICS commands, because these fields may be altered by the EXEC interface modules.
System programming commands
The EXEC CICS DISCARD, EXEC CICS INQUIRE, EXEC CICS SET, and EXEC
CICS PERFORM commands allow application programs to access and modify information about CICS resources. The application program can retrieve and modify information for CICS files, terminals, system entries, system attributes, connections, queued requests, TD queues, tracing, TS queues, programs, and transactions. These commands are primarily for the use of the system
administrator. For information, see Chapter 33, “System programming reference,” on page 477.
EXEC interface block (EIB)
In addition to the usual CICS control blocks, each task in a command-level environment has a control block known as the EXEC interface block (EIB) associated with it.
An application program can access all of the fields in the EIB by name. The EIB contains information that is useful during the execution of an application program, such as the transaction identifier, the time and date (initially when the task is started, and subsequently, if updated by the application program), and the cursor position on a display device. The EIB also contains information that is helpful when a dump is being used to debug a program. For information about EIB fields,
see Appendix A, “EXEC interface block,” on page 529.
© Copyright IBM Corp. 1998, 2004
211
212
CICS for iSeries Application Programming Guide V5
Chapter 22. Storage control
The CICS storage control program controls requests for main storage to provide intermediate work areas and other main storage not provided automatically by
CICS but needed to process a transaction.
If you need working storage in addition to the working storage provided automatically by CICS, you can use the following commands: v
EXEC CICS GETMAIN to get and initialize main storage v
EXEC CICS FREEMAIN to release main storage
You can initialize the acquired main storage to any bit configuration by supplying the INITIMG option on the EXEC CICS GETMAIN command; for example, zeros or EBCDIC blanks.
CICS releases all main storage associated with a task when the task is ended normally or abnormally. This includes any storage acquired, and not subsequently released, by your application program, except for areas obtained with the SHARED option. This option of the EXEC CICS GETMAIN command prevents storage being released automatically when a task completes.
There are two types of storage that can be obtained through the EXEC CICS
GETMAIN command:
Shared
Storage areas are available beyond a CICS task boundary and are accessible by any transaction. Shared storage must be returned to the system by using an EXEC CICS FREEMAIN command, or automatically at
CICS control region shutdown.
Nonshared
Nonshared storage areas are available only to the CICS task that acquires them and only for the life of the task. Nonshared storage is returned to the system by using an EXEC CICS FREEMAIN command or automatically when the task terminates normally or abnormally.
For shared storage GETMAIN requests, storage control supports an implied
SUSPEND option if sufficient storage for the request cannot be obtained. When this condition is present, storage control places the requesting task in a wait state until sufficient storage becomes available.
For a more thorough discussion of the EXEC CICS FREEMAIN and EXEC CICS
GETMAIN commands and their options, see page 365 and page 367.
Note:
If you do not specify NOSUSPEND on the EXEC CICS GETMAIN command, and the associated transaction has PURGE(*YES) and WAITTIME greater than zero, your transaction or CICS may fail. The PURGE and
WAITTIME parameters are specified in the ADDCICSPCT CL command, when defining the CICS transaction.
OS/400 makes storage available for each COBOL/400 program, including the CICS
COBOL program. Chapter 5, “Designing efficient applications,” on page 61
describes storage within individual programs.
© Copyright IBM Corp. 1998, 2004
213
214
CICS for iSeries Application Programming Guide V5
تنزيل
إعلان