The __console() service sends messages to the console and waits on a modify/stop request from the console. Additional functions available under __console2() allow you to specify routing and descriptor codes for messages sent to the console and delete held messages from the console, using message IDs or tokens. These functions are activated under the expanded BPXYCCA structure in the Version 2 section. See the usage notes for information about using the __console2() functions. Additionally, the BPXYCCA structure Version 3 section provides the ability to specify a user-supplied CART and console ID. This function can be used by applications that communicate with more than one console to ensure that the messages go to the expected console.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1CCS): | 31-bit |
AMODE (BPX4CCS): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4CCS with the same parameters. All parameter addresses and addresses in parameter structures are doublewords.
The name of a fullword that contains the length of the area that contains the message attributes of the message that is to be sent to the console. If the length is zero, the MsgAttributes parameter is ignored, and no message is sent to the console.
The name of the area that contains the message attributes of the message that is to be sent to the console. Included in this macro mapping are the address and length of the message to be sent. The area is mapped by BPXYCCA. For information about the content of this area, see BPXYCCA — Map input/output structure for __console().
A fullword (doubleword) field that contains the address of a 128-byte buffer that is to be used to receive a string of EBCDIC data from the console modify command. All characters that appear to the right of the APPL= are placed into this buffer, left-aligned. The length of the string copied is returned in the Modify_string_length parameter. The data returned is folded to uppercase. If this parameter is zero, this service does not wait for or process any console modify/stop commands.
The name of a fullword in which the __console() service returns the length of the modify string that is returned at the location specified by Modify_buffer_ptr. If the Modify_buffer_ptr is zero, this parameter is unchanged.
The name of a fullword in which the __console() service returns the type of command that was issued. The values are CONSOLE_MODIFY and CONSOLE_STOP.
The name of a fullword in which the __console() service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EINVAL | A message attribute was not valid. An error was detected in one of the fields described by BPXYCCA (JrMsgLength, JRMsgMaxLines, or JrMsgAttrErr). |
EINTR | The syscall was interrupted by a signal. |
EFAULT | User storage that was passed in could not be accessed. The reason code identifies the bad user storage (JRMsgIdList, JrDescList, JrRoutingList, and JrMsgId). |
EPERM | The specified routing code requires the user to have superuser authority (JrAuthRoutingCode). |
The name of a fullword in which the __console() service stores the reason code. The __console() service returns Reason_code only if Return_value is 0. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
Routing codes specified in the message attribute area override the current message routing.
There are no restrictions on the use of the __console() service.
For an example using this callable service, see BPX1CCS (__console()) example.