MODULE DSP9M1 'M01.00' ; ! ! ERROR LOG CONTROL FILE MODULE: DSP9M1 ! ! ! Version 01.00 ! ! Bob Denny 09-Aug-82 AVD/DVD messages ! ACP Startup/Shutdown messages ! ! This module is called to process Special Information packets (CSD only). ! ! Module Name: DSP 9 M 1 ! --- - - - ! ^ ^ ^ ^ ! Module Prefix: ----------! ! ! ! ! ! ! ! ! Error Code: ----------------! ! ! ! ! ! ! Operating System: ------------! ! ! ! ! Packet Format: -----------------! ! ! The following Error Subcodes are defined: ! ! Subcode Mnemonic Meaning ! ------- -------- ------- ! ! 1 E$SAVD Assign Virtual Disk ! 2 E$SDVD Deassign Virtual Disk ! 3 E$SAC1 ACP Startup ! 4 E$SAC2 ACP Shutdown ! 5 E$SAC3 ACP Service Message ! ! ! Define any literals used in this module. ! LITERAL DSP9_SUB_1.FORMAT_1 = 'Assign Virtual Disk:!1FL' | '====== ======= ====!2FL' | '!5FCVirtual disk device = !28FC!6DP!2FL' | '!5FCAssigned to:!1FL' | '!10FCPhysical disk device !31FC!6DP!1FL' | '!10FCPhysical file name = !31FC!34DP!2FL' ; LITERAL DSP9_SUB_1.FORMAT_2 = '!5FC!34DP!2FL' ; LITERAL DSP9_SUB_1.FORMAT_3 = '!5FCNew Virtual Disk File Created:!1FL' | '!10FCCreation size (blocks) = !35FC!10DP!2FL' ; LITERAL DSP9_SUB_1.FORMAT_4 = '!5FCNew File Created with Placement Control:!1FL' | '!10FCCreated file placed starting at LBN !46FC!10DP!2FL' ; LITERAL DSP9_SUB_2.FORMAT_1 = 'Deassign Virtual Disk:!1FL' | '======== ======= ====!2FL' | '!5FCVirtual disk device = !28FC!6DP!2FL' | '!5FCPreviously assigned to:!1FL' | '!10FCPhysical disk device !31FC!6DP!1FL' | '!10FCPhysical file name = !31FC!34DP!1FL' ; LITERAL DSP9_SUB_3.FORMAT_1W = 'ACP Startup:!1FL' | '=== =======!2FL' | '!5FCGateway Device = !22FC!4DP!2FL' | '!5FCACP Name = !16FC!6DP!2FL' | '!5FCService Message (if any):!1FL' | '!10FC!80DP' ; LITERAL DSP9_SUB_3.FORMAT_1N = 'ACP Startup:!1FL' | '=== =======!2FL' | '!5FCGateway Device = !22FC!4DP!2FL' | '!5FCACP Name = !16FC!6DP!2FL' | '!5FCService Message (if any):!1FL' | '!10FC!40DP!FL' | '!10FC!40DP' ; LITERAL DSP9_SUB_4.FORMAT_1W = 'ACP Shutdown:!1FL' | '=== ========!2FL' | '!5FCGateway Device = !22FC!4DP!2FL' | '!5FCACP Name = !16FC!6DP!2FL' | '!5FCService Message (if any):!1FL' | '!10FC!80DP' ; LITERAL DSP9_SUB_4.FORMAT_1N = 'ACP Shutdown:!1FL' | '=== ========!2FL' | '!5FCGateway Device = !22FC!4DP!2FL' | '!5FCACP Name = !16FC!6DP!2FL' | '!5FCService Message (if any):!1FL' | '!10FC!40DP!FL' | '!10FC!40DP' ; LITERAL DSP9_SUB_5.FORMAT_1W = 'ACP Service Message:!1FL' | '=== ======= =======!2FL' | '!5FC!80DP' ; LITERAL DSP9_SUB_5.FORMAT_1N = 'ACP Service Message:!1FL' | '=== ======= =======!2FL' | '!5FC!40DP!FL' | '!5FC!40DP' ; PROCEDURE START_MOD BEGIN ! ! Declare a handy temporary ! DECLARE DSP9_TEMP ; FULL_SPEC :ASCII [39] ; GATEWAY_STRING :ASCII [6] ; ACP_STRING :ASCII [24] ; END_DECLARE ; ! ! Create the Subcode Conversion table. ! TABLE SUBCODE ; NUMBER :WORD ; TEXT :ASCII [18] ; BEGIN_TABLE 1, 'Asn Virtual Disk' ; 2, 'Deasn Virtual Disk' ; 3, 'ACP Startup' ; 4, 'ACP Shutdown' ; 5, 'ACP Service Msg' ; END_TABLE ; ! ! First check the report mode. If SYSTEM type entries are not selected, ! simply return. If they are selected, determine the packet subtype. If ! it is a known subtype code, then proceed. Otherwise it is an error. ! IF NOT REPORT.SYSTEM_INFO THEN ! ! This type of packet has not been selected for printing. ! RETURN ; END_IF ; FIND SUBCODE NUMBER = HEADER.CODE_SUBTYPE ; IF NOT SUBCODE.CONTEXT THEN BEGIN SIGNAL 'ILLPACSBC' PARAMETERS REPORT.PACKET_IDENT, %CNV$DECIMAL(HEADER.CODE_TYPE, 3), %CNV$DECIMAL(HEADER.CODE_SUBTYPE, 3) ; RETURN ; END ; END_IF ; ! ! Select the appropriate formatting commands for the ! type of packet. Since each of the Special Information ! packets has a different format DATA subpacket, the DATA ! subpacket is defined within each of the following blocks. ! This has been done rather than creating another level of ! modules below this one. ! CASE HEADER.CODE_SUBTYPE OF [1, 2]: ! ! HEADER.CODE_SUBTYPE = 1 and 2 ! ! This is the block used to format the output for the ! special "Assign Virtual Disk" and "Deassign Virtual Disk" ! subpacket types. ! BEGIN ! ! The TASK subpacket contains information about the ! task that logged the message. Should be AVD or DVD! ! ! Define the DATA Subpacket. Contains information about ! the file to which the VD unit was assigned, and any ! creation size/placement information, plus a read-only ! flag if assigned read-only. ! SUBPACKET DATA = DISP.NEXT_PACKET ; ! AVD/DVD Data Subpacket: VD_FLAGS :WORD ; ! Operation flags: VFLG_RO :BIT [0] ; ! Assigned Read-Only VFLG_CR :BIT [1] ; ! New file created by AVD VFLG_PL :BIT [2] ; ! Created with placement ctrl. PHYS_DEVICE :ASCII [6] ; ! Physical device name (w/":") FILE_SPEC :ASCII [32] ; ! Full File Spec CRE_SIZE :LONGWORD ; ! Creation size if VFLG_CR PLACEMENT_BLOCK :LONGWORD ; ! Start block if VFLG_PL END_PACKET ; ! ! Determine the type of report and format the output ! accordingly. ! CASE REPORT.MODE OF ['BRIEF']: ! ! The BRIEF report uses a common format, and is ! one line long. The "additional Information" field ! will contain the device and file to which the VD ! device was assigned. ! BEGIN ! ! Concatenate to form the "full spec" ! SET DSP9_TEMP.FULL_SPEC TO 'File = ' | DATA.PHYS_DEVICE | DATA.FILE_SPEC ; ! ! Write out the one liner ! WRITE REPORT.PACKET_IDENT, %CNV$RSX_TIME(HEADER.TIME_STAMP, 0), SUBCODE.TEXT, DISP.DEVICE_STRING, NULL, DSP9_TEMP.FULL_SPEC FORMAT REPORT.BRIEF_FORMAT ; END ; ['FULL', 'REGISTERS']: ! ! The FULL report prints the full text of the ! message along with information about the ! task that logged the message. ! BEGIN ! ! Now output the information for the standard subpackets. ! This packet type has only Header and Task subpackets relevant. ! SET INTERMOD_DEVERR.ERROR_TYPE TO NULL ; CALL MODULE REPORT.FULL_MOD_1 PROCEDURE 'OUTPUT_PACKETS' ; CALL MODULE REPORT.FULL_MOD_2 PROCEDURE 'OUTPUT_PACKETS' ; ! ! Now write out the basic information on the AVD. ! WRITE DISP.DEVICE_STRING, ! Virtual disk device DATA.PHYS_DEVICE, ! Physical disk device DATA.FILE_SPEC ! File spec FORMAT %CND$IF(HEADER.CODE_SUBTYPE EQ 1, DSP9_SUB_1.FORMAT_1, DSP9_SUB_2.FORMAT_1) ; ! ! If the disk was assigned read-only, write out that fact ! IF DATA.VFLG_RO THEN WRITE 'Virtual Disk assigned READ-ONLY' FORMAT DSP9_SUB_1.FORMAT_2 ; END_IF ; ! ! If the disk was created while assigning, write ! out the file creation size. ! IF DATA.VFLG_CR THEN BEGIN WRITE %CNV$DECIMAL_P(DATA.CRE_SIZE, 9) FORMAT DSP9_SUB_1.FORMAT_3 ; ! ! If the created file was placed via the /PL switch, ! Write out the starting LBN ! IF DATA.VFLG_PL THEN WRITE %CNV$DECIMAL_P(DATA.PLACEMENT_BLOCK, 9) FORMAT DSP9_SUB_1.FORMAT_4 ; END_IF ; END ; END_IF; END ; ['NONE']: ! ! If the report is NONE, write out nothing ! BEGIN END ; END_CASE; END ; [3, 4]: ! ! HEADER.CODE_SUBTYPE = 3 and 4 ! ! This is the block used to format the output for the ! special "ACP Startup" and "ACP Shutdown" packets. ! BEGIN ! ! The TASK subpacket contains information about the ! task that logged the message. ! ! Define the DATA Subpacket. It contains the ACP name, ! (6 characters ASCII), followed by the length and text ! of an informational message. If the length is zero, ! There is no message. ! SUBPACKET DATA = DISP.NEXT_PACKET ; ACP_NAME :LONGWORD RAD50 ; MESSAGE_LEN :WORD ; MESSAGE_TEXT :ASCII [80] ; END_PACKET ; ! ! Format the Gateway Device String ! SET DSP9_TEMP.GATEWAY_STRING TO DEVICE_ID.MNEMONIC | ':' ; ! ! Determine the type of report and format the output ! accordingly. ! CASE REPORT.MODE OF ['BRIEF']: ! BEGIN ! ! Format the ACP name string for the BRIEF Report ! SET DSP9_TEMP.ACP_STRING TO ' ACP name = ' | %CNV$RAD50(DATA.ACP_NAME, 6) ; ! ! The BRIEF report is one line long. ! IF DATA.MESSAGE_LEN LE 39 THEN ! ! Print the whole message... ! WRITE REPORT.PACKET_IDENT, %CNV$RSX_TIME(HEADER.TIME_STAMP, 0), SUBCODE.TEXT, DSP9_TEMP.GATEWAY_STRING, DSP9_TEMP.ACP_STRING, DATA.MESSAGE_TEXT<1 : DATA.MESSAGE_LEN> FORMAT REPORT.BRIEF_FORMAT ; ELSE ! ! Print only the first 39 characters... ! WRITE REPORT.PACKET_IDENT, %CNV$RSX_TIME(HEADER.TIME_STAMP, 0), SUBCODE.TEXT, DSP9_TEMP.GATEWAY_STRING, DSP9_TEMP.ACP_STRING, DATA.MESSAGE_TEXT<1 : 39> FORMAT REPORT.BRIEF_FORMAT ; END_IF ; END ; ['FULL', 'REGISTERS']: ! ! The FULL report prints the full text of the ! message along with information about the ! task that logged the message. ! BEGIN ! ! Format the ACP name string for the ! FULL and REGISTERS reports. ! SET DSP9_TEMP.ACP_STRING TO %CNV$RAD50(DATA.ACP_NAME, 6) ; ! ! Now output the information for the standard subpackets. ! This packet type has only Header and Task subpackets relevant. ! SET INTERMOD_DEVERR.ERROR_TYPE TO NULL ; CALL MODULE REPORT.FULL_MOD_1 PROCEDURE 'OUTPUT_PACKETS' ; CALL MODULE REPORT.FULL_MOD_2 PROCEDURE 'OUTPUT_PACKETS' ; ! ! Now output the Data subpacket information. ! IF REPORT.WIDE THEN ! ! Use the wide format listing. ! WRITE DSP9_TEMP.GATEWAY_STRING, DSP9_TEMP.ACP_STRING, DATA.MESSAGE_TEXT<1 : DATA.MESSAGE_LEN> FORMAT %CND$IF((HEADER.CODE_SUBTYPE EQ 3), DSP9_SUB_3.FORMAT_1W, DSP9_SUB_4.FORMAT_1W) ; ELSE ! ! Use the narrow format listing if neccessary. ! IF DATA.MESSAGE_LEN LE 40 THEN ! ! The wide format is still O.K. ! WRITE DSP9_TEMP.GATEWAY_STRING, DSP9_TEMP.ACP_STRING, DATA.MESSAGE_TEXT<1 : DATA.MESSAGE_LEN> FORMAT %CND$IF((HEADER.CODE_SUBTYPE EQ 3), DSP9_SUB_3.FORMAT_1W, DSP9_SUB_4.FORMAT_1W) ; ELSE ! ! We have to use the narrow format. ! WRITE DSP9_TEMP.GATEWAY_STRING, DSP9_TEMP.ACP_STRING, DATA.MESSAGE_TEXT<1 : 40>, DATA.MESSAGE_TEXT<41 : DATA.MESSAGE_LEN - 40> FORMAT %CND$IF((HEADER.CODE_SUBTYPE EQ 3), DSP9_SUB_3.FORMAT_1N, DSP9_SUB_4.FORMAT_1N) ; END_IF ; END_IF ; END ; ['NONE']: ! ! If the report type is NONE, output nothing. ! BEGIN END ; END_CASE ; END ; [5]: ! ! HEADER.CODE_SUBTYPE = 5 ! ! This is the block used to format the output for the ! special "ACP Service Message" packet subtype. ! BEGIN ! ! The TASK subpacket contains information about the ! ACP that logged the message. ! ! Define the DATA Subpacket. It contains the message ! length, followed by the message itself. ! SUBPACKET DATA = DISP.NEXT_PACKET ; MESSAGE_LEN :WORD ; MESSAGE_TEXT :ASCII [80] ; END_PACKET ; ! ! Determine the type of report and format the output ! accordingly. ! CASE REPORT.MODE OF ['BRIEF']: ! ! The BRIEF report is one line long. ! IF DATA.MESSAGE_LEN LE 39 THEN ! ! Print the whole message... ! WRITE REPORT.PACKET_IDENT, %CNV$RSX_TIME(HEADER.TIME_STAMP, 0), SUBCODE.TEXT, NULL, NULL, DATA.MESSAGE_TEXT<1 : DATA.MESSAGE_LEN> FORMAT REPORT.BRIEF_FORMAT ; ELSE ! ! Print only the first 39 characters... ! WRITE REPORT.PACKET_IDENT, %CNV$RSX_TIME(HEADER.TIME_STAMP, 0), SUBCODE.TEXT, NULL, NULL, DATA.MESSAGE_TEXT<1 : 39> FORMAT REPORT.BRIEF_FORMAT ; END_IF ; ['FULL', 'REGISTERS']: ! ! The FULL report prints the full text of the ! message along with information about the ! task that logged the message. ! BEGIN ! ! Now output the information for the standard subpackets. ! This packet type has only Header and Task subpackets relevant. ! SET INTERMOD_DEVERR.ERROR_TYPE TO NULL ; CALL MODULE REPORT.FULL_MOD_1 PROCEDURE 'OUTPUT_PACKETS' ; CALL MODULE REPORT.FULL_MOD_2 PROCEDURE 'OUTPUT_PACKETS' ; ! ! Now output the Data subpacket information. ! IF REPORT.WIDE THEN ! ! Use the wide format listing. ! WRITE DATA.MESSAGE_TEXT<1 : DATA.MESSAGE_LEN> FORMAT DSP9_SUB_5.FORMAT_1W ; ELSE ! ! Use the narrow format listing if neccessary. ! IF DATA.MESSAGE_LEN LE 40 THEN ! ! The wide format is still O.K. ! WRITE DATA.MESSAGE_TEXT<1 : DATA.MESSAGE_LEN> FORMAT DSP9_SUB_4.FORMAT_1W ; ELSE ! ! We have to use the narrow format. ! WRITE DATA.MESSAGE_TEXT<1 : 40>, DATA.MESSAGE_TEXT<41 : DATA.MESSAGE_LEN - 40> FORMAT DSP9_SUB_4.FORMAT_1N ; END_IF ; END_IF ; END ; ['NONE']: ! ! If the report type is NONE, output nothing. ! BEGIN END ; END_CASE ; END ; END_CASE ; END ; END_MODULE ; ! DSP9M1.CNF