PERCON is to be called as a subprogram by an Assembler main program. The statements are read from SYSDTA.
PERUP START PERUP AMODE ANY PERUP RMODE ANY BALR 8,0 USING *,8 LA 1,ATAB ADR. PARAMETERLEISTE ——————————— (1) LA 13,SAV ADR. SICHERSTELLUNGSBEREICH ———— (2) L 15,=V(PERCONU) ————————————————————————————————————————— (3) BALR 14,15 UNTERPROGRAMMSPRUNG ———————————— (4) TERM SPACE 3 SAV DS 20F SICHERSTELLUNGSBEREICH ————————— (5) SPACE ATAB DC A(PARAM) PARAMETERLEISTE ———————————————— (6) DC A(RETCODE) ————————————————————————————————————————————— (7) DC X'80000000' ———————————————————————————————————————————— (8) SPACE RETCODE DC F'0' ——————————————————————————————————————————————————— (9) DC 12X'00' ———————————————————————————————————————————————— (10) SPACE PARAM DC X'00000080' ANWEISUNGEN VON SYSDTA ————————— (11) END PERUP
(1) | Register 1 is loaded with the symbolic address ATAB of the address list. |
(2) | Register 13 is loaded with the symbolic address SAV of the save area. |
(3) | Register 15 is loaded with a V-type constant specifying the address of the entry point PERCONU. |
(4) | Branch to the subprogram; register 14 is loaded with the return address. |
(5) | 20 words are reserved for the save area. |
Definition of the address list:
(6) | Address constant PARAM indicating the parameter area |
(7) | Address constant RETCODE indicating the area for return information |
(8) | End criterion for the address list |
Area for return information:
(9) | This area is reserved for the message code of the last DMS message issued. |
(10) | All PERCON messages from the range PER0000 thru PER0095 issued during program execution are registered in this area. |
(11) | Parameter area, byte 4 contains X’00’; this means that the statements are read from SYSDTA in SDF format. |
Compiling, linking and calling the program (tracer listing)
|
(12) | The object module library $.SYSLNK.PERCON.030 is assigned for linkage. |
(13) | The output file PERS.SEL is assigned with the link name PCOUT and its file attributes. |
(14) | The program ASSPROG1 contained in the library ASS.PROG is called. |
(15) | The branch to the PERCON subprogram has been made. PERCON statements are expected. The MODIFY-PERCON-OPTIONS statement controls the output of the messages to SYSOUT. All the messages are output in full to SYSOUT. |
(16) | The input file PERS.DPT is assigned. |
(17) | The output file PERS.SEL is linked to PERCON via the link name PCOUT. |
(18) | Any records containing C’FALMOUTH’ starting in column 38 are transferred to the output file. |
(19) | The END statement starts the transfer operation and terminates PERCON. |
(20) | PERCON is terminated normally. Control then branches from the subprogram back to the main program. |