User Tools

Site Tools


cdc:nos2.source:nam5871:hwrtda

HWRTDA

Table Of Contents

  • [00008] PROC HWRTDA(FLW,FLSIZ,BUFADDR)
  • [00082] PROC MGETS
  • [00083] PROC MRELS
  • [00084] PROC OSCCALL
  • [00085] PROC OSCHAPP
  • [00086] PROC XTRACE

Source Code

HWRTDA.txt
  1. *DECK HWRTDA
  2. USETEXT NIPDEF
  3. USETEXT ACNB
  4. USETEXT ACB
  5. USETEXT APPSTAT
  6. USETEXT AT
  7. USETEXT FLIST
  8. PROC HWRTDA(FLW,FLSIZ,BUFADDR); # WRITE MSGS BACK TO APP FL #
  9. STARTIMS ;
  10. #
  11. *1DC HWRTDA
  12. * 1. PROC NAME AUTHOR DATE
  13. * HWRTDA E. GEE 85/04/02
  14. *
  15. * 2. FUNCTIONAL DESCRIPTION
  16. * WRITE MULTIPLE MESSAGE BUFFERS TO APPLICATION-S FIELD
  17. * LENGTH.
  18. *
  19. * 3. METHOD
  20. * IF NO CONNECTION DATA RING EXISTS,
  21. * UPDATE ACB TO POINT TO THIS ACNB.
  22. * ELSE (CONNECTION DATA RING ALREADY EXISTS),
  23. * ADD THIS ACNB TO CONNECTION DATA RING. IT IS LINKED IN
  24. * FRONT OF THE ACNB POINTED TO BY THE ACB.
  25. *
  26. * 4. ENTRY PARAMETERS
  27. * ACBADDR ADDRESS OF CORRESPONDING ACB
  28. * BUFADDR ADDRESS OF DATA TO WRITE TO APP FL
  29. * FLSIZ SIZE OF SCP FUNCTION LIST
  30. * FLW ADDRESS OF SCP FUNCTION LIST
  31. *
  32. * 5. EXIT PARAMETERS
  33. * ABTAPPF FLAG SET IF APP SUPPLIED BAD ADDR
  34. * FAILADR FLAG SET IF APP FAILED
  35. *
  36. * 6. COMDECKS CALLED
  37. * ACB APPLICATION CONTROL BLOCK TEMPLATE
  38. * ACNB APPLICATION CONNECTION BLOCK TEMPLATE
  39. * APPSTAT NETWORK WORKLIST PROCESSING TABLE
  40. * AT APPLICATION TABLE
  41. * FLIST SCP FUNCTION LIST TEMPLATE
  42. * NIPDEF CONSTANT DEFINITIONS
  43. *
  44. * 7. ROUTINES CALLED
  45. * MGETS GET BUFFER
  46. * MRELS RETURN BUFFER
  47. * OSCCALL ISSUE SCP REQUEST
  48. * OSCHAPP ISSUE SCP SWAPIN REQUEST FOR APPLICATION
  49. * XTRACE TRACE PROCEDURE CALL
  50. *
  51. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  52. *
  53.  #
  54. STOPIMS;
  55.  
  56. #
  57.  INPUT VARIABLES
  58. #
  59. ARRAY FLW P(3); # ARRAY FOR ISSUING SCP CALL #
  60. BEGIN
  61. ITEM FLWRC U(00,00,06); # RETURN CODE FROM SCP CALL #
  62. ITEM FLWFP U(00,06,12); # NUMBER OF WORDS TO READ #
  63. ITEM FLWUCPA U(00,18,18); # UCP ADR FOR SF.WRITE SCP FUNC #
  64. ITEM FLWSCPA U(00,36,18); # SCP ADR FOR SF.WRITE SCP FUNC #
  65. ITEM FLWFC U(00,54,06); # SCP FUNCTION CODE #
  66. ITEM FLWCB U(00,59,01); # SCP FUNCTION COMPLETION BIT #
  67. ITEM FLWWD0 U(00,00,60); # WORD 0 OF SCP FUNCTION BUFFER #
  68. ITEM FLWJSNWD U(01,00,60); # UCP JSN / EJT ORDINAL WORD #
  69. ITEM FLWXUCPA U(02,12,24); # UCP ADR FOR SF.XWRITE SCP FUNC#
  70. ITEM FLWXSCPA U(02,36,24); # SCP ADR FOR SF.XWRITE SCP FUNC#
  71. ITEM FLWWD2 U(02,00,60); # WORD 2 OF SCP FUNCTION BUFFER #
  72. END
  73.  
  74. ITEM FLSIZ; # SIZE OF SCP FUNCTION LIST #
  75. ITEM BUFADDR; # ADDR OF BUFFER CONTAINING DATA#
  76.  
  77. #
  78.   EXTERNAL REFERENCES
  79. #
  80. XREF
  81. BEGIN
  82. PROC MGETS; # GET BUFFER #
  83. PROC MRELS; # RETURN BUFFER #
  84. PROC OSCCALL; # ISSUE SCP REQUEST #
  85. PROC OSCHAPP; # ISSUE SCP SWAPIN REQ FOR APP #
  86. PROC XTRACE; # TRACE PROCEDURE CALL #
  87. END
  88.  
  89. #**********************************************************************#
  90. CONTROL EJECT;
  91.  
  92. BEGIN
  93.  
  94. CONTROL IFEQ DEBUG,1;
  95. XTRACE("HWRDA");
  96. CONTROL FI;
  97.  
  98. P<ACB> = ACBADDR; # ADDRESS OF ACB #
  99.  
  100. WRBLK:
  101. OSCCALL(FLW); # ISSUE SCP FUNCTION #
  102. #
  103.   PROCESS SCP FUNCTION RETURN CODE
  104. #
  105. IF FLWRC[0] EQ RCSWAPPEDOUT
  106. THEN # APPLICATION WAS SWAPPED OUT #
  107. BEGIN
  108. MGETS(FLSIZ,P<FLHEAD>,TRUE); # GET BUF FOR SAVING SCP REQ #
  109. FLID[0] = FLIDVALUE; # FUNCTION LIST BLOCK ID VALUE #
  110. FLAN[0] = ACBAN[0]; # APPLICATION NUMBER #
  111. FLFW[0] = FLWWD0[0]; # COPY WORD 0 OF SCP FUNC REQ #
  112. FLJOBID[0] = FLWJSNWD[0]; # COPY WORD 1 OF SCP FUNC REQ #
  113. IF FLSIZ EQ FLXSIZE
  114. THEN # NEED TO COPY 1 MORE WORD #
  115. BEGIN
  116. FLXRW[0] = FLWWD2[0]; # COPY WORD 2 OF SCP FUNC REQ #
  117. END
  118. ACBFLIST[0] = P<FLHEAD>; # FUNC LIST ADDRESS #
  119. ATASBS[ACBAN[0]] = TRUE; # SET-APP-SWAP-OUT FLAG IN ACB #
  120. ACBWRADDR[0] = BUFADDR; # ADDR OF BUF TO WRITE TO UCP FL#
  121. OSCHAPP(ACBADDR); # SCHEDULE APPLICATION #
  122. ACBNWLE[0] = ACBNWLE[0]-1; # UPDATE NO OF ENTRIES LEFT #
  123. ACBWLADR[0] = NEXTWLA;
  124. END
  125. ELSE
  126. BEGIN
  127. IF FLWRC[0] EQ 0
  128. THEN # NO ERROR RETURN CODE #
  129. BEGIN
  130. IF (FLWFP[0] NQ 0 ) AND # NOT FINISHED WRITING TEXT #
  131. (FLSIZ EQ FLXSIZE) # EXTENDED WRITE FUNCTION #
  132. THEN # NEED TO REISSUE REQUEST #
  133. BEGIN
  134. FLWCB[0] = 0; # CLEAR COMPLETION BIT #
  135. GOTO WRBLK; # GO BACK AND REISSUE SCP REQ #
  136.  
  137. END
  138. ELSE # COMPLETED WRITING TEXT #
  139. BEGIN
  140. DONE = TRUE; # FINISHED PROCESSING WORKLIST #
  141. MRELS(BUFADDR);
  142. END
  143. END
  144. ELSE # ERROR RETURN CODE #
  145. BEGIN
  146. MRELS(BUFADDR);
  147. IF FLWRC[0] EQ RCUCPGONE
  148. OR FLWRC[0] EQ RCSTCBAD
  149. THEN # APP IS NO LONGER IN SYSTEM #
  150. BEGIN
  151. FAILADR = ACBADDR; # SET APPLICATION-FAILED FLAG #
  152. END
  153. ELSE # AIP MUST HAVE GIVEN BAD ADR #
  154. BEGIN
  155. ABTAPPF = XFLERR; # SET ABORT-APPLICATION FLAG #
  156. END
  157. END
  158. END
  159. RETURN;
  160. END
  161. TERM
cdc/nos2.source/nam5871/hwrtda.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator