z/OS MVS IPCS Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Print Service

z/OS MVS IPCS Customization
SA23-1383-00

IPCS now provides this service through the standard print service and the expanded print service. See Standard Print Service and Expanded Print Service.

You can invoke the print service in one of two ways:
  • Obtain the address of the exit services router from the ADPLSERV field of the exit parameter list, BLSABDPL.
  • Obtain the address of the print service from the ADPLPRNT field of the exit parameter list, BLSABDPL, and pass control using standard linkage conventions. The following discussion illustrates this method of invoking the print service.

To pass control to the print service using standard linkage conventions register 1 must contain the address of the original exit parameter list address when the print service receives control.

Field ADPLPRNT in the exit parameter list is the address of the print routine that your module can use to write out the buffer area.

Your module must pass control to the print routine using standard linkage conventions. Upon entry to the print routine, register 1 must contain the address of the original exit parameter list.

The print routine causes the output buffer pointed to by the parameter list to be printed and returns a new 133-character buffer (set to blanks) to your module.

The output buffer address points to a 133-character work area where a print line is constructed. This buffer is blank on entry. The carriage control character is provided for you. When a print line is built, the print routine must be given control to cause the line to be printed. To print a blank line, your module must pass control with a blank buffer. If bit 6 in the exit parameter list field ADPLFLAG is on when the print service receives control, the output buffer is printed at the top of the next new page. Bit 6 is turned off when control is returned to the exit routine. Output is based on the message routing parameter used. If ADPLPRT is on then the routing parameter is overridden and output is sent to the terminal.

In the example in Figure 1, the subroutine PRINTIT uses the print service subroutine.

Figure 1. Example - Using the Print Service Routine
* THIS SECTION OUTPUTS A LINE OF A TAPE UCB
OUTPUTIT   LA    R0,TAPEL2          SET ADDR OF LINE 1 FORMAT PATTERN
           BAL   RLINK,FORMAT       GO TO FORMAT LINE
           BAL   RLINK,PRINTIT      GO PRINT IT WITH SERV RTN
           BAL   RLINK,PRINTIT      GO PRINT A BLANK LINE
           B     NEXTLINE           GO TO PROCESS NEXT LINE
* THIS SECTION OF CODE IS USED TO CALL THE PRINT SERVICE
* ROUTINE. REGISTER 1 MUST CONTAIN THE ADDRESS OF THE ORIGINAL
* EXIT PARAMETER LIST.
PRINTIT    L     R15,ADPLPRNT       GET PRINT RTN ADR FROM PARM LIST
           BALR  R14,R15            GO TO PRINT ROUTINE
           BR    RLINK              RETURN TO SECTION OF CODE ABOVE
*THIS SUBROUTINE CALLS THE FORMAT SERVICE TO AUTOMATICALLY
*FORMAT AN OUTPUT LINE OF THE UCB.  INPUT TO THIS SECTION OF CODE
*IS THE ADDRESS OF THE FIRST FORMAT PATTERN IN REG 0.  REG 1 MUST
*CONTAIN THE ADDRESS OF THE ORIGINAL EXIT PARAMETER LIST.  IF
*DATA CANNOT BE OBTAINED BY THE SERVICE ROUTINE, CONTROL IS
*PASSED TO AN ERROR SUBROUTINE TO PRINT ERROR MESSAGE
FORMAT    L     R15,ADPLFRMT  GET RTN ADDR FROM PARM LIST
          BALR  R14,R15       GO TO SERVICE ROUTINE TO FORMAT LINE
          LTR   R15,R15       WAS FORMAT SUCCESSFUL
          BCR   8,RLINK       YES, GO PRINT LINE IMMEDIATELY
          B     ERROR         NO, GO TO ERROR ROUTINE

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014