tldm-universe/Ardent/UV/APP.PROGS/EXAM.COMMON.B

60 lines
2.5 KiB
Plaintext
Raw Normal View History

2024-09-09 21:51:08 +00:00
******************************************************************************
*
* EXAM.COMMON.B - Routine to display the UV$open$files named common.
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description........................................
* 10/14/98 23801 SAP Change copyrights.
* 10/12/92 10327 WLC Initial Release.
*******************************************************************************
*
* This program displays the contents of named common
* /UV$open$files/.
*
$OPTIONS PICK
$INCLUDE UNIVERSE.INCLUDE OPEN.TOOLS.H
*
* Equates
*
EQU SUCCESS TO 1
EQU FAILURE TO 0
EQU FILES.NOW.OPENED TO FILE$TABLE(1) ;* list of file names
EQU TABLE.POINTER TO FILE$TABLE(2) ;* list of pointers to FILE$VARS
EQU TABLE.COUNTER TO FILE$TABLE(3) ;* next available FILE$VAR entry
EQU OPEN.REQUESTS TO FILE$TABLE(4) ;* list of # opens requested
EQU VARIABLE.LIST TO FILE$TABLE(5) ;* list of variable stamps
*
* Declare named common
*
COMMON /UV$open$files/ FILE$VARS(TABLE.MAX),FILE$TABLE(5),curr$UV$ACCOUNT
*
* FILE$VARS : contains actual filevars that are returned
* FILE$TABLE : 5 elements
* element 1 : list of opened file names ascending left (multi valued)
* element 2 : pointer into file$vars array (multi valued)
* element 3 : current number of open files (single value)
* element 4 : file open requests (multi valued)
* element 5 : variable stamp - unique identifier for the variable name
* used in open call. (multi valued)
*
* curr$UV$ACCOUNT : the name of the account in which these files
* were opened.
*
NUM.ENTRIES = count(FILES.NOW.OPENED, @VM)+1
HEADING "Current UniVerse Account: ":curr$UV$ACCOUNT:"'LL'CNT File Name Requests Variable Stamp'L'--- ------------------------------ -------- -------------------------"
FOR I = 1 TO NUM.ENTRIES
PRINT FMT("000":I,"R#3"):") ":FMT(FILES.NOW.OPENED<I>,"L#30"):" ":FMT("00000000":OPEN.REQUESTS<I>,"R#8"):" ":FMT(VARIABLE.LIST<I>, "L#25")
NEXT I
END