[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
Figure D-4 shows the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a PAGE FOOTING report group.
Figure D-4 PAGE FOOTING Group Presentation Rules
The PAGE FOOTING Group Presentation Rules are:
Figure D-5 points to the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a REPORT FOOTING report group.
Figure D-5 REPORT FOOTING Group Presentation Rules
REPORT FOOTING Group Presentation Rules
In HP COBOL for OpenVMS Alpha and OpenVMS I64, when a file is successfully opened, the file's RAB pointer is placed in its RMS_STV field and its FAB pointer is placed in the FABPTR field of the RAB. The two RTL routines documented here (DCOB$RMS_CURRENT_RAB and DCOB$RMS_CURRENT_FAB) enable HP COBOL programmers to access the RAB and FAB data structures on OpenVMS Alpha and I64. However, the content and format of the RAB and FAB are not covered by any external standards (such as the ANSI standard for COBOL) and are subject to change.
VMS usage: fab type: longword (unsigned) access: write only mechanism: by reference
None.
DCOB$RMS_CURRENT_FAB returns the address of the RMS FAB structure for the most recently used COBOL file connector. Some fields of the FAB are filled in by the RMS SYS$OPEN routine.This routine can be used to obtain the address of the RMS FAB structure. The FAB is filled in by SYS$OPEN to reflect the actual attributes of the file in the cases where the actual attributes differ from the attributes specified by the COBOL file connector.
The FAB is a structure used internally by the HP COBOL run-time system to implement COBOL semantics. Modification of the FAB can result in abnormal program behavior, including unexpected program termination.
See the example for DCOB$RMS_CURRENT_RAB.
VMS usage: rab type: longword (unsigned) access: write only mechanism: by reference
None.
DCOB$RMS_CURRENT_RAB returns the address of the RMS RAB structure for the most recently used COBOL file connector.This routine can be used to obtain the address of the RMS RAB structure. The RAB describes attributes of the connection to a file.
The RAB is a structure used internally by the HP COBOL run-time system to implement COBOL semantics. Modification of RAB fields can result in abnormal program behavior, including unexpected program termination.
*+ * PROGRAM : RMSEXAMPLE * * PROGRAM DESCRIPTION: * * This program is an example of use of DCOB$RMS_CURRENT_FAB * and DCOB$RMS_CURRENT_RAB. * *- IDENTIFICATION DIVISION. PROGRAM-ID. RMSEXAMPLE. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT EMPLOYEE-FILE ASSIGN TO "employee.dat" ORGANIZATION IS SEQUENTIAL. DATA DIVISION. FILE SECTION. FD EMPLOYEE-FILE BLOCK CONTAINS 2048 CHARACTERS. 01 EMPLOYEE. 03 NAME PIC X(30). 03 OFFICE PIC X(10). 03 PHONE PIC X(10). WORKING-STORAGE SECTION. 01 EMPLOYEE-FAB USAGE IS POINTER. 01 EMPLOYEE-RAB USAGE IS POINTER. PROCEDURE DIVISION. P0. * * Open the file to establish EMPLOYEE-FILE as the current file. * OPEN INPUT EMPLOYEE-FILE. * * Get the pointer to the RMS FAB structure for EMPLOYEE-FILE. Store * the pointer in EMPLOYEE-FAB. Do the same for the RAB. * CALL "DCOB$RMS_CURRENT_FAB" GIVING EMPLOYEE-FAB. CALL "DCOB$RMS_CURRENT_RAB" GIVING EMPLOYEE-RAB. * * Pass the address of the FAB to a subroutine that will use * the contents. * CALL "PRINT-FIELDS" USING BY VALUE EMPLOYEE-FAB EMPLOYEE-RAB. * * CLOSE the file before exiting. * CLOSE EMPLOYEE-FILE. STOP RUN. END PROGRAM RMSEXAMPLE. IDENTIFICATION DIVISION. PROGRAM-ID. PRINT-FIELDS. DATA DIVISION. WORKING-STORAGE SECTION. 01 TEMP-W. 03 TEMP-WORD PIC S9(4) COMP. 01 TEMP-W1 REDEFINES TEMP-W. 03 TEMP-B1 PIC X. 03 TEMP-B2 PIC X. LINKAGE SECTION. 01 FAB. 05 FAB_ID PIC S9(9) COMP VALUE 20483. 05 FOP PIC S9(9) COMP. 05 STS PIC S9(9) COMP. 05 STV PIC S9(9) COMP. 05 ALQ PIC S9(9) COMP. 05 DEQ PIC S9(4) COMP. 05 FAC PIC X. 05 SHR PIC X. 05 CTX PIC S9(9) COMP. 05 RTV PIC X. 05 ORG PIC X. 05 RAT PIC X. 05 RFM PIC X. 05 JNL PIC S9(9) COMP. 05 XAB-ADD USAGE IS POINTER. 05 NAM-ADD USAGE IS POINTER. 05 FNA USAGE IS POINTER. 05 DNA USAGE IS POINTER. 05 FNS PIC X. 05 DNS PIC X. 05 MRS PIC S9(4) COMP. 05 MRN PIC S9(9) COMP. 05 BLS PIC S9(4) COMP. 05 FILLER PIC X(18). 01 RAB. 05 RAB_ID PIC S9(9) COMP VALUE 17409. 05 ROP PIC S9(9) COMP. 05 STS PIC S9(9) COMP. 05 STV PIC S9(9) COMP. 05 RFA PIC S9(4) COMP OCCURS 3 TIMES. 05 RESERVED PIC S9(4) COMP. 05 CTX PIC S9(9) COMP. 05 RAC PIC X. 05 TMO PIC X. 05 USZ PIC S9(4) COMP. 05 RSZ PIC S9(4) COMP. 05 UBF PIC S9(9) COMP. 05 RBF PIC S9(9) COMP. 05 RHB PIC S9(9) COMP. 05 KBF PIC S9(9) COMP. 05 KSZ PIC X. 05 KRF PIC X. 05 MBF PIC X. 05 MBC PIC X. 05 BKT PIC S9(9) COMP. 05 FABPTR PIC S9(9) COMP. 05 XAB PIC S9(9) COMP. PROCEDURE DIVISION USING FAB RAB. * * Convert the MBF PIC X value to a PIC S9(5) COMP VALUE. * MOVE 0 TO TEMP-WORD. MOVE MBF TO TEMP-B1. * * Display the multibuffer count and file allocation. * DISPLAY "Multibuffer count is " TEMP-WORD WITH CONVERSION " blocks". DISPLAY "File allocation is " ALQ WITH CONVERSION. EXIT PROGRAM. END PROGRAM PRINT-FIELDS. |
Previous Next Contents Index