User Tools

Site Tools


cdc:nos2.source:nam5871:xsapp

Table of Contents

XSAPP

Table Of Contents

  • [00012] PRGM XSAPP
  • [00076] PROC ABORT
  • [00077] PROC MRELS
  • [00078] PROC OSCCALL
  • [00079] PROC OVLCALL
  • [00080] PROC RDUMP
  • [00081] PROC XSAPPRC
  • [00082] PROC XTRACE

Source Code

XSAPP.txt
  1. *DECK XSAPP
  2. USETEXT NIPDEF
  3. USETEXT APPSTAT
  4. USETEXT DRHDR
  5. USETEXT DUMPFLG
  6. USETEXT FLIST
  7. USETEXT MSGIDX
  8. USETEXT OVERLAY
  9. USETEXT PARAMS
  10. USETEXT SCPCOM
  11. USETEXT SWAPIN
  12. PRGM XSAPP; # PROCESS SWAPIN OF (NO ACB) APPLICATION #
  13.  
  14. STARTIMS;
  15. #
  16. *1DC XSAPP
  17. *
  18. * 1. PROC NAME AUTHOR DATE
  19. * XSAPP E. GEE 77/07/27
  20. *
  21. * 2. FUNCTIONAL DESCRIPTION.
  22. * PROCESS SWAPIN OF (NO ACB) APPLICATION AND REISSUE PREVIOUS
  23. * SYSTEM CONTROL POINT FUNCTION.
  24. *
  25. * 3. METHOD USED.
  26. * CHECK IF APPLICATION HAS BEEN SWAPPED IN
  27. * PROCESS SCP SWAPIN FUNCTION RETURN CODE
  28. * CLEAR RETURN CODES AND COMPLETION BITS OF PREVIOUS SCP
  29. * CALL IF NECESSARY
  30. * REISSUE PREVIOUS SYSTEM CONTROL POINT FUNCTION
  31. * PROCESS SCP FUNCTION RETURN CODE FROM SECOND CALL
  32. *
  33. * 4. ENTRY PARAMETERS.
  34. * SWAPINFP ADDR OF FIRST ENTRY IN (NO ACB) SWAPIN
  35. * CHAIN
  36. *
  37. * 5. EXIT PARAMETERS.
  38. * NONE
  39. *
  40. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  41. * APPSTAT DUMPFLG FLIST
  42. * MSGIDX NIPDEF OPSIZE OVERLAY
  43. * PARAMS SCPCOM SWAPIN
  44. *
  45. * 7. ROUTINES AND OVERLAYS CALLED
  46. * MRELS RELEASE BUFFER SPACE
  47. * OSCCALL ISSUE SCP CALLS
  48. * OVLCALL LOAD AND EXECUTE OVERLAYS
  49. * RDUMP DUMP NIP-S FIELD LENGTH
  50. * XABTAPP OVL ABORT APPLICATION
  51. * XERRMSG OVL ISSUE DAYFILE MESSAGE
  52. * XSAPPRC PROCESS (NO ACB) SCP FUNCTION RETURN CODE
  53. * XTRACE RECORD PROCEDURE CALLS
  54. *
  55. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  56. * * NIP/SCP ERROR RC = XXB,JOBID=XXXX*
  57. *
  58. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE
  59. * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO
  60. * LOCATION RJMAIN TO RETURN TO THE CALLING PROGRAM.
  61. *
  62. * W A R N I N G - THIS PROGRAM AND PROCEDURE XSAPPRC
  63. * COMPRISE THIS OVERLAY AND THE TOTAL OF
  64. * THE TWO CANNOT EXCEED THE PRIMARY
  65. *CALL OPSIZE
  66. *
  67. * THIS OVERLAY IS CALLED BY XSACB.
  68. *
  69.  #
  70. STOPIMS;
  71. #
  72.   EXTERNAL VARIABLES
  73. #
  74. XREF
  75. BEGIN
  76. PROC ABORT ;
  77. PROC MRELS; # RELEASE BUFFER SPACE #
  78. PROC OSCCALL; # ISSUE SYSTEM CONTROL POINT CALLS #
  79. PROC OVLCALL; # LOAD AND EXECUTE OVERLAYS #
  80. PROC RDUMP; # DUMP NIP-S FIELD LENGTH #
  81. PROC XSAPPRC; # PROCESS (NO ACB) SCP FUNCTION RC #
  82. PROC XTRACE; # RECORD PROCEDURE CALLS #
  83. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  84. END
  85. #
  86.   INTERNAL VARIABLES
  87. #
  88. ITEM FLW; # INDEX FOR CLEARING RETURN CODES #
  89. ITEM NEXT; # ADDR OF NEXT ENTRY IN SWAPIN CHAIN #
  90. ITEM RC; # SYS CONTROL POINT FUNCTION RETURN CODE #
  91. ITEM SENTRY; # ADDR OF (NO ACB) SWAPIN ENTRY #
  92. ITEM SIZE; # SIZE OF SCP FUNCTION LIST #
  93.  
  94. #**********************************************************************#
  95.  
  96. BEGIN
  97.  
  98. CONTROL IFEQ DEBUG,1;
  99. XTRACE("XSAPP") ;
  100. CONTROL FI;
  101.  
  102. SENTRY = SWAPINFP; # SWAPIN ENTRY TO PROCESS #
  103. #
  104.   LOOP THROUGH (NO ACB) SWAPIN CHAIN UNTIL ALL ENTRIES ARE PROCESSED
  105. #
  106. FOR SENTRY=SENTRY WHILE SENTRY NQ LOC(SWAPINFP) DO
  107. BEGIN
  108. P<SWPIE> = SENTRY;
  109. NEXT = SWPINFP[0]; # ADDR OF NEXT ENTRY IN SWAPIN CHAIN #
  110. IF SWPICB[0] EQ 1
  111. THEN # SWAPIN SCP CALL HAS COMPLETED #
  112. BEGIN
  113. P<SCPCALL> = SWPIFL[0]; # FUNCTION LIST FOR (NO ACB) APP #
  114. SIZE = SCPBS[0];
  115. #
  116.   CHECK SCP SWAPIN FUNCTION RETURN CODE
  117. #
  118. IF SWPIRC[0] EQ 0
  119. THEN # APP SWAPPED IN WITH NO PROBLEMS #
  120. BEGIN
  121. #
  122.   CLEAR RETURN CODES AND COMPLETION BITS IN ORIGINAL SCP
  123.   FUNCTION LIST
  124. #
  125. SCPRC[0] = 0; # ZERO SCP FUNCTION LIST RETURN CODE #
  126. SCPCB[0] = 0; # CLEAR SCP FUNCTION LIST COMPLETION BIT #
  127. IF SCPBS[0] GR SCPSIZE
  128. THEN # THERE ARE SF.LIST ENTRIES TO CLEAN UP #
  129. BEGIN
  130. FOR FLW=SCPSIZE STEP FLESIZE UNTIL SCPBS[0]-1 DO
  131. BEGIN
  132. P<FLE> = P<SCPCALL> + FLW; # ADDR OF SF.LIST ENTRY #
  133. FLERC[0] = 0; # ZERO SF.LIST ENTRY RETURN CODE #
  134. FLECB[0] = 0; # CLEAR SF.LIST ENTRY COMPLETION BIT #
  135. END
  136. END
  137.  
  138. # REISSUE ORIGNIAL SCP FUNCTION CALL #
  139. P<FLE> = LOC(SCPFW[0]);
  140. OSCCALL(FLE);
  141. #
  142.   PROCESS SCP FUNCTION RETURN CODE
  143. #
  144. RC = SCPRC[0]; # SCP FUNCTION RETURN CODE #
  145. XSAPPRC(SENTRY,RC);
  146. IF RC EQ RCUCPAOOR
  147. THEN # UCP GAVE US BAD ADDR SO ABORT IT #
  148. BEGIN
  149. ABTAPPF = XFLERR; # SET ABORT-APPLICATION FLAG #
  150. ABTADDR = P<SCPCALL>; # ADDR OF BUF FOR XABTAPP TO USE #
  151. ABTSIZE = SIZE; # SIZE OF BUF FOR XABTAPP TO USE #
  152. ABTJOBID = SWPIJOBID[0]; # APP JOB ID WORD #
  153. OVLNAME = XABTAPPP; # NAME OF OVERLAY TO LOAD #
  154. OVLCALL; # LOAD AND EXECUTE OVELAY #
  155. END
  156. ELSE
  157. BEGIN
  158. IF RC NQ RCSWAPPEDOUT
  159. THEN # IT IS OKAY TO RELEASE BUFFER #
  160. MRELS(P<SCPCALL>);
  161. END
  162. END
  163. ELSE # GOT NONZERO RETURN CODE FROM SWAPIN CALL#
  164. #
  165.   PROCESS SCP SWAPIN CALL RETURN CODE
  166. #
  167. BEGIN
  168. RC = SWPIRC[0]; # SCP FUNCTION RETURN CODE #
  169. XSAPPRC(SENTRY,RC);
  170. IF (RC NQ 0) # SCP RC NOT EQUAL TO ZERO #
  171. AND (RC NQ RCSWAPPEDOUT) # UCP NOT SWAPPED OUT #
  172. AND (RC NQ RCUCPGONE) # UCP STILL IN SYSTEM #
  173. AND (RC NQ RCSTCBAD)
  174. AND (RC NQ RCSWAPDELAY) # UCP CAN BE SWAPPED IN #
  175. THEN # OP SYS GAVE NIP BAD RETURN CODE #
  176. BEGIN
  177. DMPFLG = DXSAPP1; # STORE REASON CODE FOR DUMPING FL #
  178. RDUMP; # DUMP NIP-S FIELD LENGTH #
  179. PARAMS1 = DFMSG07; # DAYFILE MESSAGE NUMBER #
  180. PARAMS2 = RC; # SCP FUNCTION RETURN CODE #
  181. PARAMS3 = SWPIJOBID[0]; # APP JOB ID WORD #
  182. OVLNAME = XERRMSGP; # NAME OF OVERLAY TO LOAD #
  183. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  184. ABORT ;
  185. END
  186.  
  187. IF (RC NQ RCSWAPPEDOUT) # UCP SWAPPED OUT AGAIN #
  188. AND (RC NQ RCSWAPDELAY) # UCP CANNOT BE SWAPPED IN #
  189. THEN # ALRIGHT TO RELEASE BUFFER #
  190. MRELS(P<SCPCALL>);
  191. END
  192. END
  193. SENTRY = NEXT; # SET PTR FOR NEXT ENTRY IN SWAPIN CHAIN #
  194. END
  195. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  196. END
  197. TERM
cdc/nos2.source/nam5871/xsapp.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator