User Tools

Site Tools


cdc:nos2.source:nam5871:hlglerr

HLGLERR

Table Of Contents

  • [00013] PRGM HLGLERR

Source Code

HLGLERR.txt
  1. *DECK HLGLERR
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT AHEADER
  5. USETEXT APPSTAT
  6. USETEXT AT
  7. USETEXT AWLNTRY
  8. USETEXT DRHDR
  9. USETEXT NWLNTRY
  10. USETEXT PARAMS
  11. USETEXT PT
  12. USETEXT SUPMSG
  13. PRGM HLGLERR; # FORM LOGICAL ERROR MESSAGE #
  14.  
  15. STARTIMS; NAMA378
  16. #
  17. *1DC HLGLERR NAMA378
  18. * NAMA378
  19. * 1. PROC NAME AUTHOR DATE NAMA378
  20. * HLGLERR Y. HSIEH 78/02/15
  21. * NAMA378
  22. * 2. FUNCTIONAL DESCRIPTION. NAMA378
  23. * THIS ROUTINE IS RESPONSIBLE FOR FORMATTING A LOGICAL ERROR NAMA378
  24. * MESSAGE AND SENDING IT TO THE APPROPRIATE APPLICATION. NAMA378
  25. * NAMA378
  26. * 3. METHOD USED. NAMA378
  27. * FORM A LOGICAL ERROR MESSAGE WITH ERROR CODE TO THE
  28. * APPLICATION BY LINKING TO THE PROPER ACB.
  29. * NAMA378
  30. * 4. ENTRY PARAMETERS. NAMA378
  31. * PARAMS1 REASON CODE FOR THE ERROR
  32. * NAMA378
  33. * 5. EXIT PARAMETERS.
  34. * BUFADDR LOCATION OF LOGICAL ERROR MESSAGE
  35. * NAMA378
  36. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  37. * ACB AHEADER APPSTAT
  38. * DRHDR NIPDEF NWLNTRY
  39. * OSSIZE PARAMS SUPMSG
  40. * NAMA378
  41. * 7. ROUTINES CALLED. NAMA378
  42. * BLINK LINK DATA BLOCK INTO DATA RING
  43. * MGETS ALLOCATE EMPTY BUFFER
  44. * XTRACE RECORD CALL NAMA378
  45. * NAMA378
  46. * 8. DAYFILE MESSAGES. NAMA378
  47. * NONE NAMA378
  48. *
  49. * THIS PROGRAM IS A SECONDARY OVERLAY LOADED BY OVLCALL.
  50. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION
  51. * RJMAIN TO RETURN TO THE CALLING PROGRAM.
  52. *
  53. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  54. *CALL OSSIZE
  55. *
  56. * THIS OVERLAY IS CALLED BY MANY ROUTINE WHICH DETECTED
  57. * AN APPLICATION-S LOGICAL ERRORS.
  58. * NAMA378
  59.  # NAMA378
  60. STOPIMS; NAMA378
  61. # INPUT PARAMETERS # NAMA378
  62. NAMA378
  63. # OUTPUT PARAMETERS NONE # NAMA378
  64. # NAMA378
  65.   EXTERNAL VARIABLES NAMA378
  66. # NAMA378
  67. XREF PROC BLINK; # LINK DATA BLOCK INTO DATA RING #
  68. XREF PROC MGETS; # ALLOCATE EMPTY BUFFER #
  69. XREF PROC XTRACE; # RECORD CALL # NAMA378
  70. XREF LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  71. NAMA378
  72. # NAMA378
  73.   LOCAL VARIABLES NAMA378
  74. # NAMA378
  75.  
  76. ITEM BUFADDR; # ADDR OF LOGICAL ERROR BUFFER #
  77. ITEM LENGTH; # LENGTH OF BUFFER FOR LOGICAL ERROR MSG #
  78. ITEM REASON; # REASON FOR LOGICAL ERROR #
  79. NAMA378
  80. #**********************************************************************# NAMA378
  81. NAMA378
  82. BEGIN NAMA378
  83. CONTROL IFEQ DEBUG,1; NAMA378
  84. XTRACE("HLGLE") ;
  85. CONTROL FI; NAMA378
  86. NAMA378
  87. # SET APPLICATION ACB POINTER #
  88.  
  89. REASON = PARAMS1; # REASON CODE OF LOGICAL ERROR #
  90. P<ACB> = ACBADDR; # APPL ACB ADDRESS #
  91.  
  92. # CHECK WHETHER LOGICAL ERROR LIMIT IS REACHED OR NOT #
  93.  
  94. IF ACBERCNT[0] LQ MAXLGERR # NOT REACH LOGICAL ERR LIMIT #
  95. THEN
  96. BEGIN
  97. IF ACBERCNT[0] EQ MAXLGERR # LOGICAL ERR LIMIT REACHED #
  98. THEN
  99. REASON = RLG"IAL";
  100.  
  101. ACBERCNT[0] = ACBERCNT[0] + 1; # INCRE LOGICAL ERR COUNT #
  102.  
  103.  
  104. #
  105.   STEP 1 GET EMPTY BUFFER FOR LOGICAL ERROR MESSAGE
  106. #
  107.  
  108. P<NWLENTRY> = WLADDR;
  109. LENGTH = BLKHSIZE + ABHSIZE + LERR;
  110. IF NWLTLC[0] EQ 0
  111. THEN
  112. LENGTH = LENGTH - 1;
  113. MGETS(LENGTH, BUFADDR, TRUE);
  114. #
  115.   STEP 2 FILL IN FIELDS IN LOGICAL ERROR MESSAGE
  116. #
  117.  
  118. P<AHEADER> = BUFADDR + BLKHSIZE;
  119. P<SUPMSG> = BUFADDR + BLKHSIZE + ABHSIZE;
  120.  
  121. ABHABT[0] = APPCMD;
  122. ABHACT[0] = CT60TRANS;
  123. ABHTLC[0] = LENGTH - BLKHSIZE - ABHSIZE;
  124.  
  125. PFCSFC[0] = ERRLGL; # FUNCTION CODE FOR LGL/ERR MSG#
  126. ERRRLG[0] = REASON; # REASON CODE #
  127.  
  128. ERRABH[0] = NWLEABH[0]; # COPY ABH OF THE NWLENTRY IN ERROR #
  129. IF NWLTLC[0] NQ 0
  130. THEN
  131. BEGIN # COPY ONE WORD OF MSG FROM NWLENTRY #
  132. P<DRHDRWD> = 0;
  133. ERRMSG[0] = CMWORD[WLADDR + AIPHSIZE + ABHSIZE];
  134. END
  135. #
  136.   LINK LOGICAL ERROR MESSAGE INTO PCB DATA RING
  137. #
  138. BLINK(BUFADDR,ACBADDR);
  139. END
  140. GOTO RJMAIN; # RETURN TO CALLING ROUTINE #
  141. END NAMA378
  142. TERM NAMA378
cdc/nos2.source/nam5871/hlglerr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator