User Tools

Site Tools


cdc:nos2.source:nam5871:xabtapp

XABTAPP

Table Of Contents

  • [00015] PRGM XABTAPP
  • [00091] PROC MGETS
  • [00092] PROC MRELS
  • [00093] PROC OSCCALL
  • [00094] PROC OVLCALL
  • [00095] PROC RDUMP
  • [00096] PROC XTRACE

Source Code

XABTAPP.txt
  1. *DECK XABTAPP
  2. USETEXT NIPDEF
  3. USETEXT APPSTAT
  4. USETEXT ACB
  5. USETEXT AT
  6. USETEXT DRHDR
  7. USETEXT DUMPFLG
  8. USETEXT FLIST
  9. USETEXT NWLHEAD
  10. USETEXT OVERLAY
  11. USETEXT PARAMS
  12. USETEXT PT
  13. USETEXT PWL
  14. USETEXT SWAPIN
  15. PRGM XABTAPP; # ABORT APPLICATION #
  16.  
  17. STARTIMS;
  18. #
  19. *1DC XABTAPP
  20. *
  21. * 1. PROC NAME AUTHOR DATE
  22. * XABTAPP P.C.TAM 80/02/07
  23. *
  24. * 2. FUNCTIONAL DESCRIPTION.
  25. * THIS ROUTINE IS RESPONSIBLE FOR ABORTING THE UCP.
  26. *
  27. * 3. METHOD USED.
  28. * DETERMINE IF ACB EXISTS FOR APPLICATION TO ABORT
  29. * SEND FAIL/APP SUP MSG TO NVF IF ACB EXISTS
  30. * CREATE SCP FUNCTION TO ABORT APP AND END CONNECTIONS WITH NAM
  31. * ISSUE SCP CALL
  32. * PROCESS SCP FUNCTION RETURN CODES
  33. *
  34. * 4. ENTRY PARAMETERS.
  35. * ABTADDR ACB, NWL, OR BUFFER ADDRESS
  36. * ABTAPPF REASON CODE FOR ABORTING APPLICATION
  37. * ABTJOBID APP JOB ID WORD IF ABTADDR = BUFFER ADDRESS
  38. * ABTSIZE SIZE OF BUFFER IF ABTADDR = BUFFER ADDRESS
  39. *
  40. * 5. EXIT PARAMETERS.
  41. * FAILADR SET IF NIP GETS SCP RC = RCUCPGONE
  42. *
  43. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  44. * APPSTAT DRHDR DUMPFLG
  45. * FLIST NIPDEF NWLHEAD
  46. * OPSIZE OVERLAY PARAMS ACB
  47. * SWAPIN AT PT
  48. *
  49. * 7. ROUTINES AND OVERLAYS CALLED.
  50. * MRELS RELEASE BUFFER SPACE
  51. * OSCCALL SYS-CTL-PT CALL
  52. * OSCPSI OVL SCHEDULE APPLICATION (NO PCB EXIST)
  53. * OVLCALL LOAD AND EXECUTE OVERLAY
  54. * RDUMP DUMP NIP-S FIELD LENGTH
  55. * XTRACE TRACES CALLS
  56. * MGETS ALLOCATE BUFFER
  57. *
  58. * 8. DAYFILE MESSAGES. AT NIP-S CONTROL POINT
  59. * *NOT YET NETTED ON*
  60. * *NON-EXISTENT APPLICATION ID*
  61. * *APP WORK LIST ADDR=0*
  62. * *BAD WORD/ENTRY COUNT*
  63. * *SECURITY VIOLATION*
  64. * *ADDRESS OUT OF RANGE*
  65. * *INVALID MINACN/MAXACN ON NETON*
  66. * *INVALID APPLICATION NAME ON NETON*
  67. * *BAD AIP OPCODE*
  68. * *OVER 500 SUP MSGS QUEUED FOR APP*
  69. * *EXTRA WORK LIST*
  70. * *FILE LIMIT/FNT SPACE ERROR*
  71. *
  72. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE
  73. * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO
  74. * LOCATION RJMAIN TO RETURN TO THE CALLING PROGRAM.
  75. *
  76. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  77. *CALL OPSIZE
  78. *
  79. * THIS OVERLAY IS CALLED BY HHIR, XSACB AND XSAPP.
  80. *
  81.  #
  82. STOPIMS;
  83. #
  84.  INPUT PARAMETERS #
  85. # PARAMS1 = INDEX USED TO EXTRACT MESSAGE #
  86. # OUTPUT PARAMETERS NONE
  87.  
  88.   EXTERNAL VARIABLES
  89. #
  90. XREF BEGIN
  91. PROC MGETS ;
  92. PROC MRELS; # RELEASE BUFFER SPACE #
  93. PROC OSCCALL; # SYS-CTL-PT FUNCTION #
  94. PROC OVLCALL;
  95. PROC RDUMP;
  96. PROC XTRACE;
  97. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  98. END
  99. #
  100.   LOCAL VARIABLES
  101. #
  102. ARRAY OFMESSAGES [1:XMSGNUM] S(4);
  103. BEGIN
  104. ITEM ABTMSG C(0,0,38) = ["NOT YET NETTED ON",
  105. "NONEXISTENT APPLICATION ID",
  106. "APP WORK LIST ADDR=0",
  107. "BAD WORD/ENTRY COUNT",
  108. "SECURITY VIOLATION",
  109. "ADDRESS OUT OF RANGE",
  110. "INVALID MINACN/MAXACN ON NETON",
  111. "INVALID APPLICATION NAME ON NETON",
  112. "BAD AIP OPCODE",
  113. "OVER 500 SUP MSGS QUEUED FOR APP",
  114. "EXTRA WORK LIST",
  115. "FILE LIMIT/FNT SPACE ERROR",
  116. "ABORT CONDITION SET FOR CONCB",
  117. "ABORT CONDITION SET FOR SHUT/DOWN",
  118. "ABORT CONDITION SET FOR FCINACT",
  119. "MASTER REQUEST SLAVE TO ABORT"] ;
  120. ITEM ABTMSGWD U(0,0,60);
  121. ITEM ENDTEXT I(3,48,12) = [XMSGNUM(0)];
  122. END
  123. ITEM DFDADDR ; # DAYFILE MESSAGE ADDRESS #
  124. ITEM IDX; # INDEX #
  125. ITEM SCPADDR ; # ADDRESS OF FUNCTION LIST #
  126. #**********************************************************************#
  127. BEGIN
  128. CONTROL IFEQ DEBUG,1 ;
  129. XTRACE("XABTA") ;
  130. CONTROL FI;
  131. #
  132.   INITIAL SET UP FOR ABORTING APPLICATION
  133. #
  134. ACBADDR = 0;
  135. P<DRHDRWD> = ABTADDR;
  136. #
  137.   DETERMINE THE BUFFER INPUT IS AN ACB OR A NWL OR A BUFFER
  138. #
  139.  
  140. IF BLKID[0] EQ ACBIDVALUE
  141. OR BLKID[0] EQ NONMOVEABLE
  142. THEN
  143. BEGIN # ABTADDR IS AN ACB ADDRESS #
  144. ACBADDR = ABTADDR ; # ACB ADDRESS #
  145. P<ACB> = ACBADDR ;
  146. JOBID = ACBJNWD[0] ; # SAVE THE JOB SEQUENCE NUMBER #
  147. END # ABTADDR IS AN ACB ADDRESS #
  148. ELSE
  149. BEGIN # BUFFER IS A NWL O BUFFER #
  150. P<NWLHEADER> = ABTADDR ;
  151. IF BLKID[0] EQ NWLIDVALUE
  152. THEN
  153. JOBID = NWLJOBID[0] ; # SAVE THE J S N #
  154. ELSE
  155. JOBID = ABTJOBID ;
  156.  
  157. #
  158.   LOCATION THE ACB FOR THE JOB ID NAME
  159. #
  160. FOR IDX = 1 STEP 1 WHILE IDX LQ ATHAN[0]
  161. AND ACBADDR EQ 0
  162. DO
  163. BEGIN
  164. P<ACB> = ATACBA[IDX] ;
  165. IF P<ACB> NQ 0
  166. AND ACBJNWD[0] EQ JOBID
  167. THEN
  168. ACBADDR = P<ACB> ;
  169. END
  170.  
  171. IF ACBADDR NQ 0
  172. THEN # ACB EXISTS #
  173. ACBNWLWD[0] = 0; # CLEARS NWL PTRS #
  174. MRELS(P<DRHDRWD>) ; # RELEASE THE NWL #
  175. END # BUFFER IS A NWL OR BUFFER #
  176.  
  177. MGETS(FLSIZE+SWPISIZE+5,SCPADDR,TRUE); # BUFFER FOR SCP LIST #
  178. P<DRHDRWD> = 0 ;
  179. #
  180.   COPY DAYFILE MESSAGE INTO SCP BUFFER FUNCTION LIST
  181. #
  182. DFDADDR = SCPADDR + FLSIZE + 1 ; # DAYFILE MESSAGE #
  183. FOR IDX = 0 STEP 1 UNTIL 3
  184. DO
  185. CMWORD[DFDADDR+IDX] = CMWORD[LOC(ABTMSGWD[ABTAPPF]) + IDX] ;
  186.  
  187. # SET UP THE FUNCTION LIST #
  188. P<FLHEAD> = SCPADDR ;
  189. FLID[0] = NAFLIDVALUE ;
  190. FLBS[0] = FLSIZE ;
  191. FLJOBID[0] = JOBID ;
  192. FLUCPA[0] = 1 ;
  193. FLSCPA[0] = DFDADDR ; # DAYFILE MESSAGE ADDRESS #
  194. P<FLE> = SCPADDR + BLKHSIZE ;
  195. FLFC[0] = SFREGR ;
  196.  
  197. OSCCALL(FLE) ;
  198.  
  199. IF FLRC[0] EQ RCSWAPPEDOUT
  200. THEN
  201. BEGIN # APPL. DAS BEEN SWAPPED OUT #
  202. PARAMS1 = SCPADDR ; # SET UP THE SWAP IN LIST #
  203. PARAMS2 = SCPADDR + FLSIZE + 5 ;
  204. PARAMS3 = SCPADDR + FLSIZE ;
  205. P<DRHDRWD> = SCPADDR + FLSIZE ;
  206. BLKBS[0] = 5 ;
  207. OVLNAME = OSCPSIP ;
  208. OVLCALL ;
  209. END # APPL. HAS BEEN SWAPPED OUT #
  210. ELSE
  211. BEGIN # ZERO AND OTHER REASON CODE #
  212. IF FLRC[0] EQ RCUCPGONE
  213. OR FLRC[0] EQ RCSTCBAD
  214. THEN # APPLICATION IS GONE #
  215. BEGIN # APPLICATION IS GONE #
  216. IF ACBADDR NQ 0
  217. THEN # BUT ACB STILL EXITS #
  218. FAILADR = ACBADDR ; # MAKE FAIL APPL. #
  219. ELSE
  220. BEGIN # APPLICATION IS GONE #
  221. DMPFLG = DXABTAP1 ; # DUMP FLAG #
  222. RDUMP ;
  223. END # APPLICATION IS GONE #
  224. END # APPLICATION IS GONE #
  225.  
  226. BLKBS[SCPADDR] = FLSIZE + SWPISIZE + 5 ;
  227. MRELS(SCPADDR) ; # RELEASE THE FLIST BUFFER #
  228. END # ZERO OR OTHER REASON CODE #
  229. ABTAPPF = 0;
  230. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  231. END
  232. TERM
cdc/nos2.source/nam5871/xabtapp.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator