DELETE PSI_RECORD; REDEFINE RECORD PSI_RECORD optimize 01 PSI_REC. ! ! This record definition reads the fields produced by the ! program which "fixes" PSI accounting records by putting them ! into fixed format fields. ! ! B. Z. Lederman 14-Apr-1987 ! 10 TYPE USAGE BYTE. 10 SUB_TYPE USAGE BYTE. 10 SYSTEM_DATE USAGE DATE. 10 SYSTEM_TIME COMPUTED BY FN$TIME(SYSTEM_DATE) EDIT_STRING X(12). 10 EBIN REDEFINES SYSTEM_DATE. ! used for elapsed time 20 EQUAD USAGE QUAD. ! computations ! ! Begin fields from ID packet ! 10 IDENT. 20 PID USAGE LONG. ! process ID 20 PIDOWN USAGE LONG. ! Owner process ID 20 UIC USAGE LONG. 20 UICWORDS REDEFINES UIC. 30 UUU USAGE WORD EDIT_STRING ZZZ9. 30 GGG USAGE WORD EDIT_STRING ZZZ9. 20 PRIVILEGES USAGE QUAD. 20 PRIORITY USAGE BYTE EDIT_STRING Z9. 10 USERNAME PIC X(12). 10 ACCOUNT PIC X(8). 10 NODE PIC X(6). 10 TERMINAL PIC X(6). 10 UNUSED1. 20 FILLER PIC X(66). 10 JOB REDEFINES UNUSED1. ! most of this isn't used by PSI 20 JOBNAME PIC X(12). 20 JOBID USAGE LONG. 20 QUEUE PIC X(32). 20 NODEADDR USAGE WORD. 20 REMOTE_ID PIC X(16). ! ! Start PSI (termination) fields ! 10 SD. ! used to "hide" the starting date 20 FILLER PIC X(8). ! because we don't need two dates 10 SDATE REDEFINES SD. ! and it isn't always filled in. 20 START_DATE USAGE DATE. 20 SBIN REDEFINES START_DATE. 30 SQUAD USAGE QUAD. 10 START_TIME COMPUTED BY FN$TIME(START_DATE) EDIT_STRING X(12). 10 DEST. 20 DESTINATION PIC X(32). 20 REMOTE_DTE PIC X(14). 20 LOCAL_DTE PIC X(14). 20 NETWORK PIC X(16). 10 CHAN. 20 FILLER PIC X(8). 10 CHANS REDEFINES CHAN. 20 PVC PIC X(6). ! currently holds bad data. 20 DLCN USAGE WORD EDIT_STRING ZZ9. ! Logical Channel Number (decimal) 10 LCN COMPUTED BY FN$HEX(DLCN) ! more normally seen like this. EDIT_STRING X(8). 10 STATS. 20 B_OUT USAGE LONG EDIT_STRING ZZZ,ZZ9. 20 B_IN USAGE LONG EDIT_STRING ZZZ,ZZ9. 20 S_OUT USAGE LONG EDIT_STRING Z,ZZ9. 20 S_IN USAGE LONG EDIT_STRING Z,ZZ9. 20 P_OUT USAGE LONG EDIT_STRING Z,ZZ9. 20 P_IN USAGE LONG EDIT_STRING Z,ZZ9. 20 M_OUT USAGE LONG EDIT_STRING Z,ZZ9. 20 M_IN USAGE LONG EDIT_STRING Z,ZZ9. 10 INPUT_FIELDS1. 20 FILLER PIC X(14). 10 DECIMAL_FIELDS1 REDEFINES INPUT_FIELDS1. ! read by Datatrieve as decimal, 20 DTHR_IN USAGE WORD. ! but usually referred to as Hex. 20 DTHR_OUT USAGE WORD. 20 DWINDOW_IN USAGE WORD. 20 DWINDOW_OUT USAGE WORD. 20 DPACKET_IN USAGE WORD. 20 DPACKET_OUT USAGE WORD. 20 DCUG USAGE WORD. ! Closed User Group 10 NEGOTIATION. 20 THR_IN COMPUTED BY FN$HEX(DTHR_IN) EDIT_STRING X(8). 20 THR_OUT COMPUTED BY FN$HEX(DTHR_OUT) EDIT_STRING X(8). 20 WINDOW_IN COMPUTED BY FN$HEX(DWINDOW_IN) EDIT_STRING X(8). 20 WINDOW_OUT COMPUTED BY FN$HEX(DWINDOW_OUT) EDIT_STRING X(8). 20 PACKET_IN COMPUTED BY FN$HEX(DPACKET_IN) EDIT_STRING X(8). 20 PACKET_OUT COMPUTED BY FN$HEX(DPACKET_OUT) EDIT_STRING X(8). 20 CUG COMPUTED BY FN$HEX(DCUG) EDIT_STRING X(8). 10 FACILITIES. 20 REQUESTED USAGE WORD EDIT_STRING ZZZ9. 20 CLEARING PIC X(16). 20 CALLING PIC X(16). 20 ACCEPTING PIC X(16). 10 INPUT_FIELDS2. 20 FILLER PIC XXX. 10 DECIMAL_FIELDS2 REDEFINES INPUT_FIELDS2. 20 DREASON USAGE BYTE. 20 DCAUSE USAGE BYTE. 20 DDIAG USAGE BYTE. 10 TERMINATION. 20 REASON COMPUTED BY FN$HEX(DREASON) EDIT_STRING X(8). 20 CAUSE COMPUTED BY FN$HEX(DCAUSE) EDIT_STRING X(8). 20 DIAGNOSTIC COMPUTED BY FN$HEX(DDIAG) EDIT_STRING X(8). 10 UNIT PIC X(6). ! NV or NW unit used 10 PROTOCOL PIC X(4). 10 ELAPSED COMPUTED BY CHOICE OF ! elapsed time in seconds (SQUAD NE 0) THEN ((EQUAD - SQUAD) / 10000000) ELSE 0.0 END_CHOICE EDIT_STRING ZZZ,ZZZ.999. ;