User Tools

Site Tools


cdc:nos2.source:nam5871:nrcsstp

NRCSSTP

Table Of Contents

  • [00011] PROC NRCSSTP(ACBD,PWLADD,FNTORD,REASON)
  • [00044] PROC ABORT
  • [00045] PROC OMSG
  • [00046] PROC OSCHAPP
  • [00047] PROC OSREQ

Source Code

NRCSSTP.txt
  1. *DECK NRCSSTP
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT APPSTAT
  5. USETEXT AT
  6. USETEXT MSGIDX
  7. USETEXT PWL
  8. USETEXT PARAMP
  9. USETEXT PT
  10. USETEXT SSTCOM
  11. PROC NRCSSTP(ACBD,PWLADD,FNTORD,REASON) ;
  12. #
  13. *****
  14. * 1.PROC NAME AUTHOR DATE
  15. * NRCSSTP L.T.NGUYEN 84/08/21
  16. *
  17. * 2.FUNCTIONAL DESCRIPTION:
  18. * MAKE SSTP CALL AND PROCESS REASON CODE RETURNED FROM O.S.
  19. *
  20. * 3.METHOD USED:
  21. * SETU UP SSTP PARAMETER BLOCK.
  22. * CALL OSREQ TO VALIDATE SSTP CALL.
  23. * PROCESS REASON CODE RETURNED:
  24. * - IF NON-ZERO REASON CODE:
  25. * IF REASON IS SWAPED OUT LINK THIS PWL TO ACB PWL RING.
  26. * ELSE SET UP TO ABORT APPLICATION LATER.
  27. *
  28. * 4.INPUT PARAMS:
  29. * ACBADD - ADDRESS OF ACB OF APPLICATION TO RECIEVE FILE.
  30. * PWLADD - WORKLIST FROM PIP.
  31. * FTNORD - ORDINAL FNT OF FILE TO BE SWITCHED.
  32. * REASON - REASON CODE RETURN TO CALLER IF ERROR ENCOUTERED.
  33. *
  34. * 5.ROUTINES USED:
  35. * OMSG : - SEND DAYFILE MESSAGE.
  36. * OSCHAPP: - SCHEDULE THIE APPLICATION.
  37. * OSREQ: - CALL OPERATING SYSTEM TO PROCESS SSTP.
  38. *
  39. *****
  40.  #
  41.  
  42. XREF
  43. BEGIN # EXTERNAL REFERENCE #
  44. PROC ABORT ;
  45. PROC OMSG ;
  46. PROC OSCHAPP ;
  47. PROC OSREQ ;
  48. END
  49.  
  50. ITEM ACBD U ; # ACB ADDRESS #
  51. ITEM PWLADD U ; # PWL ADDRESS #
  52. ITEM FNTORD U ; # ORDINAL OF FILE #
  53. ITEM INDEX ;
  54. ITEM REASON U ; # REASON CODE RETURNED #
  55.  
  56.  
  57. BEGIN # BEGIN OF NRCSSTP #
  58.  
  59. P<ACB> = ACBD ;
  60. P<PWLHDR> = PWLADD ;
  61.  
  62. IF ATASBSO[ACBAN[0]] # APPLICATION SWAPPED OUT #
  63. THEN
  64. BEGIN
  65. REASON = RC$UCPSO; # NO NEED TO ISSUE SST CALL #
  66. END
  67. ELSE
  68. BEGIN
  69. SSTPARAM[0] = 0; # CLEAR SST PARAMETER WORD #
  70. SSTFNTS[0] = FNTORD; # FILE-S FNT ORDINAL IN NAM #
  71. SSTFC[0] = SSTSQFTUCP; # SST FUNCTION CODE #
  72. SSTJOBID[0] = ACBJNWD[0]; # APP JOB IDENTIFICATION #
  73. SSTPADDR[0] = LOC(SSTPARAM[0]);# FWA OF SST PARAMETER BLOCK #
  74.  
  75. OSREQ(SSTCALL[0]); # ISSUE SST RA+1 CALL #
  76.  
  77. REASON = SSTRC[0]; # SST COMPLETION STATUS #
  78. END
  79. IF REASON NQ 0
  80. THEN # SST ERROR PROCESSING #
  81. BEGIN
  82. IF NOT ATASBSO[ACBAN[0]]
  83. THEN
  84. BEGIN # ISSUE MESSAGE FOR ACTUAL #
  85. INDEX = REASON/8; # ATTEMPT TO ISSUE SST CALL #
  86. D14M2[0] = INDEX*O"100" + REASON - INDEX*8 + O"3333";
  87. D14M3[0] = SSTJSN[0];
  88. OMSG(DFMSG14,0);
  89. END
  90. IF REASON EQ RC$UCPSO
  91. THEN # APP SWAPPED OUT BY OS #
  92. BEGIN # RESUME PWL PROCESSING #
  93. ATPSO[ACBAN[0]] = TRUE; # SET PWL EXIST FLAG #
  94. OSCHAPP(P<ACB>); # SCHEDULE APPLICATION #
  95.  
  96. IF PWLID[0] EQ PWLIDVALUE # PWL IS FROM INBOUND BUFFER #
  97. THEN # INITIALIZE PWL RING #
  98. BEGIN
  99. IF ACBPWLFP[0] EQ 0
  100. AND ACBPWLBP[0] EQ 0
  101. THEN
  102. BEGIN # PWL RING IS EMPTY #
  103. ACBPWLFP[0] = P<PWLHDR>;
  104. ACBPWLBP[0] = P<PWLHDR>;
  105. PWLNPWLFP[0] = LOC(ACBPWLFP[0]);
  106. PWLNPWLBP[0] = LOC(ACBPWLBP[0]);
  107. END # EMPTY PWL RING #
  108. ELSE
  109. BEGIN # PWL RING EXISTS, INSERT IT #
  110. PWLNPWLFP[0] = LOC(ACBPWLFP[0]) ; # FORWRAD TO FIRST ONE#
  111. PWLNPWLBP[0] = ACBPWLBP[0] ; # BACK TO CURRENT LAST #
  112. P<PWLHDR> = ACBPWLBP[0] ; # LOOKIN AT CURRENT BACK #
  113. PWLNPWLFP[0] = PWLADD ; # FORWARD POINTS TO NEW #
  114. ACBPWLBP[0] = PWLADD ; # ACB BACK TO NEW #
  115. END # INSERT INTO PWL RING #
  116.  
  117. P<PWLHDR> = PWLADD ;
  118. PWLID[0] = PWLRIDVALUE; # SET PWL RING ID FOR PWL #
  119.  
  120. END
  121. END
  122.  
  123. ELSE
  124. BEGIN
  125.  
  126. IF REASON EQ RC$UCPNF
  127. THEN # APPLICATION FAILED #
  128. FAILADR = P<ACB>; # APPLICATION-S ACB ADDRESS #
  129.  
  130. ELSE
  131. BEGIN
  132. IF REASON EQ RC$FNTNS OR # NO ROOM IN UCP-S LOCAL FNT #
  133. REASON EQ RC$FLIMIT # UCP-S FILE LIMIT REACHED #
  134. THEN # ABORT APPLICATION #
  135. BEGIN
  136. ABTAPPF = XFNTERR; # FILE LIMIT OR FNT SPACE ERROR #
  137. ABTADDR = P<ACB>; # APPLICATION-S ACB ADDRESS #
  138. END
  139.  
  140. ELSE # NAM SST REQUEST ERROR #
  141. ABORT(0,0); # ABORT NIP #
  142. END
  143. END
  144.  
  145. END
  146.  
  147. RETURN ;
  148. END
  149.  
  150. TERM
cdc/nos2.source/nam5871/nrcsstp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator