User Tools

Site Tools


cdc:nos2.source:nam5871:sscctr

SSCCTR

Table Of Contents

  • [00003] PROC SSCCTR (CNUM,SUCCESS)
  • [00004] SSCCTR - CANCEL TIMER REQUEST.
  • [00008] CANCEL TIMER REQUEST.
  • [00044] PROC SSTRTS

Source Code

SSCCTR.txt
  1. *DECK SSCCTR
  2. USETEXT TEXTSS
  3. PROC SSCCTR (CNUM,SUCCESS);
  4. # TITLE SSCCTR - CANCEL TIMER REQUEST. #
  5.  
  6. BEGIN # SSCCTR #
  7. #
  8. ** SSCCTR - CANCEL TIMER REQUEST.
  9. *
  10. * F. HOU. 81/09/10.
  11. *
  12. * THIS PROCEDURE USES THE TIMER-CANCELLATION-NUMBER TO FIND
  13. * THE CORRESPONDING TIMER ENTRY AND REMOVES IT.
  14. *
  15. * PROC SSCCTR (CNUM,SUCCESS)
  16. *
  17. * ENTRY CNUM = THE TIMER-CANCELLATION-NUMBER.
  18. * SUCCESS= BOOLEAN FLAG TO INDICATE ENTRY WAS CANCELLED?
  19. *
  20. * EXIT THE TIMER REQUEST IS CANCELLED.
  21. *
  22. * NOTES NONE.
  23. *
  24. * METHOD
  25. *
  26. * SEARCH TRQ1 FOR ENTRY WITH MATCHING TIMER-CANCELLATION-NUMBER.
  27. * IF NO MATCH FOUND,SET FLAG TO INDICATE FAIL.
  28. * IF MATCH FOUND, REMOVE ENTRY, SET FLAG TO INDICATE SUCCESS.
  29. * IF MORE ENTRY IN TRQ1, SET CTM FIRE-TIME TO TRQ1[0] FIRE-TIME.
  30. * ELSE, SET CTM FIRE-TIME TO 77777777.
  31. * RETURN WITH FLAG INDICATING FAIL/SUCESS.
  32. *
  33. #
  34.  
  35. ITEM CNUM U; # TIMER CANCELLATION NUMBER #
  36. ITEM SUCCESS B; # FLAG TO INDICATE ENTRY WAS CANCELLED? #
  37.  
  38. #
  39. ****
  40. #
  41.  
  42. XREF
  43. BEGIN
  44. PROC SSTRTS; # REMOVE TABLE SPACE #
  45. END
  46.  
  47. #
  48. ****
  49. #
  50.  
  51. ITEM I U; # I IS A LOOP VARIABLE #
  52. ITEM II I; # II=I #
  53.  
  54.  
  55. CONTROL EJECT;
  56.  
  57. P<TRQ1>=SSTRQ[0]; # SET BASED ARRAY-TRQ1 POINTER. #
  58.  
  59. IF (SSTRQL[0] EQ 0)
  60. THEN
  61. BEGIN
  62. SUCCESS=FALSE; # RESET SUCCESS FLAG TO INDICATE FAIL #
  63. RETURN;
  64. END
  65.  
  66. II=0; # INITIAL VALUE OF II #
  67. FOR I=0 STEP 1 WHILE I LS (SSTRQL[0]/4)
  68. AND (CNUM NQ TRQ1$CNUM[I])
  69. DO
  70. BEGIN
  71. II=I;
  72. END
  73.  
  74. IF (II EQ (SSTRQL[0]/4-1)) AND
  75. (CNUM NQ TRQ1$CNUM[II])
  76. THEN
  77. BEGIN
  78. SUCCESS=FALSE; # RESET SUCCESS FLAG TO INDICATE FAIL #
  79. RETURN;
  80. END
  81.  
  82. # I=0 CASE #
  83. IF (II EQ 0) AND
  84. ((SSTRQL[0] EQ 0) OR (CNUM EQ TRQ1$CNUM[0]))
  85. THEN
  86. BEGIN
  87. II=II-1;
  88. END
  89.  
  90. SUCCESS=TRUE; # SET SUCESS FLAG TO INDICATE SUCCESS #
  91.  
  92. SSTRTS (SSITRQ,(II+1)*4,TRQ1$ENTRY[II+1]); #REMOVE TABLE SPACE #
  93. IF(SSTRQL[0] NQ 0)
  94. THEN
  95. BEGIN
  96. CTM$FTIME[0]=TRQ1$FTIME[0]; # SET CTM FTIME TO TRQ1[0] FTIME #
  97. END
  98. ELSE
  99. BEGIN
  100. CTM$FTIME[0]=O"77777777";
  101. END
  102.  
  103.  
  104. END # SSCCTR #
  105.  
  106. TERM
cdc/nos2.source/nam5871/sscctr.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator