Message chaining with CSPG
Usually, when you have viewed the output pages from a transaction, there is no need to retain the pages. However, you might want to initiate a new transaction and still retain the old pages, so that you can view them again after you have displayed output from the new transaction. This is called message chaining and can be done using the following command.
CSPG MESSCHNYYYY >>-CSPG--Messchnyyyy--+------------+--------------------------->< '-Parameters-'
- Messchn
- The installation-defined message-chaining transaction identification code (for example, C/), as defined in the PGCHAIN system initialization parameter.
- Yyyy
- The identifier of a transaction that produces data to be added to the message chain.
- Parameters
- The parameters, if any, required by transaction yyyy.
- TRAN
- The transaction invokes an application program that produces multiple pages of output. The first page is displayed.
- P/2
- The second page of message is displayed.
- C/CEMT INQ TIM
- CEMT data is displayed.
- P/2
- The second page of message is redisplayed.
If the new transaction uses BMS in PAGING mode, and RETAIN or RELEASE is specified in the SEND PAGE command in the application program, the output is chained to existing output, and a new level of chaining is created.
If RELEASE is specified, this chaining process can be repeated indefinitely. However, chaining requests must always be made while viewing pages at the highest level of chaining. Otherwise, messages at levels higher than the current level is automatically purged (if OPERPURGE has not been specified in the application program SEND PAGE command), or you are asked to purge them. If RETAIN is specified, no further chaining (in either TERMINAL or PAGING mode) can be performed until the second logical message has been terminated. Further chaining requests are rejected.
If neither RETAIN nor RELEASE is specified, the output from the second transaction is queued as a new message for the terminal, and is not received until all earlier messages have been terminated. It is thus not chained to the current message.
If you enter data that is not a paging command during a message chaining session, all pages on levels higher than the current level are deleted, if no message in the chain has been built using OPERPURGE=YES in the SEND PAGE command.
An example of the use of message chaining under BMS in PAGING mode is a search of a personnel file for people who speak French. Your initial inquiry might turn up three names. Without terminating the page containing the names, you can examine the records of each of the three people named. The chaining transaction could be used to read a record, without erasing the three names.
LANG DEPT=J34,FRENCH
BERESFORD, J.A. 1043
LEVY, A.R. 7121
WALTON, J. 8143
C/PREC 1043
NAME - BERESFORD, JERRY A.
EMPLOYEE NO - 1043
(and so on)
To go back to the list of names, enter: T/C
T/ is the user-defined transaction identifier that terminates the message at the current level of chaining (see CSPG message termination). BERESFORD, J.A. 1043
LEVY, A.R. 7121
WALTON, J. 8143
You can now examine Levy's record.You can also chain a series of messages together and use paging commands to view the series simultaneously. Using the previous example, you can have the summary page as your base message (first level) and each of the personnel records as subsequent chain levels. Assume you are currently displaying the summary:
C/PREC 1043
Receive: NAME - BERESFORD...
Enter: C/PREC 7121
Receive: NAME - LEVY...
Enter: C/PREC 8143
Receive: NAME - WALTON...
P/(2)1
Receive: NAME - BERESFORD...
Enter: P/(L)1
Receive: NAME - WALTON...
You can chain a new transaction only while you are viewing the last logical level. If you have four levels (as in the above example), view the summary page (level one) and then enter C/PREC 3642; the new transaction becomes level two and all other chained messages below that are erased (assuming that they have been built using a SEND PAGE command with the OPERPURGE option omitted).
Messages involving different partition layouts (different partition sets, including unpartitioned) may be chained. The current page in each partition is redisplayed on a change of message level.
